I want to use an enum in my app :
export const enum typeEnum {
TVY = 'TVY',
USER = 'USER',
}
At npm run webpack:build, I get the following error :
12:111 error 'typeEnum' is already declared in the upper scope no-shadow
I read on several link relative to this error that the solution was to add the following to the eslint rules :
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error"
This is what I did, in the .eslintrc.json file :
{
"plugins": ["@typescript-eslint/tslint"],
"extends": ["jhipster"],
"parserOptions": {
"project": "./tsconfig.base.json"
},
"rules": {
"@typescript-eslint/tslint/config": [
"error",
{
"lintFile": "./tslint.json"
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}
],
"@typescript-eslint/no-non-null-assertion": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error"
}
}
But now, I get this error also at npm run:webpack:build :
myPath\src\main\webapp\app\vendor.ts [INFO] 1:1 error Definition for rule '@typescript-eslint/no-shadow' was not found @typescript-eslint/no-shadow
Do you know what I can do?
Thanks,
Manuela