@alexlit/lint-kit 128.9.0 → 129.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/eslint.config.js +2 -2
- package/package.json +1 -1
- package/packages/config-commitlint/node_modules/.bin/commitlint +4 -4
- package/packages/config-eslint/README.md +14 -5
- package/packages/config-eslint/index.js +16 -71
- package/packages/config-eslint/node_modules/.bin/eslint +2 -2
- package/packages/config-eslint/node_modules/.bin/eslint-config-prettier +2 -2
- package/packages/config-eslint/node_modules/.bin/tsc +2 -2
- package/packages/config-eslint/node_modules/.bin/tsserver +2 -2
- package/packages/config-eslint/package.json +2 -2
- package/packages/config-eslint/plugins/unocss.js +4 -0
- package/packages/config-eslint/presets/_base.js +24 -0
- package/packages/config-eslint/presets/default.js +37 -0
package/eslint.config.js
CHANGED
package/package.json
CHANGED
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.
|
|
9
|
+
export NODE_PATH="/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.4_typescript@5.6.2/node_modules/@commitlint/cli/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.4_typescript@5.6.2/node_modules/@commitlint/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.4_typescript@5.6.2/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.
|
|
11
|
+
export NODE_PATH="/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.4_typescript@5.6.2/node_modules/@commitlint/cli/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.4_typescript@5.6.2/node_modules/@commitlint/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.4_typescript@5.6.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/../../../../node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.4_typescript@5.6.2/node_modules/@commitlint/cli/cli.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.
|
|
16
|
+
exec node "$basedir/../../../../node_modules/.pnpm/@commitlint+cli@19.5.0_@types+node@22.7.4_typescript@5.6.2/node_modules/@commitlint/cli/cli.js" "$@"
|
|
17
17
|
fi
|
|
@@ -13,23 +13,32 @@ npm i @alexlit/config-eslint -D
|
|
|
13
13
|
|
|
14
14
|
## Connection
|
|
15
15
|
|
|
16
|
-
-
|
|
16
|
+
- With preset
|
|
17
17
|
|
|
18
18
|
```js
|
|
19
19
|
// eslint.config.js
|
|
20
|
-
import {
|
|
20
|
+
import { defaultPreset } from '@alexlit/config-eslint';
|
|
21
21
|
|
|
22
|
-
export default [...
|
|
22
|
+
export default [...defaultPreset];
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
-
|
|
25
|
+
- Custom rules
|
|
26
26
|
([available plugins](https://github.com/alex-lit/lint-kit/blob/master/packages/config-eslint/index.js))
|
|
27
27
|
|
|
28
28
|
```js
|
|
29
29
|
// eslint.config.js
|
|
30
30
|
import { typescript, unicorn, vitest } from '@alexlit/config-eslint';
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
// config example:
|
|
33
|
+
export default [
|
|
34
|
+
...typescript,
|
|
35
|
+
...unicorn,
|
|
36
|
+
...vitest,
|
|
37
|
+
|
|
38
|
+
...[
|
|
39
|
+
// <custom rules>
|
|
40
|
+
],
|
|
41
|
+
];
|
|
33
42
|
```
|
|
34
43
|
|
|
35
44
|
## Usefull links
|
|
@@ -1,72 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
export { javascript } from './plugins/javascript.js';
|
|
2
|
+
export { jsdoc } from './plugins/jsdoc.js';
|
|
3
|
+
export { perfectionist } from './plugins/perfectionist.js';
|
|
4
|
+
export { prettier, prettierConfig } from './plugins/prettier.js';
|
|
5
|
+
export { regexp } from './plugins/regexp.js';
|
|
6
|
+
export { sonar } from './plugins/sonar.js';
|
|
7
|
+
export { stylistic } from './plugins/stylistic.js';
|
|
8
|
+
export { tanstackQuery } from './plugins/tanstack-query.js';
|
|
9
|
+
export { typescript } from './plugins/typescript.js';
|
|
10
|
+
export { unicorn } from './plugins/unicorn.js';
|
|
11
|
+
export { unocss } from './plugins/unocss.js';
|
|
12
|
+
export { vitest } from './plugins/vitest.js';
|
|
13
|
+
export { vue } from './plugins/vue.js';
|
|
14
|
+
export { vueAccessibility } from './plugins/vue-accessibility.js';
|
|
15
|
+
export { vueI18n } from './plugins/vue-i18n.js';
|
|
2
16
|
|
|
3
|
-
|
|
4
|
-
import { jsdoc } from './plugins/jsdoc.js';
|
|
5
|
-
import { perfectionist } from './plugins/perfectionist.js';
|
|
6
|
-
import { prettier, prettierConfig } from './plugins/prettier.js';
|
|
7
|
-
import { regexp } from './plugins/regexp.js';
|
|
8
|
-
import { sonar } from './plugins/sonar.js';
|
|
9
|
-
import { stylistic } from './plugins/stylistic.js';
|
|
10
|
-
import { tanstackQuery } from './plugins/tanstack-query.js';
|
|
11
|
-
import { typescript } from './plugins/typescript.js';
|
|
12
|
-
import { unicorn } from './plugins/unicorn.js';
|
|
13
|
-
import { vitest } from './plugins/vitest.js';
|
|
14
|
-
import { vueAccessibility } from './plugins/vue-accessibility.js';
|
|
15
|
-
import { vueI18n } from './plugins/vue-i18n.js';
|
|
16
|
-
import { vue } from './plugins/vue.js';
|
|
17
|
-
|
|
18
|
-
export const config = [
|
|
19
|
-
{
|
|
20
|
-
files: ['**/*.{js,mjs,cjs,typescript,vue}'],
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
{
|
|
24
|
-
ignores: [
|
|
25
|
-
'**/.temp',
|
|
26
|
-
'**/mockServiceWorker.js',
|
|
27
|
-
'.histoire',
|
|
28
|
-
'.nuxt',
|
|
29
|
-
'build',
|
|
30
|
-
'dist',
|
|
31
|
-
'docs',
|
|
32
|
-
'storybook-*',
|
|
33
|
-
'sw.js',
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
{ languageOptions: { globals: globals.browser } },
|
|
38
|
-
|
|
39
|
-
...javascript,
|
|
40
|
-
...jsdoc,
|
|
41
|
-
...perfectionist,
|
|
42
|
-
...regexp,
|
|
43
|
-
...sonar,
|
|
44
|
-
...stylistic,
|
|
45
|
-
...tanstackQuery,
|
|
46
|
-
...typescript,
|
|
47
|
-
...unicorn,
|
|
48
|
-
...vitest,
|
|
49
|
-
...vue,
|
|
50
|
-
...vueAccessibility,
|
|
51
|
-
...vueI18n,
|
|
52
|
-
|
|
53
|
-
...prettierConfig, // must be last
|
|
54
|
-
];
|
|
55
|
-
|
|
56
|
-
export {
|
|
57
|
-
javascript,
|
|
58
|
-
jsdoc,
|
|
59
|
-
perfectionist,
|
|
60
|
-
prettier,
|
|
61
|
-
prettierConfig,
|
|
62
|
-
regexp,
|
|
63
|
-
sonar,
|
|
64
|
-
stylistic,
|
|
65
|
-
tanstackQuery,
|
|
66
|
-
typescript,
|
|
67
|
-
unicorn,
|
|
68
|
-
vitest,
|
|
69
|
-
vue,
|
|
70
|
-
vueAccessibility,
|
|
71
|
-
vueI18n,
|
|
72
|
-
};
|
|
17
|
+
export { defaultPreset } from './presets/default.js';
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/eslint@9.11.1_jiti@2.0.0/node_modules/eslint/bin/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/eslint@9.11.1_jiti@2.0.0/node_modules/eslint/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/eslint@9.11.1_jiti@2.0.0/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/../eslint/bin/eslint.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../eslint/bin/eslint.js" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/eslint-config-prettier@9.1.0_eslint@9.11.1_jiti@2.0.0_/node_modules/eslint-config-prettier/bin/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/eslint-config-prettier@9.1.0_eslint@9.11.1_jiti@2.0.0_/node_modules/eslint-config-prettier/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/eslint-config-prettier@9.1.0_eslint@9.11.1_jiti@2.0.0_/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/../eslint-config-prettier/bin/cli.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../eslint-config-prettier/bin/cli.js" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/bin/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/typescript@5.6.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/../typescript/bin/tsc" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
17
17
|
fi
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/bin/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/node_modules:/home/alexlit/Work/@alexlit/lint-kit/node_modules/.pnpm/typescript@5.6.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/../typescript/bin/tsserver" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir
|
|
16
|
+
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
17
17
|
fi
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "96.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Eslint config",
|
|
6
6
|
"keywords": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@eslint/js": "^9.11.1",
|
|
39
39
|
"@intlify/eslint-plugin-vue-i18n": "^3.0.0",
|
|
40
40
|
"@stylistic/eslint-plugin": "^2.8.0",
|
|
41
|
-
"@tanstack/eslint-plugin-query": "^5.
|
|
41
|
+
"@tanstack/eslint-plugin-query": "^5.58.1",
|
|
42
42
|
"eslint": "^9.11.1",
|
|
43
43
|
"eslint-config-prettier": "^9.1.0",
|
|
44
44
|
"eslint-plugin-jsdoc": "^50.3.0",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import globals from 'globals';
|
|
2
|
+
|
|
3
|
+
/** Base config */
|
|
4
|
+
export const _base = [
|
|
5
|
+
{
|
|
6
|
+
files: ['**/*.{js,mjs,cjs,typescript,vue}'],
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
{
|
|
10
|
+
ignores: [
|
|
11
|
+
'**/.temp',
|
|
12
|
+
'**/mockServiceWorker.js',
|
|
13
|
+
'.histoire',
|
|
14
|
+
'.nuxt',
|
|
15
|
+
'build',
|
|
16
|
+
'dist',
|
|
17
|
+
'docs',
|
|
18
|
+
'storybook-*',
|
|
19
|
+
'sw.js',
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
{ languageOptions: { globals: globals.browser } },
|
|
24
|
+
];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { javascript } from '../plugins/javascript.js';
|
|
2
|
+
import { jsdoc } from '../plugins/jsdoc.js';
|
|
3
|
+
import { perfectionist } from '../plugins/perfectionist.js';
|
|
4
|
+
import { prettierConfig } from '../plugins/prettier.js';
|
|
5
|
+
import { regexp } from '../plugins/regexp.js';
|
|
6
|
+
import { sonar } from '../plugins/sonar.js';
|
|
7
|
+
import { stylistic } from '../plugins/stylistic.js';
|
|
8
|
+
import { tanstackQuery } from '../plugins/tanstack-query.js';
|
|
9
|
+
import { typescript } from '../plugins/typescript.js';
|
|
10
|
+
import { unicorn } from '../plugins/unicorn.js';
|
|
11
|
+
import { unocss } from '../plugins/unocss.js';
|
|
12
|
+
import { vitest } from '../plugins/vitest.js';
|
|
13
|
+
import { vueAccessibility } from '../plugins/vue-accessibility.js';
|
|
14
|
+
import { vueI18n } from '../plugins/vue-i18n.js';
|
|
15
|
+
import { vue } from '../plugins/vue.js';
|
|
16
|
+
import { _base } from './_base.js';
|
|
17
|
+
|
|
18
|
+
export const defaultPreset = [
|
|
19
|
+
..._base, // must be first
|
|
20
|
+
|
|
21
|
+
...javascript,
|
|
22
|
+
...jsdoc,
|
|
23
|
+
...perfectionist,
|
|
24
|
+
...regexp,
|
|
25
|
+
...sonar,
|
|
26
|
+
...stylistic,
|
|
27
|
+
...tanstackQuery,
|
|
28
|
+
...typescript,
|
|
29
|
+
...unicorn,
|
|
30
|
+
...unocss,
|
|
31
|
+
...vitest,
|
|
32
|
+
...vue,
|
|
33
|
+
...vueAccessibility,
|
|
34
|
+
...vueI18n,
|
|
35
|
+
|
|
36
|
+
...prettierConfig, // must be last
|
|
37
|
+
];
|