webserver-framework-frontend/.eslintrc.json
2024-05-01 16:57:32 +03:00

109 lines
2.8 KiB
JSON

{
"env": {
"node": true,
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"react",
"react-hooks"
],
"rules": {
"nonblock-statement-body-position": [
"warn",
"below"
],
"brace-style": [
"warn",
"allman"
],
"indent": ["warn", 4, {
"SwitchCase": 1,
"VariableDeclarator": "first",
"FunctionDeclaration": {"parameters": "first"},
"CallExpression": {"arguments": "first"},
"ArrayExpression": "first",
"ObjectExpression": "first",
"ImportDeclaration": "first"
}],
"no-warning-comments": [1, {
"terms": ["todo", "fixme"]
}],
"no-multi-spaces": ["warn", {"ignoreEOLComments": true, "exceptions": {"ImportDeclaration": true}}],
"prefer-arrow-callback": "warn",
"prefer-const": "warn",
"prefer-destructuring": "warn",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "warn",
"prefer-regex-literals": "warn",
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"semi": "error",
"semi-spacing": "warn",
"semi-style": [
"warn",
"last"
],
"object-curly-spacing": [
"warn",
"always"
],
"array-bracket-newline": [
"warn",
"consistent"
],
"array-bracket-spacing": [
"warn",
"always",
{
"objectsInArrays": false,
"arraysInArrays": false
}
],
"comma-spacing": [
"warn",
{
"after": true,
"before": false
}
],
"comma-style": "warn",
"no-console": "warn",
"no-constant-binary-expression": "error",
"no-trailing-spaces": "warn",
"no-tabs": "error",
"quotes": ["error" , "single"],
"jsx-quotes": [
"error",
"prefer-single"
],
"key-spacing": [
"warn",
{
"beforeColon": false,
"afterColon": true,
"align": "value"
}
],
"guard-for-in": "warn",
"yoda": [
"warn",
"never"
],
"wrap-regex": "error"
}
}