@alexlit/config-eslint 145.0.0 → 146.0.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/package.json +6 -3
- package/plugins/tailwindcss.js +28 -26
- package/plugins/unicorn.js +1 -28
- package/plugins/zod.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "146.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Sharable ESLint configuration",
|
|
6
6
|
"keywords": [
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"@vitest/eslint-plugin": "^1.6.20",
|
|
49
49
|
"eslint": "^10.5.0",
|
|
50
50
|
"eslint-config-prettier": "^10.1.8",
|
|
51
|
-
"eslint-plugin-jsdoc": "^63.0.
|
|
51
|
+
"eslint-plugin-jsdoc": "^63.0.7",
|
|
52
52
|
"eslint-plugin-perfectionist": "^5.9.1",
|
|
53
53
|
"eslint-plugin-prettier": "^5.5.6",
|
|
54
54
|
"eslint-plugin-regexp": "^3.1.0",
|
|
55
55
|
"eslint-plugin-sonarjs": "^4.1.0",
|
|
56
|
-
"eslint-plugin-tailwindcss": "^
|
|
56
|
+
"eslint-plugin-tailwindcss": "^4.0.3",
|
|
57
57
|
"eslint-plugin-unicorn": "^68.0.0",
|
|
58
58
|
"eslint-plugin-vue": "^10.9.2",
|
|
59
59
|
"eslint-plugin-vuejs-accessibility": "^2.5.0",
|
|
@@ -67,5 +67,8 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public",
|
|
69
69
|
"registry": "https://registry.npmjs.org/"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"tailwindcss": "^4.3.1"
|
|
70
73
|
}
|
|
71
74
|
}
|
package/plugins/tailwindcss.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
|
+
import plugin from 'eslint-plugin-tailwindcss';
|
|
1
2
|
import { defineConfig } from 'eslint/config';
|
|
2
3
|
|
|
3
|
-
// import plugin from 'eslint-plugin-tailwindcss';
|
|
4
4
|
import { FILES } from '../presets/base.js';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @example
|
|
8
|
+
* import path from 'node:path';
|
|
9
|
+
*
|
|
10
|
+
* tailwindcss({
|
|
11
|
+
* cssConfigPath: path.resolve(import.meta.dirname, 'src/tailwind.css'),
|
|
12
|
+
* });
|
|
13
|
+
*
|
|
14
|
+
* @param settings {import('eslint-plugin-tailwindcss').PluginSettings}
|
|
15
|
+
*
|
|
16
|
+
* @see [eslint-plugin-tailwindcss](https://github.com/francoismassart/eslint-plugin-tailwindcss)
|
|
17
|
+
*/
|
|
18
|
+
export const tailwindcss = (settings) =>
|
|
19
|
+
defineConfig([
|
|
20
|
+
{
|
|
21
|
+
files: FILES,
|
|
22
|
+
plugins: { tailwindcss: plugin },
|
|
23
|
+
rules: {
|
|
24
|
+
...plugin.configs.recommended.rules,
|
|
25
|
+
'tailwindcss/no-custom-classname': 'off',
|
|
26
|
+
'vue/static-class-names-order': 'off',
|
|
27
|
+
},
|
|
28
|
+
settings: {
|
|
29
|
+
/** @type {import('eslint-plugin-tailwindcss').PluginSettings} */
|
|
30
|
+
tailwindcss: { cssConfigPath: './styles/tailwind.css', ...settings },
|
|
31
|
+
},
|
|
15
32
|
},
|
|
16
|
-
|
|
17
|
-
// tailwindcss: {
|
|
18
|
-
// callees: [
|
|
19
|
-
// 'classnames',
|
|
20
|
-
// 'clsx',
|
|
21
|
-
// 'cn',
|
|
22
|
-
// 'ctl',
|
|
23
|
-
// 'cva',
|
|
24
|
-
// 'tv',
|
|
25
|
-
// 'tw',
|
|
26
|
-
// 'twMerge',
|
|
27
|
-
// ],
|
|
28
|
-
// },
|
|
29
|
-
// },
|
|
30
|
-
},
|
|
31
|
-
]);
|
|
33
|
+
]);
|
package/plugins/unicorn.js
CHANGED
|
@@ -14,34 +14,7 @@ export const unicorn = defineConfig([
|
|
|
14
14
|
'error',
|
|
15
15
|
{ checkArrowFunctions: false },
|
|
16
16
|
],
|
|
17
|
-
'unicorn/name-replacements':
|
|
18
|
-
'warn',
|
|
19
|
-
{
|
|
20
|
-
allowList: {
|
|
21
|
-
Args: true,
|
|
22
|
-
args: true,
|
|
23
|
-
Attrs: true,
|
|
24
|
-
attrs: true,
|
|
25
|
-
Env: true,
|
|
26
|
-
env: true,
|
|
27
|
-
i18n: true,
|
|
28
|
-
ImportMetaEnv: true,
|
|
29
|
-
Params: true,
|
|
30
|
-
params: true,
|
|
31
|
-
ProcessEnv: true,
|
|
32
|
-
Props: true,
|
|
33
|
-
props: true,
|
|
34
|
-
Ref: true,
|
|
35
|
-
ref: true,
|
|
36
|
-
Src: true,
|
|
37
|
-
src: true,
|
|
38
|
-
Utils: true,
|
|
39
|
-
utils: true,
|
|
40
|
-
},
|
|
41
|
-
checkFilenames: false,
|
|
42
|
-
replacements: { index18n: { i18n: true } },
|
|
43
|
-
},
|
|
44
|
-
],
|
|
17
|
+
'unicorn/name-replacements': 'off',
|
|
45
18
|
'unicorn/no-array-reduce': ['error', { allowSimpleOperations: true }],
|
|
46
19
|
'unicorn/no-asterisk-prefix-in-documentation-comments': 'off',
|
|
47
20
|
'unicorn/no-empty-file': 'off',
|
package/plugins/zod.js
CHANGED
|
@@ -6,8 +6,8 @@ import { FILES } from '../presets/base.js';
|
|
|
6
6
|
/** @see [eslint-plugin-zod](https://github.com/marcalexiei/eslint-zod/tree/main/plugins/eslint-plugin-zod) */
|
|
7
7
|
export const zod = defineConfig([
|
|
8
8
|
{
|
|
9
|
-
files: FILES,
|
|
10
9
|
...plugin.configs.recommended,
|
|
10
|
+
files: FILES,
|
|
11
11
|
|
|
12
12
|
rules: {
|
|
13
13
|
...plugin.configs.recommended.rules,
|