Files
Vectrace/eslint.config.js
T
2026-06-29 09:40:34 +02:00

76 lines
2.4 KiB
JavaScript

import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import stylistic from "@stylistic/eslint-plugin";
import styledComponentsA11y from "eslint-plugin-styled-components-a11y";
/** @type {import('eslint').Linter.Config[]} */
export default [
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
{
settings: {
react: {
version: "detect"
}
}
},
{
plugins: {
"@stylistic": stylistic,
"styled-components-a11y": styledComponentsA11y
},
rules: {
"react/react-in-jsx-scope": "off",
"no-trailing-spaces": "warn",
"semi": ["warn", "always"],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-misused-new": "off",
"@stylistic/linebreak-style": ["error", "unix"],
"camelcase": "warn",
"max-len": ["warn", { "code": 150 }],
"radix": [
"error",
],
"quotes": [
"warn",
"double",
{ allowTemplateLiterals: true, avoidEscape: true },
],
"indent": ["warn", 4,
{
"SwitchCase": 1,
"VariableDeclarator": 1,
"outerIIFEBody": 1,
"MemberExpression": 1,
"FunctionDeclaration": { "parameters": "first", "body": 1 },
"FunctionExpression": { "parameters": "first", "body": 1 }
}
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
]
}
}
];