@iqrf/eslint-config 0.2.1 → 0.2.3
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/README.md +2 -2
- package/dist/index.d.ts +19 -1
- package/dist/index.js +35 -15
- package/package.json +24 -26
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @iqrf/eslint-config
|
|
2
2
|
|
|
3
3
|
[](https://gitlab.iqrf.org/open-source/iqrf-gateway-webapp-utils/eslint-config/-/commits/master)
|
|
4
|
-
[](https://www.npmjs.com/package/@iqrf/eslint-config)
|
|
5
|
+
[](https://www.npmjs.com/package/@iqrf/eslint-config)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
Flat ESLint configuration for JavaScript, TypeScript, Vue.js and Vuetify 3.
|
package/dist/index.d.ts
CHANGED
|
@@ -139,6 +139,24 @@ interface Options$1 {
|
|
|
139
139
|
}
|
|
140
140
|
declare const markdown: (options: Options$1) => Linter.Config[];
|
|
141
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Copyright 2024 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
|
+
|
|
142
160
|
/**
|
|
143
161
|
* Copyright 2024 MICRORISC s.r.o.
|
|
144
162
|
*
|
|
@@ -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
|
@@ -260,6 +260,12 @@ var markdown = (options) => [
|
|
|
260
260
|
] : []
|
|
261
261
|
];
|
|
262
262
|
|
|
263
|
+
// src/configs/math.ts
|
|
264
|
+
import pluginMath from "eslint-plugin-math";
|
|
265
|
+
var math = [
|
|
266
|
+
pluginMath.configs.recommended
|
|
267
|
+
];
|
|
268
|
+
|
|
263
269
|
// src/configs/node.ts
|
|
264
270
|
import pluginNode from "eslint-plugin-n";
|
|
265
271
|
var node = [
|
|
@@ -452,13 +458,32 @@ var configs = [
|
|
|
452
458
|
fixStyle: "inline-type-imports"
|
|
453
459
|
}
|
|
454
460
|
],
|
|
461
|
+
"@typescript-eslint/dot-notation": [
|
|
462
|
+
"error",
|
|
463
|
+
{
|
|
464
|
+
allowKeywords: true
|
|
465
|
+
}
|
|
466
|
+
],
|
|
455
467
|
"@typescript-eslint/explicit-member-accessibility": "error",
|
|
456
468
|
"@typescript-eslint/no-duplicate-enum-values": "warn",
|
|
457
469
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
|
470
|
+
"@typescript-eslint/no-empty-function": [
|
|
471
|
+
"error",
|
|
472
|
+
{
|
|
473
|
+
allow: ["arrowFunctions"]
|
|
474
|
+
}
|
|
475
|
+
],
|
|
458
476
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
459
477
|
"@typescript-eslint/no-extraneous-class": "off",
|
|
460
478
|
"@typescript-eslint/no-inferrable-types": "off",
|
|
461
|
-
"@typescript-eslint/no-unsafe-call": "warn"
|
|
479
|
+
"@typescript-eslint/no-unsafe-call": "warn",
|
|
480
|
+
"@typescript-eslint/no-unused-expressions": [
|
|
481
|
+
"error",
|
|
482
|
+
{
|
|
483
|
+
allowShortCircuit: true,
|
|
484
|
+
allowTernary: true
|
|
485
|
+
}
|
|
486
|
+
]
|
|
462
487
|
}
|
|
463
488
|
}
|
|
464
489
|
];
|
|
@@ -589,7 +614,6 @@ var vitest = [
|
|
|
589
614
|
];
|
|
590
615
|
|
|
591
616
|
// src/configs/vue.ts
|
|
592
|
-
import { fixupPluginRules } from "@eslint/compat";
|
|
593
617
|
import pluginVue from "eslint-plugin-vue";
|
|
594
618
|
import pluginVueScopedCSS from "eslint-plugin-vue-scoped-css";
|
|
595
619
|
import pluginVuetify from "eslint-plugin-vuetify";
|
|
@@ -610,15 +634,17 @@ var configs2 = getVueVersion() === 3 ? [
|
|
|
610
634
|
...pluginVue.configs["flat/vue2-recommended"],
|
|
611
635
|
...pluginVueScopedCSS.configs["flat/vue2-recommended"]
|
|
612
636
|
];
|
|
637
|
+
var vuetifyConfigs = [
|
|
638
|
+
...pluginVuetify.configs["flat/base"],
|
|
639
|
+
...pluginVuetify.configs["flat/recommended"]
|
|
640
|
+
];
|
|
613
641
|
var vue = (options) => [
|
|
614
642
|
...configs2,
|
|
643
|
+
...options.vuetify ? vuetifyConfigs : [],
|
|
615
644
|
{
|
|
616
645
|
files: ["**/*.vue"],
|
|
617
646
|
plugins: {
|
|
618
|
-
vue: pluginVue
|
|
619
|
-
...options.vuetify ? {
|
|
620
|
-
vuetify: fixupPluginRules(pluginVuetify)
|
|
621
|
-
} : {}
|
|
647
|
+
vue: pluginVue
|
|
622
648
|
},
|
|
623
649
|
languageOptions: {
|
|
624
650
|
ecmaVersion: 2022,
|
|
@@ -671,15 +697,7 @@ var vue = (options) => [
|
|
|
671
697
|
"always"
|
|
672
698
|
],
|
|
673
699
|
"vue/prefer-template": "error",
|
|
674
|
-
"vue/space-unary-ops": "error"
|
|
675
|
-
"vue/valid-v-slot": [
|
|
676
|
-
"error",
|
|
677
|
-
{ allowModifiers: options.vuetify }
|
|
678
|
-
],
|
|
679
|
-
...options.vuetify ? {
|
|
680
|
-
...pluginVuetify.configs.base.rules,
|
|
681
|
-
...pluginVuetify.configs.recommended.rules
|
|
682
|
-
} : {}
|
|
700
|
+
"vue/space-unary-ops": "error"
|
|
683
701
|
}
|
|
684
702
|
}
|
|
685
703
|
];
|
|
@@ -783,6 +801,7 @@ function iqrfEslint(options = {}, config = []) {
|
|
|
783
801
|
configs3.push(...json);
|
|
784
802
|
configs3.push(...stylistic);
|
|
785
803
|
configs3.push(...unicorn);
|
|
804
|
+
configs3.push(...math);
|
|
786
805
|
if (Object.keys(config).length > 0) {
|
|
787
806
|
configs3.push(...Array.isArray(config) ? config : [config]);
|
|
788
807
|
}
|
|
@@ -806,6 +825,7 @@ export {
|
|
|
806
825
|
jsDoc,
|
|
807
826
|
json,
|
|
808
827
|
markdown,
|
|
828
|
+
math,
|
|
809
829
|
node,
|
|
810
830
|
perfectionist,
|
|
811
831
|
pinia,
|
package/package.json
CHANGED
|
@@ -15,47 +15,45 @@
|
|
|
15
15
|
],
|
|
16
16
|
"description": "ESLint configuration for IQRF projects",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@eslint/
|
|
19
|
-
"@eslint/js": "^9.12.0",
|
|
18
|
+
"@eslint/js": "^9.15.0",
|
|
20
19
|
"@intlify/eslint-plugin-vue-i18n": "^3.0.0",
|
|
21
|
-
"@stylistic/eslint-plugin": "^2.
|
|
22
|
-
"@typescript-eslint/parser": "^8.
|
|
23
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
20
|
+
"@stylistic/eslint-plugin": "^2.10.1",
|
|
21
|
+
"@typescript-eslint/parser": "^8.14.0",
|
|
22
|
+
"@vitest/eslint-plugin": "^1.1.10",
|
|
24
23
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
25
24
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
26
|
-
"eslint-plugin-cypress": "^
|
|
25
|
+
"eslint-plugin-cypress": "^4.1.0",
|
|
27
26
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
28
|
-
"eslint-plugin-import-x": "^4.
|
|
29
|
-
"eslint-plugin-jsdoc": "^50.
|
|
30
|
-
"eslint-plugin-jsonc": "^2.
|
|
27
|
+
"eslint-plugin-import-x": "^4.4.2",
|
|
28
|
+
"eslint-plugin-jsdoc": "^50.5.0",
|
|
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.
|
|
34
|
-
"eslint-plugin-perfectionist": "^3.
|
|
32
|
+
"eslint-plugin-n": "^17.13.2",
|
|
33
|
+
"eslint-plugin-perfectionist": "^3.9.1",
|
|
35
34
|
"eslint-plugin-pinia": "^0.4.1",
|
|
36
35
|
"eslint-plugin-promise": "^7.1.0",
|
|
37
|
-
"eslint-plugin-regexp": "^2.
|
|
38
|
-
"eslint-plugin-unicorn": "^
|
|
39
|
-
"eslint-plugin-vue": "^9.
|
|
36
|
+
"eslint-plugin-regexp": "^2.7.0",
|
|
37
|
+
"eslint-plugin-unicorn": "^56.0.0",
|
|
38
|
+
"eslint-plugin-vue": "^9.31.0",
|
|
40
39
|
"eslint-plugin-vue-scoped-css": "^2.8.1",
|
|
41
|
-
"eslint-plugin-vuetify": "^2.
|
|
42
|
-
"globals": "^15.
|
|
43
|
-
"jsonc-eslint-parser": "^2.4.0",
|
|
40
|
+
"eslint-plugin-vuetify": "^2.5.1",
|
|
41
|
+
"globals": "^15.12.0",
|
|
44
42
|
"local-pkg": "^0.5.0",
|
|
45
|
-
"typescript-eslint": "^8.
|
|
43
|
+
"typescript-eslint": "^8.14.0",
|
|
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.
|
|
53
|
-
"bumpp": "^9.
|
|
54
|
-
"eslint": "^9.
|
|
55
|
-
"eslint-plugin-eslint-plugin": "^6.2
|
|
56
|
-
"tsup": "^8.3.
|
|
57
|
-
"tsx": "^4.19.
|
|
58
|
-
"typescript": "^5.6.
|
|
50
|
+
"@types/node": "^22.9.0",
|
|
51
|
+
"bumpp": "^9.8.1",
|
|
52
|
+
"eslint": "^9.15.0",
|
|
53
|
+
"eslint-plugin-eslint-plugin": "^6.3.2",
|
|
54
|
+
"tsup": "^8.3.5",
|
|
55
|
+
"tsx": "^4.19.2",
|
|
56
|
+
"typescript": "^5.6.3"
|
|
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.
|
|
86
|
+
"version": "0.2.3",
|
|
89
87
|
"scripts": {
|
|
90
88
|
"build": "tsup",
|
|
91
89
|
"lint": "eslint .",
|