我的 root 里面有一些规则.eslintrc.json。这是文件。
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx", "react", "@typescript-eslint", "prettier"],
"extends": [
"plugin:react/recommended",
"google",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"camelcase": "off",
"prettier/prettier": 0,
"no-unused-vars": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"require-jsdoc": 0,
"no-invalid-this": 0,
"valid-jsdoc": 0,
"indent": "off",
"linebreak-style": "off",
"object-curly-spacing": 0,
"quotes": ["error", "single"],
"semi": ["error", "always"],
"operator-linebreak": [
"error",
"after",
{ "overrides": { "?": "before", ":": "before" } }
],
// React
"react/prop-types": 0,
"react/react-in-jsx-scope": 0, // NEXT dynamic imports …Run Code Online (Sandbox Code Playgroud)