@santi020k/eslint-config-lite 2.0.0 → 2.1.1
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 +16 -0
- package/README.md +1 -1
- package/dist/index.js +23 -13
- package/dist/tailwind.js +14 -14
- package/package.json +48 -47
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @santi020k/eslint-config-lite
|
|
2
2
|
|
|
3
|
+
## 2.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`2576ec6`](https://github.com/santi020k/eslint-config-basic/commit/2576ec62df6127f5b40821e46a22394bb9dec867)]:
|
|
8
|
+
- @santi020k/eslint-config-core@2.1.1
|
|
9
|
+
- @santi020k/eslint-config-typescript@2.1.1
|
|
10
|
+
|
|
11
|
+
## 2.1.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies []:
|
|
16
|
+
- @santi020k/eslint-config-core@2.1.0
|
|
17
|
+
- @santi020k/eslint-config-typescript@2.1.0
|
|
18
|
+
|
|
3
19
|
## 2.0.0
|
|
4
20
|
|
|
5
21
|
### Minor 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
|
@@ -120,6 +120,28 @@ const applyLiteFrameworkImpliedDeps = (frameworks) => {
|
|
|
120
120
|
if (result.nuxt && !result.vue) result.vue = true;
|
|
121
121
|
return result;
|
|
122
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
|
+
};
|
|
123
145
|
const buildLiteIgnoresConfig = (useDefaultIgnores, useGeneratedCodeIgnores, useGitignore, optIgnores) => ({
|
|
124
146
|
defaultIgnores: useDefaultIgnores ? [{
|
|
125
147
|
ignores: [...DEFAULT_IGNORES, ...useGeneratedCodeIgnores ? GENERATED_CODE_IGNORES : []],
|
|
@@ -349,19 +371,7 @@ const eslintConfig = async (options) => {
|
|
|
349
371
|
const useGitignore = !uniqueSettings.includes(Setting.NoGitignore);
|
|
350
372
|
const useDefaultIgnores = !uniqueSettings.includes(Setting.NoDefaultIgnores);
|
|
351
373
|
const useGeneratedCodeIgnores = !uniqueSettings.includes(Setting.NoGeneratedCodeIgnores);
|
|
352
|
-
const tailwindOptions = (
|
|
353
|
-
if (!uniqueLibraries.includes(Library.Tailwind)) return void 0;
|
|
354
|
-
const opts = typeof optTailwind === "object" ? optTailwind : {};
|
|
355
|
-
const entryPoint = opts.entryPoint ?? findTailwindEntryPoint(rootDir);
|
|
356
|
-
const hasCustomConfig = entryPoint || opts.detectComponentClasses !== void 0 || opts.ignore?.length || opts.noUnknownClasses !== void 0;
|
|
357
|
-
if (!hasCustomConfig) return void 0;
|
|
358
|
-
return {
|
|
359
|
-
detectComponentClasses: opts.detectComponentClasses ?? true,
|
|
360
|
-
...entryPoint ? { entryPoint } : {},
|
|
361
|
-
...opts.ignore?.length ? { ignore: opts.ignore } : {},
|
|
362
|
-
...opts.noUnknownClasses === void 0 ? {} : { noUnknownClasses: opts.noUnknownClasses }
|
|
363
|
-
};
|
|
364
|
-
})();
|
|
374
|
+
const tailwindOptions = resolveLiteTailwindOptions(rootDir, optTailwind, uniqueLibraries);
|
|
365
375
|
const runtimeCoreConfig = runtime === Runtime.Universal ? coreConfig : createCoreConfig(runtime);
|
|
366
376
|
const { defaultIgnores, gitignoreConfig, userIgnores } = buildLiteIgnoresConfig(
|
|
367
377
|
useDefaultIgnores,
|
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.1",
|
|
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.1",
|
|
28
|
+
"@santi020k/eslint-config-typescript": "^2.1.1"
|
|
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-
|
|
45
|
-
"@santi020k/eslint-config-
|
|
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.1",
|
|
36
|
+
"@santi020k/eslint-config-astro": "^2.1.1",
|
|
37
|
+
"@santi020k/eslint-config-expo": "^2.1.1",
|
|
38
|
+
"@santi020k/eslint-config-hono": "^2.1.1",
|
|
39
|
+
"@santi020k/eslint-config-integrations": "^2.1.1",
|
|
40
|
+
"@santi020k/eslint-config-lit": "^2.1.1",
|
|
41
|
+
"@santi020k/eslint-config-nest": "^2.1.1",
|
|
42
|
+
"@santi020k/eslint-config-next": "^2.1.1",
|
|
43
|
+
"@santi020k/eslint-config-nuxt": "^2.1.1",
|
|
44
|
+
"@santi020k/eslint-config-preact": "^2.1.1",
|
|
45
|
+
"@santi020k/eslint-config-react": "^2.1.1",
|
|
46
|
+
"@santi020k/eslint-config-qwik": "^2.1.1",
|
|
47
|
+
"@santi020k/eslint-config-react-router": "^2.1.1",
|
|
48
|
+
"@santi020k/eslint-config-remix": "^2.1.1",
|
|
49
|
+
"@santi020k/eslint-config-slidev": "^2.1.1",
|
|
50
|
+
"@santi020k/eslint-config-solid": "^2.1.1",
|
|
51
|
+
"@santi020k/eslint-config-svelte": "^2.1.1",
|
|
52
|
+
"@santi020k/eslint-config-tanstack-start": "^2.1.1",
|
|
53
|
+
"@santi020k/eslint-config-vite": "^2.1.1",
|
|
54
|
+
"@santi020k/eslint-config-vue": "^2.1.1"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
57
|
"eslint": "^10.0.0",
|
|
57
58
|
"typescript": ">=5.0.0",
|
|
58
|
-
"@santi020k/eslint-config-
|
|
59
|
-
"@santi020k/eslint-config-
|
|
60
|
-
"@santi020k/eslint-config-
|
|
61
|
-
"@santi020k/eslint-config-
|
|
62
|
-
"@santi020k/eslint-config-
|
|
63
|
-
"@santi020k/eslint-config-lit": "^2.
|
|
64
|
-
"@santi020k/eslint-config-next": "^2.
|
|
65
|
-
"@santi020k/eslint-config-
|
|
66
|
-
"@santi020k/eslint-config-
|
|
67
|
-
"@santi020k/eslint-config-
|
|
68
|
-
"@santi020k/eslint-config-
|
|
69
|
-
"@santi020k/eslint-config-
|
|
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.1",
|
|
60
|
+
"@santi020k/eslint-config-astro": "^2.1.1",
|
|
61
|
+
"@santi020k/eslint-config-expo": "^2.1.1",
|
|
62
|
+
"@santi020k/eslint-config-hono": "^2.1.1",
|
|
63
|
+
"@santi020k/eslint-config-integrations": "^2.1.1",
|
|
64
|
+
"@santi020k/eslint-config-lit": "^2.1.1",
|
|
65
|
+
"@santi020k/eslint-config-next": "^2.1.1",
|
|
66
|
+
"@santi020k/eslint-config-nest": "^2.1.1",
|
|
67
|
+
"@santi020k/eslint-config-nuxt": "^2.1.1",
|
|
68
|
+
"@santi020k/eslint-config-preact": "^2.1.1",
|
|
69
|
+
"@santi020k/eslint-config-qwik": "^2.1.1",
|
|
70
|
+
"@santi020k/eslint-config-react": "^2.1.1",
|
|
71
|
+
"@santi020k/eslint-config-react-router": "^2.1.1",
|
|
72
|
+
"@santi020k/eslint-config-remix": "^2.1.1",
|
|
73
|
+
"@santi020k/eslint-config-slidev": "^2.1.1",
|
|
74
|
+
"@santi020k/eslint-config-solid": "^2.1.1",
|
|
75
|
+
"@santi020k/eslint-config-svelte": "^2.1.1",
|
|
76
|
+
"@santi020k/eslint-config-tanstack-start": "^2.1.1",
|
|
77
|
+
"@santi020k/eslint-config-vite": "^2.1.1",
|
|
78
|
+
"@santi020k/eslint-config-vue": "^2.1.1"
|
|
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
|
},
|