@alexlit/config-eslint 91.2.0 → 92.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/index.js CHANGED
@@ -7,6 +7,7 @@ import { perfectionist } from './plugins/perfectionist.js';
7
7
  import { prettier, prettierConfig } from './plugins/prettier.js';
8
8
  import { regexp } from './plugins/regexp.js';
9
9
  import { sonar } from './plugins/sonar.js';
10
+ import { stylistic } from './plugins/stylistic.js';
10
11
  import { tanstackQuery } from './plugins/tanstack-query.js';
11
12
  import { typescript } from './plugins/typescript.js';
12
13
  import { unicorn } from './plugins/unicorn.js';
@@ -18,6 +19,9 @@ import { vue } from './plugins/vue.js';
18
19
  export const config = [
19
20
  {
20
21
  files: ['**/*.{js,mjs,cjs,typescript,vue}'],
22
+ },
23
+
24
+ {
21
25
  ignores: [
22
26
  '**/.temp',
23
27
  '**/mockServiceWorker.js',
@@ -38,6 +42,7 @@ export const config = [
38
42
  ...perfectionist,
39
43
  ...regexp,
40
44
  ...sonar,
45
+ ...stylistic,
41
46
  ...tanstackQuery,
42
47
  ...typescript,
43
48
  ...unicorn,
@@ -57,6 +62,7 @@ export {
57
62
  prettierConfig,
58
63
  regexp,
59
64
  sonar,
65
+ stylistic,
60
66
  tanstackQuery,
61
67
  typescript,
62
68
  unicorn,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-eslint",
3
- "version": "91.2.0",
3
+ "version": "92.0.0",
4
4
  "private": false,
5
5
  "description": "Eslint config",
6
6
  "keywords": [
@@ -36,6 +36,7 @@
36
36
  "dependencies": {
37
37
  "@eslint/js": "^9.8.0",
38
38
  "@intlify/eslint-plugin-vue-i18n": "^3.0.0",
39
+ "@stylistic/eslint-plugin": "^2.6.0",
39
40
  "@tanstack/eslint-plugin-query": "^5.51.15",
40
41
  "eslint": "^9.8.0",
41
42
  "eslint-config-prettier": "^9.1.0",
@@ -50,7 +51,7 @@
50
51
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
51
52
  "globals": "^15.8.0",
52
53
  "typescript": "^5.5.4",
53
- "typescript-eslint": "^7.18.0"
54
+ "typescript-eslint": "^8.0.0"
54
55
  },
55
56
  "engines": {
56
57
  "node": ">=18.18"
@@ -1,4 +1,3 @@
1
- /* eslint-disable sonarjs/no-duplicate-string */
2
1
  import plugin from '@eslint/js';
3
2
 
4
3
  /** @see [eslint](https://eslint.org) */
@@ -7,40 +6,11 @@ export const javascript = [
7
6
 
8
7
  {
9
8
  rules: {
10
- 'class-methods-use-this': 'off',
11
9
  curly: 'error',
12
10
  'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
13
11
  'grouped-accessor-pairs': ['error', 'getBeforeSet'],
14
-
15
- 'lines-around-comment': [
16
- 'warn',
17
- {
18
- afterBlockComment: false,
19
- afterLineComment: false,
20
-
21
- allowArrayEnd: true,
22
- allowArrayStart: true,
23
-
24
- allowBlockEnd: true,
25
- allowBlockStart: true,
26
-
27
- allowClassEnd: true,
28
- allowClassStart: true,
29
-
30
- allowObjectEnd: true,
31
- allowObjectStart: true,
32
-
33
- beforeBlockComment: true,
34
- beforeLineComment: false,
35
- },
36
- ],
37
-
38
- 'no-console': 'warn',
39
-
40
12
  'no-implicit-coercion': 'error',
41
-
42
13
  'no-param-reassign': ['error', { props: false }],
43
-
44
14
  'no-restricted-exports': [
45
15
  'error',
46
16
  {
@@ -49,7 +19,6 @@ export const javascript = [
49
19
  ],
50
20
  },
51
21
  ],
52
-
53
22
  'no-restricted-imports': [
54
23
  'error',
55
24
  {
@@ -65,79 +34,6 @@ export const javascript = [
65
34
  ],
66
35
  },
67
36
  ],
68
-
69
- 'no-return-await': 'off',
70
- 'no-shadow': 'off',
71
- 'no-underscore-dangle': 'off',
72
- 'no-unused-vars': 'off',
73
- 'no-use-before-define': 'off',
74
- 'nonblock-statement-body-position': ['error', 'below'],
75
- 'padding-line-between-statements': [
76
- 'warn',
77
- // always
78
- { blankLine: 'always', next: '*', prev: 'block-like' },
79
- { blankLine: 'always', next: '*', prev: 'case' },
80
- { blankLine: 'always', next: '*', prev: 'cjs-export' },
81
- { blankLine: 'always', next: '*', prev: 'cjs-import' },
82
- { blankLine: 'always', next: '*', prev: 'class' },
83
- { blankLine: 'always', next: '*', prev: 'default' },
84
- { blankLine: 'always', next: '*', prev: 'directive' },
85
- { blankLine: 'always', next: '*', prev: 'expression' },
86
- { blankLine: 'always', next: '*', prev: 'iife' },
87
- { blankLine: 'always', next: '*', prev: 'multiline-block-like' },
88
- { blankLine: 'always', next: '*', prev: 'multiline-const' },
89
- { blankLine: 'always', next: '*', prev: 'multiline-expression' },
90
- { blankLine: 'always', next: '*', prev: 'multiline-let' },
91
- { blankLine: 'always', next: '*', prev: 'multiline-var' },
92
- { blankLine: 'always', next: '*', prev: 'singleline-const' },
93
- { blankLine: 'always', next: '*', prev: 'singleline-let' },
94
- { blankLine: 'always', next: '*', prev: 'singleline-var' },
95
- { blankLine: 'always', next: 'block-like', prev: '*' },
96
- { blankLine: 'always', next: 'cjs-export', prev: '*' },
97
- { blankLine: 'always', next: 'cjs-import', prev: '*' },
98
- { blankLine: 'always', next: 'class', prev: '*' },
99
- { blankLine: 'always', next: 'expression', prev: '*' },
100
- { blankLine: 'always', next: 'function', prev: '*' },
101
- { blankLine: 'always', next: 'iife', prev: '*' },
102
- { blankLine: 'always', next: 'multiline-block-like', prev: '*' },
103
- { blankLine: 'always', next: 'multiline-const', prev: '*' },
104
- { blankLine: 'always', next: 'multiline-expression', prev: '*' },
105
- { blankLine: 'always', next: 'multiline-let', prev: '*' },
106
- { blankLine: 'always', next: 'multiline-var', prev: '*' },
107
- { blankLine: 'always', next: 'return', prev: '*' },
108
- { blankLine: 'always', next: 'switch', prev: '*' },
109
- // any
110
- { blankLine: 'any', next: 'expression', prev: 'expression' },
111
- {
112
- blankLine: 'any',
113
- next: 'singleline-const',
114
- prev: 'singleline-const',
115
- },
116
- { blankLine: 'any', next: 'singleline-let', prev: 'singleline-let' },
117
- { blankLine: 'any', next: 'singleline-var', prev: 'singleline-var' },
118
- // never
119
- { blankLine: 'never', next: 'cjs-export', prev: 'cjs-export' },
120
- { blankLine: 'never', next: 'cjs-import', prev: 'cjs-import' },
121
- { blankLine: 'never', next: 'directive', prev: 'directive' },
122
- ],
123
-
124
- quotes: ['error', 'single'],
125
- 'require-await': 'off',
126
-
127
- 'sort-imports': [
128
- 'warn',
129
- {
130
- allowSeparatedGroups: true,
131
- ignoreCase: true,
132
- ignoreDeclarationSort: true,
133
- ignoreMemberSort: false,
134
- memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
135
- },
136
- ],
137
-
138
- 'sort-keys': 'off',
139
-
140
- 'sort-vars': 'warn',
141
37
  },
142
38
  },
143
39
  ];
package/plugins/jsdoc.js CHANGED
@@ -14,7 +14,7 @@ export const jsdoc = [
14
14
 
15
15
  require: {
16
16
  ArrowFunctionExpression: false,
17
- ClassDeclaration: true,
17
+ ClassDeclaration: false,
18
18
  ClassExpression: false,
19
19
  FunctionDeclaration: false,
20
20
  FunctionExpression: false,
@@ -0,0 +1,96 @@
1
+ /* eslint-disable sonarjs/no-duplicate-string */
2
+ import plugin from '@stylistic/eslint-plugin';
3
+
4
+ /** @see [@stylistic/eslint-plugin](https://eslint.style/) */
5
+ export const stylistic = [
6
+ {
7
+ plugins: {
8
+ '@stylistic': plugin,
9
+ },
10
+ rules: {
11
+ '@stylistic/lines-around-comment': [
12
+ 'warn',
13
+ {
14
+ afterBlockComment: false,
15
+ afterHashbangComment: true,
16
+ afterLineComment: false,
17
+ allowArrayEnd: true,
18
+ allowArrayStart: true,
19
+ allowBlockEnd: true,
20
+ allowBlockStart: true,
21
+ allowClassEnd: true,
22
+ allowClassStart: true,
23
+ allowEnumEnd: true,
24
+ allowEnumStart: true,
25
+ allowInterfaceEnd: true,
26
+ allowInterfaceStart: true,
27
+ allowModuleEnd: true,
28
+ allowModuleStart: true,
29
+ allowObjectEnd: true,
30
+ allowObjectStart: true,
31
+ allowTypeEnd: true,
32
+ allowTypeStart: true,
33
+ applyDefaultIgnorePatterns: true,
34
+ beforeBlockComment: true,
35
+ beforeLineComment: false,
36
+ },
37
+ ],
38
+ '@stylistic/nonblock-statement-body-position': ['error', 'below'],
39
+ '@stylistic/padding-line-between-statements': [
40
+ 'warn',
41
+ // always
42
+ { blankLine: 'always', next: '*', prev: 'block-like' },
43
+ { blankLine: 'always', next: '*', prev: 'case' },
44
+ { blankLine: 'always', next: '*', prev: 'cjs-export' },
45
+ { blankLine: 'always', next: '*', prev: 'cjs-import' },
46
+ { blankLine: 'always', next: '*', prev: 'class' },
47
+ { blankLine: 'always', next: '*', prev: 'default' },
48
+ { blankLine: 'always', next: '*', prev: 'directive' },
49
+ { blankLine: 'always', next: '*', prev: 'expression' },
50
+ { blankLine: 'always', next: '*', prev: 'iife' },
51
+ { blankLine: 'always', next: '*', prev: 'multiline-block-like' },
52
+ { blankLine: 'always', next: '*', prev: 'multiline-const' },
53
+ { blankLine: 'always', next: '*', prev: 'multiline-expression' },
54
+ { blankLine: 'always', next: '*', prev: 'multiline-let' },
55
+ { blankLine: 'always', next: '*', prev: 'multiline-var' },
56
+ { blankLine: 'always', next: '*', prev: 'singleline-const' },
57
+ { blankLine: 'always', next: '*', prev: 'singleline-let' },
58
+ { blankLine: 'always', next: '*', prev: 'singleline-var' },
59
+ { blankLine: 'always', next: 'block-like', prev: '*' },
60
+ { blankLine: 'always', next: 'cjs-export', prev: '*' },
61
+ { blankLine: 'always', next: 'cjs-import', prev: '*' },
62
+ { blankLine: 'always', next: 'class', prev: '*' },
63
+ { blankLine: 'always', next: 'enum', prev: '*' },
64
+ { blankLine: 'always', next: 'expression', prev: '*' },
65
+ { blankLine: 'always', next: 'function', prev: '*' },
66
+ { blankLine: 'always', next: 'iife', prev: '*' },
67
+ { blankLine: 'always', next: 'interface', prev: '*' },
68
+ { blankLine: 'always', next: 'multiline-block-like', prev: '*' },
69
+ { blankLine: 'always', next: 'multiline-const', prev: '*' },
70
+ { blankLine: 'always', next: 'multiline-expression', prev: '*' },
71
+ { blankLine: 'always', next: 'multiline-let', prev: '*' },
72
+ { blankLine: 'always', next: 'multiline-var', prev: '*' },
73
+ { blankLine: 'always', next: 'return', prev: '*' },
74
+ { blankLine: 'always', next: 'switch', prev: '*' },
75
+ { blankLine: 'always', next: 'type', prev: '*' },
76
+ { blankLine: 'always', next: '*', prev: 'enum' },
77
+ { blankLine: 'always', next: '*', prev: 'interface' },
78
+ { blankLine: 'always', next: '*', prev: 'type' },
79
+ // any
80
+ { blankLine: 'any', next: 'expression', prev: 'expression' },
81
+ {
82
+ blankLine: 'any',
83
+ next: 'singleline-const',
84
+ prev: 'singleline-const',
85
+ },
86
+ { blankLine: 'any', next: 'singleline-let', prev: 'singleline-let' },
87
+ { blankLine: 'any', next: 'singleline-var', prev: 'singleline-var' },
88
+ // never
89
+ { blankLine: 'never', next: 'cjs-export', prev: 'cjs-export' },
90
+ { blankLine: 'never', next: 'cjs-import', prev: 'cjs-import' },
91
+ { blankLine: 'never', next: 'directive', prev: 'directive' },
92
+ { blankLine: 'never', next: 'function', prev: 'function-overload' },
93
+ ],
94
+ },
95
+ },
96
+ ];