@yasainet/eslint 0.0.42 → 0.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/common/rules.mjs +10 -0
- package/src/next/index.mjs +6 -0
package/package.json
CHANGED
package/src/common/rules.mjs
CHANGED
|
@@ -42,6 +42,12 @@ export const rulesConfigs = [
|
|
|
42
42
|
files: ["**/*.ts", "**/*.tsx"],
|
|
43
43
|
languageOptions: {
|
|
44
44
|
parser: tseslint.parser,
|
|
45
|
+
// Enable type-aware linting so rules like `no-unnecessary-condition`
|
|
46
|
+
// can consult the TypeScript type checker.
|
|
47
|
+
parserOptions: {
|
|
48
|
+
projectService: true,
|
|
49
|
+
tsconfigRootDir: process.cwd(),
|
|
50
|
+
},
|
|
45
51
|
},
|
|
46
52
|
plugins: {
|
|
47
53
|
"@typescript-eslint": tseslint.plugin,
|
|
@@ -60,6 +66,10 @@ export const rulesConfigs = [
|
|
|
60
66
|
{ prefer: "type-imports" },
|
|
61
67
|
],
|
|
62
68
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
69
|
+
// Detect defensive fallbacks on non-nullable values (e.g., `?? ''`
|
|
70
|
+
// on a non-null column). Kept at warn until existing violations are
|
|
71
|
+
// cleaned up across consuming projects; promote to error afterwards.
|
|
72
|
+
"@typescript-eslint/no-unnecessary-condition": "warn",
|
|
63
73
|
},
|
|
64
74
|
},
|
|
65
75
|
];
|
package/src/next/index.mjs
CHANGED
|
@@ -12,6 +12,12 @@ const nextEntryPointConfigs = createEntryPointConfigs(
|
|
|
12
12
|
|
|
13
13
|
/** Next.js ESLint flat config entry point. */
|
|
14
14
|
export const eslintConfig = [
|
|
15
|
+
// shadcn/ui generated components live directly under `src/components/shared/ui/`.
|
|
16
|
+
// Files in `custom/` are user-authored and remain linted.
|
|
17
|
+
{
|
|
18
|
+
name: "rules/ignore-shadcn-ui",
|
|
19
|
+
ignores: ["src/components/shared/ui/*.{ts,tsx}"],
|
|
20
|
+
},
|
|
15
21
|
...createCommonConfigs("src/features"),
|
|
16
22
|
...libBoundaryConfigs,
|
|
17
23
|
...pageBoundaryConfigs,
|