@alexlit/config-eslint 109.5.1 → 109.6.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 +3 -3
- package/plugins/javascript.js +3 -9
- package/plugins/jsdoc.js +2 -5
- package/plugins/perfectionist.js +1 -1
- package/plugins/prettier.js +4 -14
- package/plugins/regexp.js +1 -1
- package/plugins/sonar.js +3 -8
- package/plugins/stylistic.js +2 -4
- package/plugins/tailwindcss.js +1 -1
- package/plugins/typescript.js +30 -2
- package/plugins/unicorn.js +1 -1
- package/plugins/unocss.js +3 -11
- package/plugins/vue.js +1 -1
- package/presets/{_base.js → base.js} +1 -1
- package/presets/default.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "109.
|
|
3
|
+
"version": "109.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Sharable ESLint configuration",
|
|
6
6
|
"keywords": [
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@eslint/js": "^9.
|
|
34
|
+
"@eslint/js": "^9.27.0",
|
|
35
35
|
"@eslint/json": "^0.12.0",
|
|
36
36
|
"@intlify/eslint-plugin-vue-i18n": "^4.0.1",
|
|
37
37
|
"@stylistic/eslint-plugin": "^4.2.0",
|
|
38
38
|
"@tanstack/eslint-plugin-query": "^5.74.7",
|
|
39
39
|
"@unocss/eslint-config": "^66.1.2",
|
|
40
|
-
"eslint": "9.
|
|
40
|
+
"eslint": "9.27.0",
|
|
41
41
|
"eslint-config-prettier": "^10.1.5",
|
|
42
42
|
"eslint-plugin-jsdoc": "^50.6.17",
|
|
43
43
|
"eslint-plugin-perfectionist": "^4.13.0",
|
package/plugins/javascript.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import plugin from '@eslint/js';
|
|
2
2
|
|
|
3
|
-
import { FILES } from '../presets/
|
|
3
|
+
import { FILES } from '../presets/base.js';
|
|
4
4
|
|
|
5
5
|
/** @see [eslint](https://eslint.org) */
|
|
6
6
|
export const javascript = [
|
|
7
|
-
{
|
|
8
|
-
files: FILES,
|
|
9
|
-
...plugin.configs.recommended,
|
|
10
|
-
},
|
|
7
|
+
{ files: FILES, ...plugin.configs.recommended },
|
|
11
8
|
{
|
|
12
9
|
files: FILES,
|
|
13
10
|
rules: {
|
|
@@ -33,10 +30,7 @@ export const javascript = [
|
|
|
33
30
|
group: ['.', '..', '*/..'],
|
|
34
31
|
message: 'Use absolute path instead',
|
|
35
32
|
},
|
|
36
|
-
{
|
|
37
|
-
group: ['@/', '@@/'],
|
|
38
|
-
message: 'Use "~" instead of "@"',
|
|
39
|
-
},
|
|
33
|
+
{ group: ['@/', '@@/'], message: 'Use "~" instead of "@"' },
|
|
40
34
|
],
|
|
41
35
|
},
|
|
42
36
|
],
|
package/plugins/jsdoc.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import plugin from 'eslint-plugin-jsdoc';
|
|
2
2
|
|
|
3
|
-
import { FILES } from '../presets/
|
|
3
|
+
import { FILES } from '../presets/base.js';
|
|
4
4
|
|
|
5
5
|
/** @see [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) */
|
|
6
6
|
export const jsdoc = [
|
|
7
|
-
{
|
|
8
|
-
files: FILES,
|
|
9
|
-
...plugin.configs['flat/recommended'],
|
|
10
|
-
},
|
|
7
|
+
{ files: FILES, ...plugin.configs['flat/recommended'] },
|
|
11
8
|
{
|
|
12
9
|
files: FILES,
|
|
13
10
|
rules: {
|
package/plugins/perfectionist.js
CHANGED
package/plugins/prettier.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import config from 'eslint-config-prettier';
|
|
2
2
|
import plugin from 'eslint-plugin-prettier/recommended';
|
|
3
3
|
|
|
4
|
-
import { FILES } from '../presets/
|
|
4
|
+
import { FILES } from '../presets/base.js';
|
|
5
5
|
|
|
6
6
|
const fixes = {
|
|
7
7
|
// fix for prettier/vue
|
|
8
8
|
'vue/html-self-closing': [
|
|
9
9
|
'error',
|
|
10
10
|
{
|
|
11
|
-
html: {
|
|
12
|
-
component: 'always',
|
|
13
|
-
normal: 'never',
|
|
14
|
-
void: 'always',
|
|
15
|
-
},
|
|
11
|
+
html: { component: 'always', normal: 'never', void: 'always' },
|
|
16
12
|
math: 'always',
|
|
17
13
|
svg: 'always',
|
|
18
14
|
},
|
|
@@ -22,17 +18,11 @@ const fixes = {
|
|
|
22
18
|
/** @see [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) */
|
|
23
19
|
export const prettier = [
|
|
24
20
|
{ files: FILES, ...plugin },
|
|
25
|
-
{
|
|
26
|
-
files: ['**/*.vue'],
|
|
27
|
-
rules: { ...fixes },
|
|
28
|
-
},
|
|
21
|
+
{ files: ['**/*.vue'], rules: { ...fixes } },
|
|
29
22
|
];
|
|
30
23
|
|
|
31
24
|
/** @see [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) */
|
|
32
25
|
export const prettierConfig = [
|
|
33
26
|
{ files: FILES, ...config },
|
|
34
|
-
{
|
|
35
|
-
files: ['**/*.vue'],
|
|
36
|
-
rules: { ...fixes },
|
|
37
|
-
},
|
|
27
|
+
{ files: ['**/*.vue'], rules: { ...fixes } },
|
|
38
28
|
];
|
package/plugins/regexp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import plugin from 'eslint-plugin-regexp';
|
|
2
2
|
|
|
3
|
-
import { FILES } from '../presets/
|
|
3
|
+
import { FILES } from '../presets/base.js';
|
|
4
4
|
|
|
5
5
|
/** @see [eslint-plugin-regexp](https://github.com/ota-meshi/eslint-plugin-regexp) */
|
|
6
6
|
export const regexp = [{ files: FILES, ...plugin.configs['flat/recommended'] }];
|
package/plugins/sonar.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import plugin from 'eslint-plugin-sonarjs';
|
|
2
2
|
|
|
3
|
-
import { FILES } from '../presets/
|
|
3
|
+
import { FILES } from '../presets/base.js';
|
|
4
4
|
|
|
5
5
|
/** @see [eslint-plugin-sonarjs](https://github.com/SonarSource/eslint-plugin-sonarjs) */
|
|
6
6
|
export const sonar = [
|
|
7
|
+
{ files: FILES, ...plugin.configs.recommended },
|
|
7
8
|
{
|
|
8
9
|
files: FILES,
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
files: FILES,
|
|
13
|
-
plugins: {
|
|
14
|
-
sonar: plugin,
|
|
15
|
-
},
|
|
10
|
+
plugins: { sonar: plugin },
|
|
16
11
|
rules: {
|
|
17
12
|
'sonarjs/no-commented-code': 'warn',
|
|
18
13
|
'sonarjs/no-vue-bypass-sanitization': 'warn',
|
package/plugins/stylistic.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import plugin from '@stylistic/eslint-plugin';
|
|
2
2
|
|
|
3
|
-
import { FILES } from '../presets/
|
|
3
|
+
import { FILES } from '../presets/base.js';
|
|
4
4
|
|
|
5
5
|
/** @see [@stylistic/eslint-plugin](https://eslint.style/) */
|
|
6
6
|
export const stylistic = [
|
|
7
7
|
{
|
|
8
8
|
files: FILES,
|
|
9
|
-
plugins: {
|
|
10
|
-
'@stylistic': plugin,
|
|
11
|
-
},
|
|
9
|
+
plugins: { '@stylistic': plugin },
|
|
12
10
|
rules: {
|
|
13
11
|
'@stylistic/lines-around-comment': [
|
|
14
12
|
'warn',
|
package/plugins/tailwindcss.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// import tailwind from 'eslint-plugin-tailwindcss';
|
|
2
|
-
import { FILES } from '../presets/
|
|
2
|
+
import { FILES } from '../presets/base.js';
|
|
3
3
|
|
|
4
4
|
/** @see [eslint-plugin-tailwindcss](https://github.com/francoismassart/eslint-plugin-tailwindcss) */
|
|
5
5
|
export const tailwindcss = [
|
package/plugins/typescript.js
CHANGED
|
@@ -1,13 +1,41 @@
|
|
|
1
|
+
/* eslint-disable unicorn/no-null */
|
|
1
2
|
import plugin from 'typescript-eslint';
|
|
2
3
|
|
|
3
|
-
import { FILES } from '../presets/
|
|
4
|
+
import { FILES } from '../presets/base.js';
|
|
4
5
|
|
|
5
6
|
/** @see [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) */
|
|
6
7
|
export const typescript = [
|
|
7
8
|
...plugin.configs.strict,
|
|
8
9
|
...plugin.configs.stylistic,
|
|
9
10
|
|
|
10
|
-
{
|
|
11
|
+
{
|
|
12
|
+
files: FILES,
|
|
13
|
+
rules: {
|
|
14
|
+
'@typescript-eslint/naming-convention': [
|
|
15
|
+
'error',
|
|
16
|
+
|
|
17
|
+
{ format: ['strictCamelCase'], selector: 'function' },
|
|
18
|
+
{
|
|
19
|
+
format: ['strictCamelCase'],
|
|
20
|
+
leadingUnderscore: 'require',
|
|
21
|
+
modifiers: ['private'],
|
|
22
|
+
selector: 'memberLike',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
format: ['strictCamelCase'],
|
|
26
|
+
leadingUnderscore: 'allow',
|
|
27
|
+
selector: 'parameter',
|
|
28
|
+
},
|
|
29
|
+
{ format: ['StrictPascalCase'], selector: 'typeLike' },
|
|
30
|
+
{
|
|
31
|
+
format: ['strictCamelCase', 'StrictPascalCase', 'UPPER_CASE'],
|
|
32
|
+
selector: 'variable',
|
|
33
|
+
},
|
|
34
|
+
{ format: null, modifiers: ['destructured'], selector: 'variable' },
|
|
35
|
+
],
|
|
36
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
11
39
|
{
|
|
12
40
|
files: ['**/*.vue'],
|
|
13
41
|
rules: {
|
package/plugins/unicorn.js
CHANGED
package/plugins/unocss.js
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import plugin from '@unocss/eslint-config/flat';
|
|
2
2
|
|
|
3
|
-
import { FILES } from '../presets/
|
|
3
|
+
import { FILES } from '../presets/base.js';
|
|
4
4
|
|
|
5
5
|
/** @see [@unocss/eslint-config](https://unocss.dev/integrations/eslint) */
|
|
6
6
|
export const unocss = [
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
...plugin,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
files: FILES,
|
|
13
|
-
rules: {
|
|
14
|
-
'unocss/order-attributify': 'off',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
7
|
+
{ files: FILES, ...plugin },
|
|
8
|
+
{ files: FILES, rules: { 'unocss/order-attributify': 'off' } },
|
|
17
9
|
];
|
package/plugins/vue.js
CHANGED
|
@@ -50,7 +50,7 @@ export const vue = [
|
|
|
50
50
|
},
|
|
51
51
|
],
|
|
52
52
|
'vue/define-props-declaration': ['error'],
|
|
53
|
-
'vue/define-props-destructuring': ['
|
|
53
|
+
'vue/define-props-destructuring': ['warn', { destructure: 'always' }],
|
|
54
54
|
'vue/dot-notation': ['error'],
|
|
55
55
|
'vue/enforce-style-attribute': ['error', { allow: ['module'] }],
|
|
56
56
|
'vue/eqeqeq': ['error'],
|
package/presets/default.js
CHANGED
|
@@ -13,10 +13,10 @@ import { vitest } from '../plugins/vitest.js';
|
|
|
13
13
|
import { vueAccessibility } from '../plugins/vue-accessibility.js';
|
|
14
14
|
import { vueI18n } from '../plugins/vue-i18n.js';
|
|
15
15
|
import { vue } from '../plugins/vue.js';
|
|
16
|
-
import {
|
|
16
|
+
import { base } from './base.js';
|
|
17
17
|
|
|
18
18
|
export const defaultPreset = [
|
|
19
|
-
...
|
|
19
|
+
...base, // must be first
|
|
20
20
|
|
|
21
21
|
...javascript,
|
|
22
22
|
...jsdoc,
|