2019-02-03 17:23:33 +07:00
|
|
|
{
|
|
|
|
"extends": [
|
2019-06-20 19:37:28 +07:00
|
|
|
"@verdaccio",
|
|
|
|
"plugin:react/recommended",
|
2019-02-03 17:23:33 +07:00
|
|
|
"plugin:jest/recommended",
|
|
|
|
"plugin:prettier/recommended",
|
|
|
|
"plugin:verdaccio/recommended",
|
|
|
|
"plugin:jsx-a11y/recommended"
|
|
|
|
],
|
2019-06-20 19:37:28 +07:00
|
|
|
"plugins": [
|
|
|
|
"react",
|
|
|
|
"jest",
|
|
|
|
"prettier",
|
|
|
|
"verdaccio",
|
2019-08-04 16:40:45 +07:00
|
|
|
"jsx-a11y",
|
2019-08-11 12:24:54 +07:00
|
|
|
"codeceptjs",
|
|
|
|
"react-hooks"
|
2019-06-20 19:37:28 +07:00
|
|
|
],
|
2019-02-03 17:23:33 +07:00
|
|
|
"settings": {
|
|
|
|
"react": {
|
2019-06-20 19:37:28 +07:00
|
|
|
"version": "detect"
|
2019-02-03 17:23:33 +07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"parserOptions": {
|
|
|
|
"ecmaFeatures": {
|
|
|
|
"jsx": true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"rules": {
|
2019-06-20 19:37:28 +07:00
|
|
|
"babel/no-invalid-this": 0,
|
|
|
|
"no-invalid-this": 0,
|
|
|
|
"no-console": ["error", { "allow": ["warn", "error"] }],
|
|
|
|
"prettier/prettier": "error",
|
|
|
|
"@typescript-eslint/no-var-requires": 0,
|
|
|
|
"@typescript-eslint/indent": 0,
|
|
|
|
"@typescript-eslint/explicit-member-accessibility": ["warn",
|
|
|
|
{
|
|
|
|
"accessibility": "explicit",
|
|
|
|
"overrides": {
|
|
|
|
"constructors": "off"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"@typescript-eslint/explicit-function-return-type": ["warn",
|
|
|
|
{
|
|
|
|
"allowExpressions": true,
|
|
|
|
"allowTypedFunctionExpressions": true
|
|
|
|
}],
|
2019-02-03 17:23:33 +07:00
|
|
|
"react/no-deprecated": 1,
|
|
|
|
"react/jsx-no-target-blank": 1,
|
|
|
|
"react/destructuring-assignment": ["error", "always"],
|
|
|
|
"react/forbid-component-props": ["warn", { "forbid": ["style"] }],
|
|
|
|
"react/no-this-in-sfc": ["warn"],
|
|
|
|
"react/no-unsafe": ["warn"],
|
|
|
|
"react/sort-comp": ["warn", {
|
|
|
|
"order": [
|
|
|
|
"static-methods",
|
|
|
|
"lifecycle",
|
|
|
|
"render",
|
|
|
|
"everything-else",
|
|
|
|
"/^on.+$/",
|
|
|
|
"/^render.+$/"
|
|
|
|
]
|
|
|
|
}],
|
|
|
|
"react/void-dom-elements-no-children": ["warn"],
|
|
|
|
"react/no-did-mount-set-state": ["error", "disallow-in-func"],
|
|
|
|
"react/jsx-wrap-multilines": ["error",{
|
|
|
|
"declaration": "parens",
|
|
|
|
"assignment": "parens",
|
|
|
|
"return": "parens",
|
|
|
|
"arrow": "parens",
|
|
|
|
"condition": "parens",
|
|
|
|
"logical": "parens",
|
|
|
|
"prop": "parens"
|
|
|
|
}],
|
|
|
|
"react/jsx-boolean-value": ["error", "always"],
|
|
|
|
"react/jsx-closing-tag-location": ["error"],
|
|
|
|
"react/jsx-curly-spacing": ["error", "never"],
|
|
|
|
"react/jsx-equals-spacing": ["error", "never"],
|
|
|
|
"react/jsx-first-prop-new-line": ["error", "multiline-multiprop"],
|
|
|
|
"react/jsx-handler-names": ["warn"],
|
|
|
|
"react/jsx-indent": ["error", 2],
|
|
|
|
"react/jsx-indent-props": ["error", 2],
|
|
|
|
"react/jsx-key": ["error"],
|
|
|
|
"react/jsx-max-depth": ["error", { "max": 2}],
|
|
|
|
"react/jsx-max-props-per-line": ["error", {"maximum": 3, "when": "multiline" }],
|
|
|
|
"react/jsx-no-bind": ["error"],
|
|
|
|
"react/jsx-no-comment-textnodes": ["error"],
|
|
|
|
"react/jsx-no-duplicate-props": ["error"],
|
|
|
|
"react/jsx-no-literals": ["error"],
|
|
|
|
"react/jsx-no-undef": ["error"],
|
2019-06-20 19:37:28 +07:00
|
|
|
"react/prop-types": 0,
|
2019-02-03 17:23:33 +07:00
|
|
|
"react/jsx-one-expression-per-line": ["error", {"allow": "single-child"}],
|
2019-06-20 19:37:28 +07:00
|
|
|
"react/jsx-curly-brace-presence": ["warn", { "props": "ignore", "children": "ignore" }],
|
2019-02-03 17:23:33 +07:00
|
|
|
"react/jsx-pascal-case": ["error"],
|
|
|
|
"react/jsx-props-no-multi-spaces": ["error"],
|
|
|
|
"react/jsx-sort-default-props": ["error"],
|
|
|
|
"react/jsx-sort-props": ["error"],
|
|
|
|
"react/no-string-refs": ["error"],
|
|
|
|
"react/no-danger-with-children": ["error"],
|
|
|
|
"react/jsx-tag-spacing": ["error", {
|
|
|
|
"closingSlash": "never",
|
|
|
|
"beforeSelfClosing": "always",
|
|
|
|
"afterOpening": "allow-multiline",
|
|
|
|
"beforeClosing": "allow"
|
|
|
|
}],
|
|
|
|
"react/prefer-es6-class": [
|
|
|
|
2,
|
|
|
|
"always"
|
|
|
|
],
|
2019-08-11 12:24:54 +07:00
|
|
|
"react-hooks/rules-of-hooks": "error",
|
|
|
|
"react-hooks/exhaustive-deps": "warn",
|
2019-02-03 17:23:33 +07:00
|
|
|
"verdaccio/jsx-no-style": ["warn"],
|
|
|
|
"verdaccio/jsx-spread": ["warn"],
|
2019-06-20 19:37:28 +07:00
|
|
|
"jest/expect-expect": 0,
|
|
|
|
"quote-props":["error", "as-needed"],
|
|
|
|
"max-len": ["error", 160],
|
|
|
|
"prefer-spread": 1,
|
|
|
|
"linebreak-style": 0
|
|
|
|
},
|
|
|
|
"globals": {
|
|
|
|
"__DEBUG__": true
|
|
|
|
},
|
|
|
|
"env": {
|
|
|
|
"browser": true,
|
2019-08-04 16:40:45 +07:00
|
|
|
"jest/globals": true,
|
|
|
|
"codeceptjs/codeceptjs": true,
|
2019-02-03 17:23:33 +07:00
|
|
|
}
|
|
|
|
}
|