@iqrf/eslint-config 0.2.2 → 0.2.4

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/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2024 MICRORISC s.r.o.
189
+ Copyright 2024-2025 MICRORISC s.r.o.
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Linter } from 'eslint';
2
2
 
3
3
  /**
4
- * Copyright 2024 MICRORISC s.r.o.
4
+ * Copyright 2024-2025 MICRORISC s.r.o.
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@ import { Linter } from 'eslint';
19
19
  declare const comments: Linter.Config[];
20
20
 
21
21
  /**
22
- * Copyright 2024 MICRORISC s.r.o.
22
+ * Copyright 2024-2025 MICRORISC s.r.o.
23
23
  *
24
24
  * Licensed under the Apache License, Version 2.0 (the "License");
25
25
  * you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ declare const comments: Linter.Config[];
37
37
  declare const cypress: Linter.Config[];
38
38
 
39
39
  /**
40
- * Copyright 2024 MICRORISC s.r.o.
40
+ * Copyright 2024-2025 MICRORISC s.r.o.
41
41
  *
42
42
  * Licensed under the Apache License, Version 2.0 (the "License");
43
43
  * you may not use this file except in compliance with the License.
@@ -59,7 +59,7 @@ interface Options$3 {
59
59
  declare const imports: (options: Options$3) => Linter.Config[];
60
60
 
61
61
  /**
62
- * Copyright 2024 MICRORISC s.r.o.
62
+ * Copyright 2024-2025 MICRORISC s.r.o.
63
63
  *
64
64
  * Licensed under the Apache License, Version 2.0 (the "License");
65
65
  * you may not use this file except in compliance with the License.
@@ -83,7 +83,7 @@ interface Options$2 {
83
83
  declare const javascript: (options: Options$2) => Linter.Config[];
84
84
 
85
85
  /**
86
- * Copyright 2024 MICRORISC s.r.o.
86
+ * Copyright 2024-2025 MICRORISC s.r.o.
87
87
  *
88
88
  * Licensed under the Apache License, Version 2.0 (the "License");
89
89
  * you may not use this file except in compliance with the License.
@@ -101,7 +101,7 @@ declare const javascript: (options: Options$2) => Linter.Config[];
101
101
  declare const jsDoc: Linter.Config[];
102
102
 
103
103
  /**
104
- * Copyright 2024 MICRORISC s.r.o.
104
+ * Copyright 2024-2025 MICRORISC s.r.o.
105
105
  *
106
106
  * Licensed under the Apache License, Version 2.0 (the "License");
107
107
  * you may not use this file except in compliance with the License.
@@ -119,7 +119,7 @@ declare const jsDoc: Linter.Config[];
119
119
  declare const json: Linter.Config[];
120
120
 
121
121
  /**
122
- * Copyright 2024 MICRORISC s.r.o.
122
+ * Copyright 2024-2025 MICRORISC s.r.o.
123
123
  *
124
124
  * Licensed under the Apache License, Version 2.0 (the "License");
125
125
  * you may not use this file except in compliance with the License.
@@ -140,7 +140,25 @@ interface Options$1 {
140
140
  declare const markdown: (options: Options$1) => Linter.Config[];
141
141
 
142
142
  /**
143
- * Copyright 2024 MICRORISC s.r.o.
143
+ * Copyright 2024-2025 MICRORISC s.r.o.
144
+ *
145
+ * Licensed under the Apache License, Version 2.0 (the "License");
146
+ * you may not use this file except in compliance with the License.
147
+ * You may obtain a copy of the License at
148
+ *
149
+ * http://www.apache.org/licenses/LICENSE-2.0
150
+ *
151
+ * Unless required by applicable law or agreed to in writing, software
152
+ * distributed under the License is distributed on an "AS IS" BASIS,
153
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
154
+ * See the License for the specific language governing permissions and
155
+ * limitations under the License.
156
+ */
157
+
158
+ declare const math: Linter.Config[];
159
+
160
+ /**
161
+ * Copyright 2024-2025 MICRORISC s.r.o.
144
162
  *
145
163
  * Licensed under the Apache License, Version 2.0 (the "License");
146
164
  * you may not use this file except in compliance with the License.
@@ -158,7 +176,7 @@ declare const markdown: (options: Options$1) => Linter.Config[];
158
176
  declare const node: Linter.Config[];
159
177
 
160
178
  /**
161
- * Copyright 2024 MICRORISC s.r.o.
179
+ * Copyright 2024-2025 MICRORISC s.r.o.
162
180
  *
163
181
  * Licensed under the Apache License, Version 2.0 (the "License");
164
182
  * you may not use this file except in compliance with the License.
@@ -176,7 +194,7 @@ declare const node: Linter.Config[];
176
194
  declare const perfectionist: Linter.Config[];
177
195
 
178
196
  /**
179
- * Copyright 2024 MICRORISC s.r.o.
197
+ * Copyright 2024-2025 MICRORISC s.r.o.
180
198
  *
181
199
  * Licensed under the Apache License, Version 2.0 (the "License");
182
200
  * you may not use this file except in compliance with the License.
@@ -194,7 +212,7 @@ declare const perfectionist: Linter.Config[];
194
212
  declare const pinia: Linter.Config[];
195
213
 
196
214
  /**
197
- * Copyright 2024 MICRORISC s.r.o.
215
+ * Copyright 2024-2025 MICRORISC s.r.o.
198
216
  *
199
217
  * Licensed under the Apache License, Version 2.0 (the "License");
200
218
  * you may not use this file except in compliance with the License.
@@ -212,7 +230,7 @@ declare const pinia: Linter.Config[];
212
230
  declare const promise: Linter.Config[];
213
231
 
214
232
  /**
215
- * Copyright 2024 MICRORISC s.r.o.
233
+ * Copyright 2024-2025 MICRORISC s.r.o.
216
234
  *
217
235
  * Licensed under the Apache License, Version 2.0 (the "License");
218
236
  * you may not use this file except in compliance with the License.
@@ -230,7 +248,7 @@ declare const promise: Linter.Config[];
230
248
  declare const regexp: Linter.Config[];
231
249
 
232
250
  /**
233
- * Copyright 2024 MICRORISC s.r.o.
251
+ * Copyright 2024-2025 MICRORISC s.r.o.
234
252
  *
235
253
  * Licensed under the Apache License, Version 2.0 (the "License");
236
254
  * you may not use this file except in compliance with the License.
@@ -248,7 +266,7 @@ declare const regexp: Linter.Config[];
248
266
  declare const stylistic: Linter.Config[];
249
267
 
250
268
  /**
251
- * Copyright 2024 MICRORISC s.r.o.
269
+ * Copyright 2024-2025 MICRORISC s.r.o.
252
270
  *
253
271
  * Licensed under the Apache License, Version 2.0 (the "License");
254
272
  * you may not use this file except in compliance with the License.
@@ -266,7 +284,7 @@ declare const stylistic: Linter.Config[];
266
284
  declare const typescript: Linter.Config[];
267
285
 
268
286
  /**
269
- * Copyright 2024 MICRORISC s.r.o.
287
+ * Copyright 2024-2025 MICRORISC s.r.o.
270
288
  *
271
289
  * Licensed under the Apache License, Version 2.0 (the "License");
272
290
  * you may not use this file except in compliance with the License.
@@ -284,7 +302,7 @@ declare const typescript: Linter.Config[];
284
302
  declare const unicorn: Linter.Config[];
285
303
 
286
304
  /**
287
- * Copyright 2024 MICRORISC s.r.o.
305
+ * Copyright 2024-2025 MICRORISC s.r.o.
288
306
  *
289
307
  * Licensed under the Apache License, Version 2.0 (the "License");
290
308
  * you may not use this file except in compliance with the License.
@@ -302,7 +320,7 @@ declare const unicorn: Linter.Config[];
302
320
  declare const vitest: Linter.Config[];
303
321
 
304
322
  /**
305
- * Copyright 2024 MICRORISC s.r.o.
323
+ * Copyright 2024-2025 MICRORISC s.r.o.
306
324
  *
307
325
  * Licensed under the Apache License, Version 2.0 (the "License");
308
326
  * you may not use this file except in compliance with the License.
@@ -329,7 +347,7 @@ declare function getVueVersion(): number;
329
347
  declare const vue: (options: Options) => Linter.Config[];
330
348
 
331
349
  /**
332
- * Copyright 2024 MICRORISC s.r.o.
350
+ * Copyright 2024-2025 MICRORISC s.r.o.
333
351
  *
334
352
  * Licensed under the Apache License, Version 2.0 (the "License");
335
353
  * you may not use this file except in compliance with the License.
@@ -384,7 +402,7 @@ declare const hasVuetify: boolean;
384
402
  declare const versionVue: string | undefined;
385
403
 
386
404
  /**
387
- * Copyright 2024 MICRORISC s.r.o.
405
+ * Copyright 2024-2025 MICRORISC s.r.o.
388
406
  *
389
407
  * Licensed under the Apache License, Version 2.0 (the "License");
390
408
  * you may not use this file except in compliance with the License.
@@ -411,7 +429,7 @@ interface IqrfEslintOptions {
411
429
  markdown: boolean;
412
430
  /** Node.js support - disabled by default. */
