I'm working on a Vite + React + TypeScript project and using ESLint with the following configuration:
Relevant ESLint Config (.eslintrc.json)
{
"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" }
}
}
}
When I run ESLint (eslint . --ext .ts,.tsx
), I get no errors, but some of my teammates (who are on Windows) see multiple linting errors.
Me: macOS (No ESLint errors)
Teammates: Windows (Seeing ESLint errors)
Could this be an issue with path resolution, line endings (LF
vs. CRLF
), or case sensitivity? Any insights would be helpful!
Ensured all teammates have the same node_modules
and eslint
version.
Deleted node_modules
and package-lock.json
, then reinstalled (npm install
).
Checked global ESLint settings (disabled global ESLint).
Using VS Code with only ESLint and Prettier enabled.
Running ESLint manually (outside VS Code).
try using this on your package.json
"lint": "tsc --noEmit && eslint \"src/**/*.{ts,tsx}\" --cache --max-warnings=0",