mirror of
https://github.com/wassname/talk.git
synced 2026-08-17 11:27:52 +08:00
75 lines
2.3 KiB
JSON
75 lines
2.3 KiB
JSON
{
|
|
"env": {
|
|
"es6": true,
|
|
"node": true
|
|
},
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"plugin:react/recommended"
|
|
],
|
|
"parserOptions": {
|
|
"ecmaVersion": 2017
|
|
},
|
|
"plugins": [
|
|
"json",
|
|
"promise",
|
|
"react"
|
|
],
|
|
"rules": {
|
|
"promise/no-return-wrap": "error",
|
|
"promise/param-names": "error",
|
|
"promise/catch-or-return": "warn",
|
|
"promise/no-native": "off",
|
|
"promise/no-nesting": "warn",
|
|
"promise/no-promise-in-callback": "warn",
|
|
"promise/no-callback-in-promise": "warn",
|
|
|
|
// TODO: Change all these to "error", or remove and use defaults.
|
|
"react/display-name": "off",
|
|
"react/jsx-no-duplicate-props": "warn",
|
|
"react/jsx-no-target-blank": "warn",
|
|
"react/no-find-dom-node": "warn",
|
|
"react/no-unknown-property": "warn",
|
|
"react/prop-types": "off",
|
|
|
|
"array-callback-return": "warn",
|
|
"arrow-parens": ["warn", "always"],
|
|
"comma-spacing": ["error", {"after": true}],
|
|
"curly": "error",
|
|
"eol-last": "warn",
|
|
"eqeqeq": ["error", "smart"],
|
|
"indent": ["error", 2],
|
|
"linebreak-style": ["error", "unix"],
|
|
"lines-around-comment": ["warn", {"beforeLineComment": true}],
|
|
"newline-per-chained-call": ["error", {"ignoreChainWithDepth": 2}],
|
|
"no-console": "off",
|
|
"no-const-assign": "error",
|
|
"no-duplicate-imports": "error",
|
|
"no-eval": "error",
|
|
"no-global-assign": "error",
|
|
"no-implied-eval": "error",
|
|
"no-lonely-if": "error",
|
|
"no-multiple-empty-lines": ["error", {"max": 1}],
|
|
"no-nested-ternary": "warn",
|
|
"no-path-concat": "error",
|
|
"no-script-url": "error",
|
|
"no-tabs": "error",
|
|
"no-template-curly-in-string": "warn",
|
|
"no-throw-literal": "error",
|
|
"no-unneeded-ternary": "warn",
|
|
"no-unsafe-negation": "warn",
|
|
"no-unused-vars": ["error", {"argsIgnorePattern": "^_|next", "varsIgnorePattern": "^_"}],
|
|
"no-var": "error",
|
|
"object-curly-spacing": "warn",
|
|
"prefer-template": "warn",
|
|
"quotes": ["error", "single"],
|
|
"semi": ["error", "always"],
|
|
"space-in-parens": ["error", "never"],
|
|
"space-infix-ops": ["error"],
|
|
"space-unary-ops": ["error", {"words": true, "nonwords": false}],
|
|
"spaced-comment": ["warn", "always", {"line": {"exceptions": ["-", "="]}}],
|
|
"template-curly-spacing": "warn",
|
|
"yoda": "warn"
|
|
}
|
|
}
|