413
431
  node: boolean;
414
- /** Perfectionist rules - disabled by default. */
432
+ /** Perfectionist rules - enabled by default. */
415
433
  perfectionist: boolean;
416
434
  /** Pinia support - auto-enabled by default. */
417
435
  pinia: boolean;
@@ -432,7 +450,7 @@ interface IqrfEslintOptions {
432
450
  }
433
451
 
434
452
  /**
435
- * Copyright 2024 MICRORISC s.r.o.
453
+ * Copyright 2024-2025 MICRORISC s.r.o.
436
454
  *
437
455
  * Licensed under the Apache License, Version 2.0 (the "License");
438
456
  * you may not use this file except in compliance with the License.
@@ -455,4 +473,4 @@ interface IqrfEslintOptions {
455
473
  */
456
474
  declare function iqrfEslint(options?: Partial<IqrfEslintOptions>, config?: Linter.Config | Linter.Config[]): Linter.Config[];
457
475
 
458
- export { type IqrfEslintOptions, comments, cypress, getVueVersion, hasCypress, hasPinia, hasTypescript, hasVitest, hasVue, hasVueI18n, hasVuetify, imports, iqrfEslint, isInEditor, javascript, jsDoc, json, markdown, node, perfectionist, pinia, promise, regexp, stylistic, typescript, unicorn, versionVue, vitest, vue, vueI18n };
476
+ export { type IqrfEslintOptions, comments, cypress, getVueVersion, hasCypress, hasPinia, hasTypescript, hasVitest, hasVue, hasVueI18n, hasVuetify, imports, iqrfEslint, isInEditor, javascript, jsDoc, json, markdown, math, node, perfectionist, pinia, promise, regexp, stylistic, typescript, unicorn, versionVue, vitest, vue, vueI18n };
package/dist/index.js CHANGED
@@ -192,6 +192,18 @@ var json = [
192
192
  ...pluginJson.configs["flat/recommended-with-json"],
193
193
  {
194
194
  rules: {
195
+ "jsonc/array-bracket-spacing": [
196
+ "error",
197
+ "never"
198
+ ],
199
+ "jsonc/array-element-newline": [
200
+ "error",
201
+ "consistent"
202
+ ],
203
+ "jsonc/comma-style": [
204
+ "error",
205
+ "last"
206
+ ],
195
207
  "jsonc/indent": [
196
208
  "error",
197
209
  "tab",
@@ -204,6 +216,13 @@ var json = [
204
216
  "afterColon": true,
205
217
  "mode": "strict"
206
218
  }
219
+ ],
220
+ "jsonc/object-curly-newline": [
221
+ "error",
222
+ {
223
+ "consistent": true,
224
+ "multiline": true
225
+ }
207
226
  ]
208
227
  }
209
228
  }
@@ -260,6 +279,12 @@ var markdown = (options) => [
260
279
  ] : []
261
280
  ];
