Skip to content

Commit c65f798

Browse files
committed
chore(config): add .eslintignore file and update ESLint rules for better compatibility with project structure and coding practices
1 parent 07f7295 commit c65f798

File tree

4 files changed

+927
-675
lines changed

4 files changed

+927
-675
lines changed

.eslintignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dist/
2+
node_modules/
3+
build/
4+
*.config.js
5+
*.config.ts
6+
.eslintrc.cjs
7+
vite.config.ts
8+
tailwind.config.js
9+
postcss.config.js

.eslintrc.cjs

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,45 @@ module.exports = {
66
parser: "@typescript-eslint/parser",
77
plugins: ["react-refresh"],
88
rules: {
9+
// Disable prettier conflicts
910
"prettier/prettier": "off",
11+
12+
// React refresh warnings only
1013
"react-refresh/only-export-components": [
1114
"warn",
1215
{ allowConstantExport: true },
1316
],
14-
"import-helpers/order-imports": [
15-
"warn",
16-
{
17-
newlinesBetween: "always",
18-
groups: [
19-
"module",
20-
"/^@/components/",
21-
"/^@/contexts/",
22-
"/^@/layout/",
23-
"/^@/lib/",
24-
"/^@/pages/",
25-
"/^@/routes/",
26-
"/^@/services/",
27-
"/^@/types/",
28-
"/^@/utils/",
29-
["parent", "sibling", "index"],
30-
],
31-
alphabetize: { order: "asc", ignoreCase: true },
32-
},
17+
18+
// Allow any type (common in this codebase)
19+
"@typescript-eslint/no-explicit-any": "off",
20+
21+
// Allow unused variables starting with _
22+
"@typescript-eslint/no-unused-vars": [
23+
"error",
24+
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" }
3325
],
26+
27+
// Disable strict import rules that cause issues
28+
"import/no-duplicates": "off",
29+
"import/first": "off",
30+
"import-helpers/order-imports": "off",
31+
32+
// Allow missing dependencies in useEffect (common pattern)
33+
"react-hooks/exhaustive-deps": "warn",
34+
35+
// Allow case declarations
36+
"no-case-declarations": "off",
37+
38+
// Allow unescaped entities in JSX
39+
"react/no-unescaped-entities": "off",
40+
41+
// Allow undefined React (auto-imported)
42+
"no-undef": "off",
43+
44+
// Allow unreachable code (sometimes intentional)
45+
"no-unreachable": "warn",
46+
47+
// Allow constant conditions (sometimes intentional)
48+
"no-constant-condition": "warn",
3449
},
3550
};

0 commit comments

Comments
 (0)