{ "env": { "browser": true, "es2021": true, "node": true }, // eslint插件的最佳实践,它配置的内容实际就是一份份别人配置好的.eslintrc.js。 "extends": [ "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "prettier" ], "parser": "@typescript-eslint/parser", // plugin插件主要是为eslint新增一些检查规则 "plugins": [ "eslint-plugin-react" ], "parserOptions": { "ecmaVersion": 12, "sourceType": "module", "ecmaFeatures": { "jsx": true } }, "rules": { "indent": [ "error", "tab" ], "linebreak-style": [ "error", "unix" ], "quotes": [ "error", "single" ], "semi": [ "error", "always" ], "react/display-name": "off", "no-var-requires":"off", "react/prop-types":"off" } }