262
281
 
282
+ // src/configs/math.ts
283
+ import pluginMath from "eslint-plugin-math";
284
+ var math = [
285
+ pluginMath.configs.recommended
286
+ ];
287
+
263
288
  // src/configs/node.ts
264
289
  import pluginNode from "eslint-plugin-n";
265
290
  var node = [
@@ -288,6 +313,23 @@ var perfectionist = [
288
313
  "ignoreCase": false
289
314
  }
290
315
  ],
316
+ "perfectionist/sort-exports": [
317
+ "error",
318
+ {
319
+ "type": "alphabetical",
320
+ "order": "asc",
321
+ "ignoreCase": false
322
+ }
323
+ ],
324
+ "perfectionist/sort-named-exports": [
325
+ "error",
326
+ {
327
+ "type": "alphabetical",
328
+ "order": "asc",
329
+ "groupKind": "mixed",
330
+ "ignoreCase": false
331
+ }
332
+ ],
291
333
  "perfectionist/sort-named-imports": [
292
334
  "error",
293
335
  {
@@ -321,7 +363,9 @@ var promise = [
321
363
  ...pluginPromise.configs["flat/recommended"],
322
364
  rules: {
323
365
  ...pluginPromise.configs["flat/recommended"].rules,
324
- "promise/always-return": "warn"
366
+ "promise/always-return": "warn",
367
+ "promise/prefer-await-to-then": "warn",
368
+ "promise/prefer-catch": "error"
325
369
  }
326
370
  }
327
371
  ];
@@ -336,7 +380,8 @@ var regexp = [
336
380
  },
337
381
  rules: {
338
382
  ...pluginRegexp.configs["flat/recommended"].rules,
339
- "regexp/no-unused-capturing-group": "warn"
383
+ "regexp/no-unused-capturing-group": "warn",
384
+ "regexp/prefer-quantifier": "error"
340
385
  }
341
386
  }
