port custom eslint rules

This commit is contained in:
dwelle 2023-09-04 00:43:22 +02:00
parent 07897a2174
commit d77627fbcf
1 changed files with 36 additions and 8 deletions

View File

@ -1,15 +1,43 @@
{
"extends": [
"plugin:react-hooks/recommended"
],
"extends": ["plugin:react-hooks/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": [
"react",
"@typescript-eslint"
],
"plugins": ["react", "@typescript-eslint"],
"root": true,
"rules": {
"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"
}
}