143 lines
3.1 KiB
JSON
143 lines
3.1 KiB
JSON
{
|
|
"env": {
|
|
"browser": true,
|
|
"es6": true
|
|
},
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"plugin:react/recommended",
|
|
"airbnb",
|
|
"plugin:@typescript-eslint/recommended",
|
|
"prettier",
|
|
"prettier/prettier",
|
|
"plugin:import/typescript"
|
|
],
|
|
"parser": "@typescript-eslint/parser",
|
|
"parserOptions": {
|
|
"ecmaFeatures": {
|
|
"experimentalObjectRestSpread": true,
|
|
"jsx": true
|
|
},
|
|
"ecmaVersion": 9,
|
|
"sourceType": "module",
|
|
"project": "./tsconfig.json"
|
|
},
|
|
"plugins": [
|
|
"react",
|
|
"@typescript-eslint",
|
|
"react-hooks"
|
|
],
|
|
"rules": {
|
|
"linebreak-style": [
|
|
"error",
|
|
"unix"
|
|
],
|
|
"semi": [
|
|
"error",
|
|
"always"
|
|
],
|
|
"react/jsx-uses-react": [
|
|
"error"
|
|
],
|
|
"react/jsx-uses-vars": [
|
|
"error"
|
|
],
|
|
"react-hooks/rules-of-hooks": "error",
|
|
// Checks rules of Hooks
|
|
"react-hooks/exhaustive-deps": "warn",
|
|
// Checks effect dependencies
|
|
"react/jsx-filename-extension": [
|
|
"warn",
|
|
{
|
|
"extensions": [
|
|
".tsx"
|
|
]
|
|
}
|
|
],
|
|
"import/extensions": [
|
|
"error",
|
|
"ignorePackages",
|
|
{
|
|
"js": "never",
|
|
"jsx": "never",
|
|
"ts": "never",
|
|
"tsx": "never"
|
|
}
|
|
],
|
|
"no-shadow": "off",
|
|
"@typescript-eslint/no-shadow": [
|
|
"error"
|
|
],
|
|
"lines-between-class-members": [
|
|
"warn",
|
|
"always",
|
|
{
|
|
"exceptAfterSingleLine": true
|
|
}
|
|
],
|
|
"react/sort-comp": ["warn", {
|
|
"order": [
|
|
"static-variables",
|
|
"instance-variables",
|
|
"static-methods",
|
|
"lifecycle",
|
|
"render",
|
|
"/^render.+$/",
|
|
"instance-methods",
|
|
"everything-else"
|
|
]
|
|
}],
|
|
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["src/client/**/*.tsx", "src/client/**/*.ts"]}],
|
|
"react/destructuring-assignment": ["error", "always", { "ignoreClassFields": true }],
|
|
"react/state-in-constructor": ["error", "never"],
|
|
|
|
|
|
"no-return-assign": ["error", "except-parens"],
|
|
"@typescript-eslint/no-unused-vars": ["error"],
|
|
"no-console": "off",
|
|
"no-use-before-define": "off",
|
|
"@typescript-eslint/no-use-before-define": "off",
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"import/order": "off",
|
|
"import/prefer-default-export": "off",
|
|
"react/prop-types": "off",
|
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
"react/jsx-props-no-spreading": "off",
|
|
"react/jsx-boolean-value": "off",
|
|
"no-plusplus": "off",
|
|
"no-param-reassign": "off",
|
|
"default-case": "off",
|
|
"jsx-a11y/click-events-have-key-events": "off"
|
|
},
|
|
"settings": {
|
|
"react": {
|
|
"version": "detect"
|
|
},
|
|
"import/resolver": {
|
|
"typescript": {
|
|
"extensions": [
|
|
".js",
|
|
".jsx",
|
|
".ts",
|
|
".tsx"
|
|
]
|
|
},
|
|
"node": {
|
|
"extensions": [
|
|
".js",
|
|
".jsx",
|
|
".ts",
|
|
".tsx"
|
|
],
|
|
"moduleDirectory": [
|
|
"node_modules",
|
|
"src/"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"globals": {
|
|
}
|
|
}
|