I am trying to integrate linting into an app created using CRA which uses typescript.
Steps to reproduce on terminal
create-react-app my-app --typescript./node_modules/.bin/eslint --init- select : To check syntax, find problems, and enforce code style
- select : JavaScript modules (import/export)
- select : React
- y for does your project use typescript
- select : Browser
- Popular style guide used is airbnb
My .eslintrc json file looks like the following
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"airbnb"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
"semi":"warn"
}
}
I usually check if the lint works by removing semi colon to see if vs code highlights.
However it does not happen.