slate/.eslintrc.js

59 lines
1.2 KiB
JavaScript
Raw Normal View History

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",
"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"],
},
],
"prefer-destructuring": [
"error",
{
VariableDeclarator: {
array: false,
object: true,
},
AssignmentExpression: {
array: false,
object: false,
},
},
{
enforceForRenamedProperties: false,
},
],
2021-02-12 15:31:58 +03:00
},
};