hotkeys/.eslintrc.json
2023-09-29 17:45:29 +02:00

192 lines
4.0 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",
{
"additionalHooks": ""
}
],
// 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"
]
}
],
"no-return-assign": [
"error",
"except-parens"
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*",
"src/pages/!(api)/**/*.tsx",
"src/pages/**/*.tsx",
"src/!(pages|models|app)/**/*.(tsx|ts)"
]
}
],
"react/destructuring-assignment": [
"error",
"always",
{
"ignoreClassFields": true
}
],
"react/state-in-constructor": [
"error",
"never"
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "all",
"ignoreRestSiblings": false,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"import/no-cycle": [
"error",
{
"maxDepth": 1
}
],
"no-promise-executor-return": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"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/interactive-supports-focus": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/label-has-associated-control": "off",
"react/require-default-props": "off"
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"typescript": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
},
"node": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
],
"moduleDirectory": [
"node_modules",
"src/"
]
}
}
},
"globals": {
}
}