Home  >  Article  >  Web Front-end  >  How to delete eslint in react

How to delete eslint in react

藏色散人
藏色散人Original
2022-12-30 09:46:322398browse

How to delete eslint in react: 1. Execute the "npm run eject" command; 2. Modify the code in package.json to ""eslintConfig": {"extends": ["react-app"," react-app/jest"],"rules": {"no-undef": "off"...}"; 3. Restart the project.

How to delete eslint in react

#The operating environment of this tutorial: Windows 10 system, react17 version, Dell G3 computer.

How to delete eslint in react?

React turns off Eslint code inspection

1. npm run eject

2. Modify the code in package.json

 "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ],
    "rules": {
      "no-undef": "off",
      "no-restricted-globals": "off",
      "no-unused-vars": "off"
    }
  },

3. Restart Project

Recommended learning: "react video tutorial"

The above is the detailed content of How to delete eslint in react. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn