@alexlit/lint-kit 137.4.0 → 138.0.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/package.json +1 -1
- package/packages/config-eslint/package.json +1 -4
- package/packages/config-eslint/plugins/tailwindcss.js +23 -23
- package/packages/config-hooks/lint-staged.js +17 -7
- package/packages/config-hooks/package.json +1 -1
- package/packages/config-stylelint/README.md +6 -0
- package/packages/config-stylelint/index.js +1 -0
- package/packages/config-stylelint/node_modules/.bin/prettier +2 -2
- package/packages/config-stylelint/node_modules/.bin/stylelint +2 -2
- package/packages/config-stylelint/package.json +3 -2
- package/packages/config-stylelint/plugins/media-use-custom-media.js +7 -0
- package/packages/config-stylelint/plugins/scss.js +7 -1
- package/stylelint.config.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "102.
|
|
3
|
+
"version": "102.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Eslint config",
|
|
6
6
|
"keywords": [
|
|
@@ -59,9 +59,6 @@
|
|
|
59
59
|
"typescript": "^5.7.3",
|
|
60
60
|
"typescript-eslint": "^8.23.0"
|
|
61
61
|
},
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"tailwindcss": "^3.4.17"
|
|
64
|
-
},
|
|
65
62
|
"engines": {
|
|
66
63
|
"node": ">=18.18"
|
|
67
64
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import tailwind from 'eslint-plugin-tailwindcss';
|
|
1
|
+
// import tailwind from 'eslint-plugin-tailwindcss';
|
|
2
2
|
|
|
3
3
|
/** @see [eslint-plugin-tailwindcss](https://github.com/francoismassart/eslint-plugin-tailwindcss) */
|
|
4
4
|
export const tailwindcss = [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
5
|
+
// TODO: включить после обновления плагина
|
|
6
|
+
// ...tailwind.configs['flat/recommended'],
|
|
7
|
+
// {
|
|
8
|
+
// rules: {
|
|
9
|
+
// 'tailwindcss/no-custom-classname': 'off',
|
|
10
|
+
// 'vue/static-class-names-order': 'off',
|
|
11
|
+
// },
|
|
12
|
+
// settings: {
|
|
13
|
+
// tailwindcss: {
|
|
14
|
+
// callees: [
|
|
15
|
+
// 'classnames',
|
|
16
|
+
// 'clsx',
|
|
17
|
+
// 'cn',
|
|
18
|
+
// 'ctl',
|
|
19
|
+
// 'cva',
|
|
20
|
+
// 'tv',
|
|
21
|
+
// 'tw',
|
|
22
|
+
// 'twMerge',
|
|
23
|
+
// ],
|
|
24
|
+
// },
|
|
25
|
+
// },
|
|
26
|
+
// },
|
|
27
27
|
];
|
|
@@ -19,21 +19,31 @@ const createLintStagedConfig = (plugins = {}, config = {}) => {
|
|
|
19
19
|
...plugins,
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const eslint = pluginsList.eslint ? 'eslint --fix' : '
|
|
22
|
+
const eslint = pluginsList.eslint ? 'eslint --fix' : 'echo "eslint disabled"';
|
|
23
23
|
|
|
24
|
-
const htmllint = pluginsList.htmllint
|
|
24
|
+
const htmllint = pluginsList.htmllint
|
|
25
|
+
? 'linthtml'
|
|
26
|
+
: 'echo "htmllint disabled"';
|
|
25
27
|
|
|
26
28
|
const lockfilelint = pluginsList.lockfilelint
|
|
27
29
|
? 'lockfile-lint --type npm --path package-lock.json'
|
|
28
|
-
: '
|
|
30
|
+
: 'echo "lockfilelint disabled"';
|
|
29
31
|
|
|
30
|
-
const markdownlint = pluginsList.markdownlint
|
|
32
|
+
const markdownlint = pluginsList.markdownlint
|
|
33
|
+
? 'markdownlint --fix'
|
|
34
|
+
: 'markdownlint "eslint disabled"';
|
|
31
35
|
|
|
32
|
-
const npmlint = pluginsList.npmlint
|
|
36
|
+
const npmlint = pluginsList.npmlint
|
|
37
|
+
? 'npmPkgJsonLint'
|
|
38
|
+
: 'echo "npmlint disabled"';
|
|
33
39
|
|
|
34
|
-
const prettier = pluginsList.prettier
|
|
40
|
+
const prettier = pluginsList.prettier
|
|
41
|
+
? 'prettier --write'
|
|
42
|
+
: 'echo "prettier disabled"';
|
|
35
43
|
|
|
36
|
-
const stylelint = pluginsList.stylelint
|
|
44
|
+
const stylelint = pluginsList.stylelint
|
|
45
|
+
? 'stylelint --fix'
|
|
46
|
+
: 'echo "stylelint disabled"';
|
|
37
47
|
|
|
38
48
|
return {
|
|
39
49
|
'*.cjs': [eslint, prettier],
|
|
@@ -54,3 +54,9 @@ npm i @alexlit/config-stylelint -D
|
|
|
54
54
|
```sh
|
|
55
55
|
npx stylelint-find-new-rules
|
|
56
56
|
```
|
|
57
|
+
|
|
58
|
+
## Usefull links
|
|
59
|
+
|
|
60
|
+
- [Awesome StyleLint](https://github.com/stylelint/awesome-stylelint)
|
|
61
|
+
- [stylelint-scales](https://github.com/jeddy3/stylelint-scales)
|
|
62
|
+
- [stylelint-value-no-unknown-custom-properties](https://github.com/csstools/stylelint-value-no-unknown-custom-properties)
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/prettier@3.4.2/node_modules/prettier/bin/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/prettier@3.4.2/node_modules/prettier/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/prettier@3.4.2/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../prettier/bin/prettier.cjs" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../prettier/bin/prettier.cjs" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/stylelint@16.14.1_typescript@5.7.3/node_modules/stylelint/bin/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/stylelint@16.14.1_typescript@5.7.3/node_modules/stylelint/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/stylelint@16.14.1_typescript@5.7.3/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir
|
|
14
|
+
exec "$basedir/node" "$basedir/../stylelint/bin/stylelint.mjs" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../stylelint/bin/stylelint.mjs" "$@"
|
|
17
17
|
fi
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-stylelint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "49.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Stylelint config",
|
|
6
6
|
"keywords": [
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"up": "../../scripts/up.sh --local"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@double-great/stylelint-a11y": "^3.0.
|
|
39
|
+
"@double-great/stylelint-a11y": "^3.0.4",
|
|
40
40
|
"postcss": "^8.5.1",
|
|
41
41
|
"postcss-html": "^1.8.0",
|
|
42
42
|
"prettier": "^3.4.2",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
|
49
49
|
"stylelint-gamut": "^1.3.4",
|
|
50
50
|
"stylelint-high-performance-animation": "^1.10.0",
|
|
51
|
+
"stylelint-media-use-custom-media": "^4.0.0",
|
|
51
52
|
"stylelint-no-indistinguishable-colors": "^2.3.0",
|
|
52
53
|
"stylelint-no-nested-media": "^0.1.0",
|
|
53
54
|
"stylelint-no-unresolved-module": "^2.3.0",
|
|
@@ -25,11 +25,17 @@ export default {
|
|
|
25
25
|
// tailwind
|
|
26
26
|
'apply',
|
|
27
27
|
'config',
|
|
28
|
+
'custom-variant',
|
|
28
29
|
'layer',
|
|
30
|
+
'reference',
|
|
29
31
|
'responsive',
|
|
30
32
|
'screen',
|
|
33
|
+
'source',
|
|
31
34
|
'tailwind',
|
|
32
|
-
'
|
|
35
|
+
'theme',
|
|
36
|
+
'utility',
|
|
37
|
+
'variant',
|
|
38
|
+
// /tailwind
|
|
33
39
|
],
|
|
34
40
|
},
|
|
35
41
|
],
|
package/stylelint.config.js
CHANGED