Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99401

Eslint is not working in my react application

$
0
0

I am trying to add eslint to my typescript create-react-app application. I am using Visual Studio Code.

I did :

  1. Download Eslint package in visual code
  2. Download Eslint package
  3. I installed 3 eslint plugin
"eslint:recommended", 
    "plugin:@typescript-eslint/recommended",
    "plugin:react/recommended"
  1. 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"]
      }
    }
  }
}
  1. 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 ?


Viewing all articles
Browse latest Browse all 99401

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>