342
387
  ];
@@ -608,7 +653,6 @@ var vitest = [
608
653
  ];
609
654
 
610
655
  // src/configs/vue.ts
611
- import { fixupPluginRules } from "@eslint/compat";
612
656
  import pluginVue from "eslint-plugin-vue";
613
657
  import pluginVueScopedCSS from "eslint-plugin-vue-scoped-css";
614
658
  import pluginVuetify from "eslint-plugin-vuetify";
@@ -629,15 +673,17 @@ var configs2 = getVueVersion() === 3 ? [
629
673
  ...pluginVue.configs["flat/vue2-recommended"],
630
674
  ...pluginVueScopedCSS.configs["flat/vue2-recommended"]
631
675
  ];
676
+ var vuetifyConfigs = [
677
+ ...pluginVuetify.configs["flat/base"],
678
+ ...pluginVuetify.configs["flat/recommended"]
679
+ ];
632
680
  var vue = (options) => [
633
681
  ...configs2,
682
+ ...options.vuetify ? vuetifyConfigs : [],
634
683
  {
635
684
  files: ["**/*.vue"],
636
685
  plugins: {
637
- vue: pluginVue,
638
- ...options.vuetify ? {
639
- vuetify: fixupPluginRules(pluginVuetify)
640
- } : {}
686
+ vue: pluginVue
641
687
  },
642
688
  languageOptions: {
643
689
  ecmaVersion: 2022,
@@ -690,15 +736,7 @@ var vue = (options) => [
690
736
  "always"
691
737
  ],
692
738
  "vue/prefer-template": "error",
693
- "vue/space-unary-ops": "error",
694
- "vue/valid-v-slot": [
695
- "error",
696
- { allowModifiers: options.vuetify }
697
- ],
698
- ...options.vuetify ? {
699
- ...pluginVuetify.configs.base.rules,
700
- ...pluginVuetify.configs.recommended.rules
701
- } : {}
739
+ "vue/space-unary-ops": "error"
702
740
  }
703
741
  }
704
742
  ];
