port custom eslint rules

This commit is contained in:
dwelle 2023-09-04 00:43:22 +02:00
parent 07897a2174
commit d77627fbcf

View File

@ -1,15 +1,43 @@
{ {
"extends": [ "extends": ["plugin:react-hooks/recommended"],
"plugin:react-hooks/recommended"
],
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"plugins": [ "plugins": ["react", "@typescript-eslint"],
"react",
"@typescript-eslint"
],
"root": true, "root": true,
"rules": { "rules": {
"import/no-anonymous-default-export": "off", "import/no-anonymous-default-export": "off",
"no-restricted-globals": "off" "no-restricted-globals": "off",
"@typescript-eslint/no-unused-vars": "warn",
"curly": "warn",
"dot-notation": "warn",
"no-console": [
"warn",
{
"allow": ["warn", "error", "info"]
}
],
"no-else-return": "warn",
"no-lonely-if": "warn",
"no-restricted-syntax": [
"warn",
{
"message": "Use 't(...)' instead of literal text in JSX",
"selector": "JSXText[value=/\\w/]"
}
],
"no-unneeded-ternary": "warn",
"no-unused-expressions": "warn",
"no-unused-vars": "off",
"no-useless-return": "warn",
"no-var": "warn",
"object-shorthand": "warn",
"one-var": ["warn", "never"],
"prefer-arrow-callback": "warn",
"prefer-const": [
"warn",
{
"destructuring": "all"
}
],
"prefer-template": "warn"
} }
} }