{
"extends": [
"eslint:recommended",
"airbnb/hooks",
"airbnb-typescript",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/no-explicit-any": "off",
"import/order": [
"error",
{
"groups": [["external", "builtin"], "internal", "parent", "sibling", "index"],
"alphabetize": { "order": "asc", "caseInsensitive": true }
}
]
},
"settings": {
"import/resolver": {
"typescript": { "project": "./tsconfig.json" }
}
}
}
sissue:
当我运行Eslint(eslint . --ext .ts,.tsx
)时,我会遇到no错误Windows(查看ESLINT错误)
LF
vs.CRLF
我尝试的是:
确保所有队友都具有相同的node_modules
和eslint
版本。
node_modules
和
package-lock.json
,然后重新安装(npm install
)。
仅使用ESLINT和Prettier启用
VS代码。
手动运行ESLINT(外部与代码)。
一个愚蠢的问题
"lint": "tsc --noEmit && eslint \"src/**/*.{ts,tsx}\" --cache --max-warnings=0",