I am trying to add eslint to my typescript create-react-app
application.
I am using Visual Studio Code.
I did :
- Download Eslint package in visual code
- Download Eslint package
- I installed 3 eslint plugin
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
- Create an
.eslintrc
file that look like this in the app's root folder
{
"plugins": [
"react"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"settings": {
"import/resolver": {
"node": {},
"babel-module": {
"root": ["./src"]
}
}
}
}
- Started eslint and restart vs code
Now, I try to do some linting problem like trailing spaces or not pascalCase, but I never get warned by Eslint, I only see typescript errors, but never some linting issues like.
Is there some additional configuration to do to make it work on my workspace ?