safe-react/.eslintrc

113 lines
2.5 KiB
Plaintext
Raw Normal View History

{
"settings": {
"react": {
"flowVersion": "0.112.0",
"pragma": "React",
"version": "16.12.0"
},
"import/extensions": [".js", ".jsx"]
},
"parser": "babel-eslint",
"plugins": ["react", "flowtype", "import", "jsx-a11y", "sort-destructure-keys", "prettier"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:flowtype/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
"prettier/react",
"prettier/flowtype"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"amd": true,
"node": true,
"es6": true
},
"rules": {
"class-methods-use-this": 0,
"max-len": [
"error",
120,
2,
{
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreUrls": true
}
],
"no-console": [
"error",
{
"allow": ["warn", "error"]
}
],
"semi": ["error", "never"],
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true
}
],
"flowtype/require-valid-file-annotation": [
2018-03-08 16:26:18 +00:00
2,
2019-07-11 10:13:26 +00:00
"always",
{
"annotationStyle": "line"
2018-03-08 16:26:18 +00:00
}
],
"import/extensions": 0,
"import/no-extraneous-dependencies": 0,
"import/no-unresolved": 0,
"import/order": [
"error",
{
"groups": ["builtin", "external", "parent", "sibling", "index"],
"newlines-between": "always",
"alphabetize": {
"order": "asc"
}
}
],
"import/prefer-default-export": 0,
2019-07-11 10:13:26 +00:00
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["to", "hrefLeft", "hrefRight"],
"aspects": ["noHref", "invalidHref", "preferButton"]
}
],
"react/default-props-match-prop-types": ["error", { "allowRequiredDefaults": true }],
"react/forbid-prop-types": [
1,
{
"forbid": ["object", "any"]
2019-07-11 10:13:26 +00:00
}
],
2019-08-28 14:25:18 +00:00
"react/no-array-index-key": 0,
"react/require-default-props": 0,
"react/state-in-constructor": 0,
"react/jsx-filename-extension": [
1,
{
"extensions": [".js", ".jsx"]
}
],
2019-09-20 12:04:35 +00:00
"react/jsx-props-no-spreading": 0,
"react/jsx-sort-props": 2,
"prettier/prettier": "error",
"jsx-a11y/no-autofocus": "warn",
"sort-destructure-keys/sort-destructure-keys": 2
}
}