@santi020k/eslint-config-lite 2.0.0-beta.3 → 2.1.0
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/CHANGELOG.md +30 -0
- package/README.md +1 -1
- package/dist/index.js +34 -15
- package/dist/tailwind.js +14 -14
- package/package.json +48 -47
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @santi020k/eslint-config-lite
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @santi020k/eslint-config-core@2.1.0
|
|
9
|
+
- @santi020k/eslint-config-typescript@2.1.0
|
|
10
|
+
|
|
11
|
+
## 2.0.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`dfba51d`](https://github.com/santi020k/eslint-config-basic/commit/dfba51dca7387a71a263af206eb86fd8df15f387) Thanks [@santi020k](https://github.com/santi020k)! - Improve config migration handling and enhance TypeScript options detection
|
|
16
|
+
|
|
17
|
+
- [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Add `@santi020k/eslint-config-lite` as an optional composer package for projects that want to install framework and integration config packages manually. The full `@santi020k/eslint-config-basic` package remains the recommended default install.
|
|
18
|
+
|
|
19
|
+
Expose integration composition helpers from `@santi020k/eslint-config-integrations` so the lite package can lazy-load integration configs only when selected.
|
|
20
|
+
|
|
21
|
+
Teach `basic-eslint doctor` to recognize lite configs and warn when detected frameworks or integrations are missing their manually installed config packages.
|
|
22
|
+
|
|
23
|
+
Add `basic-eslint doctor --lite-install` to print the detected package-manager install command for switching a project to the lite package, including framework config packages, integrations, ESLint, and TypeScript when needed.
|
|
24
|
+
|
|
25
|
+
Document package-choice metrics, a Basic-to-Lite migration recipe, and a lite-specific `Preset.All` warning.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`dfba51d`](https://github.com/santi020k/eslint-config-basic/commit/dfba51dca7387a71a263af206eb86fd8df15f387), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`59158db`](https://github.com/santi020k/eslint-config-basic/commit/59158dbc0b48de041062f4d0c75b1f7e3a1e779c), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`59158db`](https://github.com/santi020k/eslint-config-basic/commit/59158dbc0b48de041062f4d0c75b1f7e3a1e779c), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc)]:
|
|
30
|
+
- @santi020k/eslint-config-core@2.0.0
|
|
31
|
+
- @santi020k/eslint-config-typescript@2.0.0
|
|
32
|
+
|
|
3
33
|
## 2.0.0-beta.3
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Lite composer for projects that install framework and integration config package
|
|
|
4
4
|
|
|
5
5
|
This package is part of the [`@santi020k/eslint-config-basic`](https://github.com/santi020k/eslint-config-basic) monorepo.
|
|
6
6
|
|
|
7
|
-
- Docs: [Lite package](https://eslint.santi020k.com/packages/lite
|
|
7
|
+
- Docs: [Lite package](https://eslint.santi020k.com/packages/lite)
|
|
8
8
|
- Repository: [santi020k/eslint-config-basic](https://github.com/santi020k/eslint-config-basic)
|
|
9
9
|
- Author: [santi020k](https://santi020k.com)
|
|
10
10
|
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
createCoreConfig,
|
|
8
8
|
DEFAULT_IGNORES,
|
|
9
9
|
detectProjectOptions,
|
|
10
|
+
Extension,
|
|
10
11
|
findTailwindEntryPoint,
|
|
11
12
|
GENERATED_CODE_IGNORES,
|
|
12
13
|
getStrictMode,
|
|
@@ -63,7 +64,7 @@ import {
|
|
|
63
64
|
createCoreConfig as createCoreConfig2,
|
|
64
65
|
createImportGroups,
|
|
65
66
|
detectProjectOptions as detectProjectOptions2,
|
|
66
|
-
Extension,
|
|
67
|
+
Extension as Extension2,
|
|
67
68
|
Format,
|
|
68
69
|
getGlobalsForRuntime,
|
|
69
70
|
gitignore as gitignore2,
|
|
@@ -119,6 +120,28 @@ const applyLiteFrameworkImpliedDeps = (frameworks) => {
|
|
|
119
120
|
if (result.nuxt && !result.vue) result.vue = true;
|
|
120
121
|
return result;
|
|
121
122
|
};
|
|
123
|
+
const buildLiteTailwindResult = (options, entryPoint) => {
|
|
124
|
+
const result = {
|
|
125
|
+
detectComponentClasses: options.detectComponentClasses ?? true
|
|
126
|
+
};
|
|
127
|
+
if (entryPoint) result.entryPoint = entryPoint;
|
|
128
|
+
if (options.ignore?.length) result.ignore = options.ignore;
|
|
129
|
+
if (options.noUnknownClasses !== void 0) result.noUnknownClasses = options.noUnknownClasses;
|
|
130
|
+
return result;
|
|
131
|
+
};
|
|
132
|
+
const hasLiteTailwindSettings = (options, entryPoint) => {
|
|
133
|
+
if (entryPoint) return true;
|
|
134
|
+
if (options.detectComponentClasses !== void 0) return true;
|
|
135
|
+
if (options.ignore?.length) return true;
|
|
136
|
+
return options.noUnknownClasses !== void 0;
|
|
137
|
+
};
|
|
138
|
+
const resolveLiteTailwindOptions = (rootDir, tailwind, uniqueLibraries) => {
|
|
139
|
+
if (!uniqueLibraries.includes(Library.Tailwind)) return void 0;
|
|
140
|
+
const options = typeof tailwind === "object" ? tailwind : {};
|
|
141
|
+
const entryPoint = options.entryPoint ?? findTailwindEntryPoint(rootDir);
|
|
142
|
+
if (!hasLiteTailwindSettings(options, entryPoint)) return void 0;
|
|
143
|
+
return buildLiteTailwindResult(options, entryPoint);
|
|
144
|
+
};
|
|
122
145
|
const buildLiteIgnoresConfig = (useDefaultIgnores, useGeneratedCodeIgnores, useGitignore, optIgnores) => ({
|
|
123
146
|
defaultIgnores: useDefaultIgnores ? [{
|
|
124
147
|
ignores: [...DEFAULT_IGNORES, ...useGeneratedCodeIgnores ? GENERATED_CODE_IGNORES : []],
|
|
@@ -259,6 +282,14 @@ const buildLiteEslintConfigs = async (params) => {
|
|
|
259
282
|
rules: { "@next/next/no-html-link-for-pages": "off" }
|
|
260
283
|
}] : [],
|
|
261
284
|
...await getIntegrationConfigs(uniqueLibraries, uniqueTools, uniqueTesting, uniqueFormats, uniqueExtensions),
|
|
285
|
+
{
|
|
286
|
+
files: ["**/scripts/**/*.{js,mjs,cjs,ts,mts,cts}"],
|
|
287
|
+
name: "eslint-config-lite/scripts-overrides",
|
|
288
|
+
rules: {
|
|
289
|
+
"n/no-unpublished-import": "off",
|
|
290
|
+
...uniqueExtensions.includes(Extension.Security) ? { "security/detect-non-literal-fs-filename": "off" } : {}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
262
293
|
...tailwindSettingsConfig ? [tailwindSettingsConfig] : [],
|
|
263
294
|
...await getPrettierConfig(uniqueTools)
|
|
264
295
|
];
|
|
@@ -340,19 +371,7 @@ const eslintConfig = async (options) => {
|
|
|
340
371
|
const useGitignore = !uniqueSettings.includes(Setting.NoGitignore);
|
|
341
372
|
const useDefaultIgnores = !uniqueSettings.includes(Setting.NoDefaultIgnores);
|
|
342
373
|
const useGeneratedCodeIgnores = !uniqueSettings.includes(Setting.NoGeneratedCodeIgnores);
|
|
343
|
-
const tailwindOptions = (
|
|
344
|
-
if (!uniqueLibraries.includes(Library.Tailwind)) return void 0;
|
|
345
|
-
const opts = typeof optTailwind === "object" ? optTailwind : {};
|
|
346
|
-
const entryPoint = opts.entryPoint ?? findTailwindEntryPoint(rootDir);
|
|
347
|
-
const hasCustomConfig = entryPoint || opts.detectComponentClasses !== void 0 || opts.ignore?.length || opts.noUnknownClasses !== void 0;
|
|
348
|
-
if (!hasCustomConfig) return void 0;
|
|
349
|
-
return {
|
|
350
|
-
detectComponentClasses: opts.detectComponentClasses ?? true,
|
|
351
|
-
...entryPoint ? { entryPoint } : {},
|
|
352
|
-
...opts.ignore?.length ? { ignore: opts.ignore } : {},
|
|
353
|
-
...opts.noUnknownClasses === void 0 ? {} : { noUnknownClasses: opts.noUnknownClasses }
|
|
354
|
-
};
|
|
355
|
-
})();
|
|
374
|
+
const tailwindOptions = resolveLiteTailwindOptions(rootDir, optTailwind, uniqueLibraries);
|
|
356
375
|
const runtimeCoreConfig = runtime === Runtime.Universal ? coreConfig : createCoreConfig(runtime);
|
|
357
376
|
const { defaultIgnores, gitignoreConfig, userIgnores } = buildLiteIgnoresConfig(
|
|
358
377
|
useDefaultIgnores,
|
|
@@ -416,7 +435,7 @@ const eslintConfig = async (options) => {
|
|
|
416
435
|
};
|
|
417
436
|
const defineConfig = eslintConfig;
|
|
418
437
|
export {
|
|
419
|
-
Extension,
|
|
438
|
+
Extension2 as Extension,
|
|
420
439
|
Format,
|
|
421
440
|
Library2 as Library,
|
|
422
441
|
NextMode2 as NextMode,
|
package/dist/tailwind.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const
|
|
2
|
-
if (!tailwindOptions) return void 0;
|
|
3
|
-
const { noUnknownClasses, ...settingsOptions } = tailwindOptions;
|
|
1
|
+
const buildUnknownClassOptions = (tailwindOptions) => {
|
|
4
2
|
const unknownClassOptions = {};
|
|
5
3
|
if (tailwindOptions.entryPoint) unknownClassOptions.entryPoint = tailwindOptions.entryPoint;
|
|
6
4
|
if (tailwindOptions.ignore?.length) unknownClassOptions.ignore = tailwindOptions.ignore;
|
|
5
|
+
return unknownClassOptions;
|
|
6
|
+
};
|
|
7
|
+
const createNoUnknownClassesRule = (noUnknownClasses, unknownClassOptions) => {
|
|
7
8
|
const hasUnknownClassOptions = Object.keys(unknownClassOptions).length > 0;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
9
|
+
if (!hasUnknownClassOptions && noUnknownClasses === void 0) return void 0;
|
|
10
|
+
const severity = noUnknownClasses ?? "error";
|
|
11
|
+
if (severity === false) return "off";
|
|
12
|
+
return hasUnknownClassOptions ? [severity, unknownClassOptions] : severity;
|
|
13
|
+
};
|
|
14
|
+
const buildTailwindSettingsConfig = (tailwindOptions) => {
|
|
15
|
+
if (!tailwindOptions) return void 0;
|
|
16
|
+
const { noUnknownClasses, ...settingsOptions } = tailwindOptions;
|
|
17
|
+
const unknownClassOptions = buildUnknownClassOptions(tailwindOptions);
|
|
18
|
+
const noUnknownClassesRule = createNoUnknownClassesRule(noUnknownClasses, unknownClassOptions);
|
|
19
19
|
return {
|
|
20
20
|
name: "eslint-config-lite/tailwind-settings",
|
|
21
21
|
...noUnknownClassesRule === void 0 ? {} : { rules: { "better-tailwindcss/no-unknown-classes": noUnknownClassesRule } },
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@santi020k/eslint-config-lite",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
|
-
"access": "public"
|
|
5
|
+
"access": "public",
|
|
6
|
+
"provenance": true
|
|
6
7
|
},
|
|
7
8
|
"description": "Lite ESLint flat-config composer with manual framework and integration package installs.",
|
|
8
9
|
"type": "module",
|
|
@@ -23,58 +24,58 @@
|
|
|
23
24
|
],
|
|
24
25
|
"dependencies": {
|
|
25
26
|
"@typescript-eslint/utils": "^8.61.1",
|
|
26
|
-
"@santi020k/eslint-config-core": "^2.
|
|
27
|
-
"@santi020k/eslint-config-typescript": "^2.
|
|
27
|
+
"@santi020k/eslint-config-core": "^2.1.0",
|
|
28
|
+
"@santi020k/eslint-config-typescript": "^2.1.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@types/node": "^
|
|
31
|
+
"@types/node": "^26.0.0",
|
|
31
32
|
"publint": "^0.3.21",
|
|
32
33
|
"tsup": "^8.5.1",
|
|
33
34
|
"typescript": "^6.0.3",
|
|
34
|
-
"@santi020k/eslint-config-angular": "^2.
|
|
35
|
-
"@santi020k/eslint-config-astro": "^2.
|
|
36
|
-
"@santi020k/eslint-config-expo": "^2.
|
|
37
|
-
"@santi020k/eslint-config-hono": "^2.
|
|
38
|
-
"@santi020k/eslint-config-integrations": "^2.
|
|
39
|
-
"@santi020k/eslint-config-lit": "^2.
|
|
40
|
-
"@santi020k/eslint-config-nest": "^2.
|
|
41
|
-
"@santi020k/eslint-config-next": "^2.
|
|
42
|
-
"@santi020k/eslint-config-nuxt": "^2.
|
|
43
|
-
"@santi020k/eslint-config-preact": "^2.
|
|
44
|
-
"@santi020k/eslint-config-qwik": "^2.
|
|
45
|
-
"@santi020k/eslint-config-react": "^2.
|
|
46
|
-
"@santi020k/eslint-config-react-router": "^2.
|
|
47
|
-
"@santi020k/eslint-config-remix": "^2.
|
|
48
|
-
"@santi020k/eslint-config-slidev": "^2.
|
|
49
|
-
"@santi020k/eslint-config-solid": "^2.
|
|
50
|
-
"@santi020k/eslint-config-svelte": "^2.
|
|
51
|
-
"@santi020k/eslint-config-tanstack-start": "^2.
|
|
52
|
-
"@santi020k/eslint-config-vite": "^2.
|
|
53
|
-
"@santi020k/eslint-config-vue": "^2.
|
|
35
|
+
"@santi020k/eslint-config-angular": "^2.1.0",
|
|
36
|
+
"@santi020k/eslint-config-astro": "^2.1.0",
|
|
37
|
+
"@santi020k/eslint-config-expo": "^2.1.0",
|
|
38
|
+
"@santi020k/eslint-config-hono": "^2.1.0",
|
|
39
|
+
"@santi020k/eslint-config-integrations": "^2.1.0",
|
|
40
|
+
"@santi020k/eslint-config-lit": "^2.1.0",
|
|
41
|
+
"@santi020k/eslint-config-nest": "^2.1.0",
|
|
42
|
+
"@santi020k/eslint-config-next": "^2.1.0",
|
|
43
|
+
"@santi020k/eslint-config-nuxt": "^2.1.0",
|
|
44
|
+
"@santi020k/eslint-config-preact": "^2.1.0",
|
|
45
|
+
"@santi020k/eslint-config-qwik": "^2.1.0",
|
|
46
|
+
"@santi020k/eslint-config-react": "^2.1.0",
|
|
47
|
+
"@santi020k/eslint-config-react-router": "^2.1.0",
|
|
48
|
+
"@santi020k/eslint-config-remix": "^2.1.0",
|
|
49
|
+
"@santi020k/eslint-config-slidev": "^2.1.0",
|
|
50
|
+
"@santi020k/eslint-config-solid": "^2.1.0",
|
|
51
|
+
"@santi020k/eslint-config-svelte": "^2.1.0",
|
|
52
|
+
"@santi020k/eslint-config-tanstack-start": "^2.1.0",
|
|
53
|
+
"@santi020k/eslint-config-vite": "^2.1.0",
|
|
54
|
+
"@santi020k/eslint-config-vue": "^2.1.0"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
57
|
"eslint": "^10.0.0",
|
|
57
58
|
"typescript": ">=5.0.0",
|
|
58
|
-
"@santi020k/eslint-config-angular": "^2.
|
|
59
|
-
"@santi020k/eslint-config-astro": "^2.
|
|
60
|
-
"@santi020k/eslint-config-expo": "^2.
|
|
61
|
-
"@santi020k/eslint-config-hono": "^2.
|
|
62
|
-
"@santi020k/eslint-config-integrations": "^2.
|
|
63
|
-
"@santi020k/eslint-config-lit": "^2.
|
|
64
|
-
"@santi020k/eslint-config-nest": "^2.
|
|
65
|
-
"@santi020k/eslint-config-next": "^2.
|
|
66
|
-
"@santi020k/eslint-config-nuxt": "^2.
|
|
67
|
-
"@santi020k/eslint-config-preact": "^2.
|
|
68
|
-
"@santi020k/eslint-config-qwik": "^2.
|
|
69
|
-
"@santi020k/eslint-config-react": "^2.
|
|
70
|
-
"@santi020k/eslint-config-react-router": "^2.
|
|
71
|
-
"@santi020k/eslint-config-remix": "^2.
|
|
72
|
-
"@santi020k/eslint-config-slidev": "^2.
|
|
73
|
-
"@santi020k/eslint-config-solid": "^2.
|
|
74
|
-
"@santi020k/eslint-config-svelte": "^2.
|
|
75
|
-
"@santi020k/eslint-config-tanstack-start": "^2.
|
|
76
|
-
"@santi020k/eslint-config-vite": "^2.
|
|
77
|
-
"@santi020k/eslint-config-vue": "^2.
|
|
59
|
+
"@santi020k/eslint-config-angular": "^2.1.0",
|
|
60
|
+
"@santi020k/eslint-config-astro": "^2.1.0",
|
|
61
|
+
"@santi020k/eslint-config-expo": "^2.1.0",
|
|
62
|
+
"@santi020k/eslint-config-hono": "^2.1.0",
|
|
63
|
+
"@santi020k/eslint-config-integrations": "^2.1.0",
|
|
64
|
+
"@santi020k/eslint-config-lit": "^2.1.0",
|
|
65
|
+
"@santi020k/eslint-config-nest": "^2.1.0",
|
|
66
|
+
"@santi020k/eslint-config-next": "^2.1.0",
|
|
67
|
+
"@santi020k/eslint-config-nuxt": "^2.1.0",
|
|
68
|
+
"@santi020k/eslint-config-preact": "^2.1.0",
|
|
69
|
+
"@santi020k/eslint-config-qwik": "^2.1.0",
|
|
70
|
+
"@santi020k/eslint-config-react": "^2.1.0",
|
|
71
|
+
"@santi020k/eslint-config-react-router": "^2.1.0",
|
|
72
|
+
"@santi020k/eslint-config-remix": "^2.1.0",
|
|
73
|
+
"@santi020k/eslint-config-slidev": "^2.1.0",
|
|
74
|
+
"@santi020k/eslint-config-solid": "^2.1.0",
|
|
75
|
+
"@santi020k/eslint-config-svelte": "^2.1.0",
|
|
76
|
+
"@santi020k/eslint-config-tanstack-start": "^2.1.0",
|
|
77
|
+
"@santi020k/eslint-config-vite": "^2.1.0",
|
|
78
|
+
"@santi020k/eslint-config-vue": "^2.1.0"
|
|
78
79
|
},
|
|
79
80
|
"peerDependenciesMeta": {
|
|
80
81
|
"@santi020k/eslint-config-angular": {
|
|
@@ -142,14 +143,14 @@
|
|
|
142
143
|
}
|
|
143
144
|
},
|
|
144
145
|
"engines": {
|
|
145
|
-
"node": ">=22.18.0"
|
|
146
|
+
"node": "^20.19.0 || >=22.18.0"
|
|
146
147
|
},
|
|
147
148
|
"repository": {
|
|
148
149
|
"type": "git",
|
|
149
150
|
"url": "git+https://github.com/santi020k/eslint-config-basic.git",
|
|
150
151
|
"directory": "packages/lite"
|
|
151
152
|
},
|
|
152
|
-
"homepage": "https://eslint.santi020k.com/packages/lite
|
|
153
|
+
"homepage": "https://eslint.santi020k.com/packages/lite",
|
|
153
154
|
"bugs": {
|
|
154
155
|
"url": "https://github.com/santi020k/eslint-config-basic/issues"
|
|
155
156
|
},
|