@yasainet/eslint 0.0.43 → 0.0.45

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yasainet/eslint",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "description": "ESLint",
5
5
  "type": "module",
6
6
  "exports": {
@@ -107,10 +107,21 @@ export const featureNameRule = {
107
107
  if (!featureName) return {};
108
108
 
109
109
  const projectRoot = filename.slice(0, rootIdx).replace(/\/src$/, "");
110
- const supabaseTypePath = path.join(
110
+ // Prefer the Supabase types file adjacent to `featureRoot` (e.g. `src/lib/...`
111
+ // for `src/features`). Fall back to `src/lib/...` at the project root so that
112
+ // non-`src` feature roots (e.g. `scripts/features`) can reuse the same
113
+ // generated types without duplicating the file.
114
+ const computedTypePath = path.join(
111
115
  projectRoot,
112
116
  featureRoot.replace(/features$/, "lib/supabase/supabase.type.ts"),
113
117
  );
118
+ const fallbackTypePath = path.join(
119
+ projectRoot,
120
+ "src/lib/supabase/supabase.type.ts",
121
+ );
122
+ const supabaseTypePath = fs.existsSync(computedTypePath)
123
+ ? computedTypePath
124
+ : fallbackTypePath;
114
125
 
115
126
  const tableNames = extractTableNames(supabaseTypePath);
116
127
  const allowedNames = ["shared", "auth", ...tableNames.map(toKebab)];
@@ -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,