115 lines
2.8 KiB
JSON
115 lines
2.8 KiB
JSON
{
|
|
"root": true,
|
|
"parser": "@typescript-eslint/parser",
|
|
"plugins": [
|
|
"@typescript-eslint"
|
|
],
|
|
"settings": {
|
|
"react": {
|
|
"version": "18.2.0"
|
|
}
|
|
},
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"plugin:@typescript-eslint/eslint-recommended",
|
|
"plugin:@typescript-eslint/recommended",
|
|
"plugin:@next/next/recommended",
|
|
"plugin:react/recommended",
|
|
"plugin:react/jsx-runtime",
|
|
"plugin:react-hooks/recommended"
|
|
],
|
|
"rules": {
|
|
"indent": [
|
|
"error",
|
|
"tab",
|
|
{"SwitchCase": 1}
|
|
],
|
|
"quotes": [
|
|
"error",
|
|
"double"
|
|
],
|
|
"semi": "error",
|
|
"no-console": "warn",
|
|
"no-debugger": "error",
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
"argsIgnorePattern": "^_",
|
|
"varsIgnorePattern": "^_"
|
|
}
|
|
],
|
|
"@typescript-eslint/no-explicit-any": "error",
|
|
"@typescript-eslint/explicit-function-return-type": [
|
|
"error",
|
|
{
|
|
"allowExpressions": true,
|
|
"allowTypedFunctionExpressions": true
|
|
}
|
|
],
|
|
"@typescript-eslint/no-non-null-assertion": "error",
|
|
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
"@typescript-eslint/naming-convention": [
|
|
"error",
|
|
{
|
|
"selector": "interface",
|
|
"format": ["PascalCase"],
|
|
"prefix": ["I"]
|
|
},
|
|
{
|
|
"selector": "typeAlias",
|
|
"format": ["PascalCase"]
|
|
}
|
|
],
|
|
"react/prop-types": "off",
|
|
"react/react-in-jsx-scope": "off",
|
|
"react-hooks/rules-of-hooks": "error",
|
|
"react-hooks/exhaustive-deps": "warn",
|
|
"no-var": "error",
|
|
"prefer-const": "error",
|
|
"prefer-arrow-callback": "error",
|
|
"no-trailing-spaces": "error",
|
|
"eol-last": ["error", "always"],
|
|
"object-curly-spacing": ["error", "always"],
|
|
"array-bracket-spacing": ["error", "never"],
|
|
"comma-dangle": ["error", "never"],
|
|
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
|
|
"arrow-spacing": ["error", { "before": true, "after": true }],
|
|
"keyword-spacing": ["error", { "before": true, "after": true }],
|
|
"max-len": [
|
|
"error",
|
|
{
|
|
"code": 120,
|
|
"tabWidth": 4,
|
|
"ignoreUrls": true,
|
|
"ignoreStrings": true,
|
|
"ignoreTemplateLiterals": true,
|
|
"ignoreRegExpLiterals": true,
|
|
"ignoreComments": false
|
|
}
|
|
],
|
|
"max-lines": [
|
|
"error",
|
|
{
|
|
"max": 300,
|
|
"skipBlankLines": true,
|
|
"skipComments": true
|
|
}
|
|
],
|
|
"max-lines-per-function": [
|
|
"error",
|
|
{
|
|
"max": 50,
|
|
"skipBlankLines": true,
|
|
"skipComments": true,
|
|
"IIFEs": true
|
|
}
|
|
],
|
|
"complexity": ["error", 10],
|
|
"max-depth": ["error", 4],
|
|
"max-params": ["error", 4],
|
|
"max-nested-callbacks": ["error", 3],
|
|
"max-statements": ["error", 20, { "ignoreTopLevelFunctions": false }]
|
|
}
|
|
}
|