2021-02-12 15:31:58 +03:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
2021-02-24 22:14:19 +03:00
|
|
|
parser: "@babel/eslint-parser",
|
2021-02-12 15:31:58 +03:00
|
|
|
parserOptions: {
|
|
|
|
ecmaVersion: 12,
|
|
|
|
sourceType: "module",
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
version: "detect",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
node: true,
|
|
|
|
es2021: true,
|
|
|
|
},
|
|
|
|
extends: [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:react/recommended",
|
2021-02-12 15:38:07 +03:00
|
|
|
"plugin:react-hooks/recommended",
|
2021-02-12 15:31:58 +03:00
|
|
|
"plugin:jsx-a11y/recommended",
|
|
|
|
"plugin:prettier/recommended", // last item for prettier config to take priority
|
|
|
|
],
|
|
|
|
rules: {
|
|
|
|
"prettier/prettier": ["error", {}, { usePrettierrc: true }],
|
|
|
|
"react/react-in-jsx-scope": "off",
|
2021-02-17 19:05:30 +03:00
|
|
|
"react/prop-types": "off",
|
2021-02-24 19:53:52 +03:00
|
|
|
"react/display-name": "off",
|
2021-02-12 15:31:58 +03:00
|
|
|
"jsx-a11y/anchor-is-valid": [
|
|
|
|
"error",
|
|
|
|
{
|
2021-02-12 18:07:23 +03:00
|
|
|
components: ["Link"], // next.js rules
|
2021-02-12 15:31:58 +03:00
|
|
|
specialLink: ["hrefLeft", "hrefRight"],
|
|
|
|
aspects: ["invalidHref", "preferButton"],
|
|
|
|
},
|
|
|
|
],
|
2021-02-17 19:05:30 +03:00
|
|
|
"prefer-destructuring": [
|
|
|
|
"error",
|
|
|
|
{
|
2021-02-19 14:50:44 +03:00
|
|
|
VariableDeclarator: {
|
|
|
|
array: false,
|
|
|
|
object: true,
|
|
|
|
},
|
|
|
|
AssignmentExpression: {
|
|
|
|
array: false,
|
|
|
|
object: false,
|
|
|
|
},
|
2021-02-17 19:05:30 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
enforceForRenamedProperties: false,
|
|
|
|
},
|
|
|
|
],
|
2021-02-12 15:31:58 +03:00
|
|
|
},
|
|
|
|
};
|