@@ -732,7 +770,7 @@ function iqrfEslint(options = {}, config = []) {
732
770
  jsdoc: enableJsDoc = true,
733
771
  markdown: enableMarkdown = true,
734
772
  node: enableNode = false,
735
- perfectionist: enablePerfectionist = false,
773
+ perfectionist: enablePerfectionist = true,
736
774
  pinia: enablePinia = hasPinia,
737
775
  promise: enablePromise = true,
738
776
  regExp: enableRegExp = true,
@@ -802,6 +840,7 @@ function iqrfEslint(options = {}, config = []) {
802
840
  configs3.push(...json);
803
841
  configs3.push(...stylistic);
804
842
  configs3.push(...unicorn);
843
+ configs3.push(...math);
805
844
  if (Object.keys(config).length > 0) {
806
845
  configs3.push(...Array.isArray(config) ? config : [config]);
807
846
  }
@@ -825,6 +864,7 @@ export {
825
864
  jsDoc,
826
865
  json,
827
866
  markdown,
867
+ math,
828
868
  node,
829
869
  perfectionist,
830
870
  pinia,
package/package.json CHANGED
@@ -15,47 +15,45 @@
15
15
  ],
16
16
  "description": "ESLint configuration for IQRF projects",
17
17
  "dependencies": {
18
- "@eslint/compat": "^1.2.3",
19
- "@eslint/js": "^9.15.0",
20
- "@intlify/eslint-plugin-vue-i18n": "^3.0.0",
21
- "@stylistic/eslint-plugin": "^2.10.1",
22
- "@typescript-eslint/parser": "^8.14.0",
23
- "@vitest/eslint-plugin": "^1.1.10",
18
+ "@eslint/js": "^9.17.0",
19
+ "@intlify/eslint-plugin-vue-i18n": "^3.2.0",
20
+ "@stylistic/eslint-plugin": "^2.12.1",
21
+ "@typescript-eslint/parser": "^8.19.1",
22
+ "@vitest/eslint-plugin": "^1.1.24",
24
23
  "eslint-config-flat-gitignore": "^0.3.0",
25
- "eslint-import-resolver-typescript": "^3.6.3",
24
+ "eslint-import-resolver-typescript": "^3.7.0",
26
25
  "eslint-plugin-cypress": "^4.1.0",
27
26
  "eslint-plugin-eslint-comments": "^3.2.0",
28
- "eslint-plugin-import-x": "^4.4.2",
29
- "eslint-plugin-jsdoc": "^50.5.0",
30
- "eslint-plugin-jsonc": "^2.18.1",
27
+ "eslint-plugin-import-x": "^4.6.1",
28
+ "eslint-plugin-jsdoc": "^50.6.1",
29
+ "eslint-plugin-jsonc": "^2.18.2",
31
30
  "eslint-plugin-markdown": "^5.1.0",
32
31
  "eslint-plugin-math": "^0.6.0",
33
- "eslint-plugin-n": "^17.13.2",
34
- "eslint-plugin-perfectionist": "^3.9.1",
32
+ "eslint-plugin-n": "^17.15.1",
33
+ "eslint-plugin-perfectionist": "^4.6.0",
35
34
  "eslint-plugin-pinia": "^0.4.1",
36
- "eslint-plugin-promise": "^7.1.0",
35
+ "eslint-plugin-promise": "^7.2.1",
37
36
  "eslint-plugin-regexp": "^2.7.0",
38
- "eslint-plugin-unicorn": "^56.0.0",
39
- "eslint-plugin-vue": "^9.31.0",
40
- "eslint-plugin-vue-scoped-css": "^2.8.1",
41
- "eslint-plugin-vuetify": "^2.4.0",
42
- "globals": "^15.12.0",
43
- "jsonc-eslint-parser": "^2.4.0",
44
- "local-pkg": "^0.5.0",
45
- "typescript-eslint": "^8.14.0",
37
+ "eslint-plugin-unicorn": "^56.0.1",
38
+ "eslint-plugin-vue": "^9.32.0",
39
+ "eslint-plugin-vue-scoped-css": "^2.9.0",
40
+ "eslint-plugin-vuetify": "^2.5.1",
41
+ "globals": "^15.14.0",
42
+ "local-pkg": "^0.5.1",
43
+ "typescript-eslint": "^8.19.1",
46
44
  "vue-eslint-parser": "^9.4.3"
47
45
  },
48
46
  "devDependencies": {
49
47
  "@types/eslint": "^9.6.1",
50
48
  "@types/eslint-plugin-markdown": "^2.0.2",
51
49
  "@types/eslint__js": "^8.42.3",
52
- "@types/node": "^22.9.0",
53
- "bumpp": "^9.8.1",
54
- "eslint": "^9.15.0",
55
- "eslint-plugin-eslint-plugin": "^6.3.1",
50
+ "@types/node": "^22.10.5",
51
+ "bumpp": "^9.9.2",
52
+ "eslint": "^9.17.0",
53
+ "eslint-plugin-eslint-plugin": "^6.4.0",
56
54
  "tsup": "^8.3.5",
57
55
  "tsx": "^4.19.2",
58
- "typescript": "^5.6.3"
56
+ "typescript": "^5.7.2"
59
57
  },
60
58
  "engines": {
61
59
  "node": "^18.18.0 || >=20.0.0"
@@ -85,7 +83,7 @@
85
83
  },
86
84
  "type": "module",
87
85
  "types": "dist/index.d.ts",
88
- "version": "0.2.2",
86
+ "version": "0.2.4",
89
87
  "scripts": {
90
88
  "build": "tsup",
91
89
  "lint": "eslint .",