Starting a new application, I installed eslint and configured it with the following configs, but every time I create an enum
it says it had already been defined. Even nonsense strings. Other variable types (const, var, let) don't have this issue. I could disable the rule but I would like it applied for situations where it is actually true.
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"parserOptions": {
"project": ["./tsconfig.json"],
"ecmaFeatures": {
"ecmaVersion": 6,
"jsx": true
}
},
"overrides": [],
"extends": [
"airbnb-typescript",
"prettier",
"prettier/@typescript-eslint",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"rules": {
"spaced-comment": 0,
"import/prefer-default-export": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/restrict-template-expressions": [
1,
{ "allowBoolean": true }
],
"react/jsx-props-no-spreading": "off",
"react/state-in-constructor": 0,
"react/require-default-props": 0,
"react/destructuring-assignment": [
1,
"always",
{
"ignoreClassFields": true
}
]
}
}