@iqrf/eslint-config 0.1.9 → 0.1.11

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/dist/index.d.ts CHANGED
@@ -139,6 +139,42 @@ 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 node: Linter.Config[];
159
+
160
+ /**
161
+ * Copyright 2024 MICRORISC s.r.o.
162
+ *
163
+ * Licensed under the Apache License, Version 2.0 (the "License");
164
+ * you may not use this file except in compliance with the License.
165
+ * You may obtain a copy of the License at
166
+ *
167
+ * http://www.apache.org/licenses/LICENSE-2.0
168
+ *
169
+ * Unless required by applicable law or agreed to in writing, software
170
+ * distributed under the License is distributed on an "AS IS" BASIS,
171
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
172
+ * See the License for the specific language governing permissions and
173
+ * limitations under the License.
174
+ */
175
+
176
+ declare const perfectionist: Linter.Config[];
177
+
142
178
  /**
143
179
  * Copyright 2024 MICRORISC s.r.o.
144
180
  *
@@ -373,6 +409,10 @@ interface IqrfEslintOptions {
373
409
  jsdoc: boolean;
374
410
  /** Markdown support - enabled by default. */
375
411
  markdown: boolean;
412
+ /** Node.js support - disabled by default. */
413
+ node: boolean;
414
+ /** Perfectionist rules - disabled by default. */
415
+ perfectionist: boolean;
376
416
  /** Pinia support - auto-enabled by default. */
377
417
  pinia: boolean;
378
418
  /** Promise support - enabled by default. */
@@ -415,4 +455,4 @@ interface IqrfEslintOptions {
415
455
  */
416
456
  declare function iqrfEslint(options?: Partial<IqrfEslintOptions>, config?: Linter.Config | Linter.Config[]): Linter.Config[];
417
457
 
418
- export { comments, cypress, getVueVersion, hasCypress, hasPinia, hasTypescript, hasVitest, hasVue, hasVueI18n, hasVuetify, imports, iqrfEslint, isInEditor, javascript, jsDoc, json, markdown, pinia, promise, regexp, stylistic, typescript, unicorn, versionVue, vitest, vue, vueI18n };
458
+ export { 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 };
package/dist/index.js CHANGED
@@ -258,6 +258,47 @@ var markdown = (options) => [
258
258
  ] : []
259
259
  ];
260
260
 
261
+ // src/configs/node.ts
262
+ import pluginNode from "eslint-plugin-n";
263
+ var node = [
264
+ pluginNode.configs["flat/recommended"],
265
+ {
266
+ rules: {
267
+ "n/no-missing-import": "off",
268
+ "n/no-missing-require": "off"
269
+ }
270
+ }
271
+ ];
272
+
273
+ // src/configs/perfectionist.ts
274
+ import pluginPerfectionist from "eslint-plugin-perfectionist";
275
+ var perfectionist = [
276
+ {
277
+ plugins: {
278
+ perfectionist: pluginPerfectionist
279
+ },
280
+ rules: {
281
+ "perfectionist/sort-array-includes": [
282
+ "error",
283
+ {
284
+ "type": "alphabetical",
285
+ "order": "asc",
286
+ "ignoreCase": false
287
+ }
288
+ ],
289
+ "perfectionist/sort-named-imports": [
290
+ "error",
291
+ {
292
+ "type": "alphabetical",
293
+ "order": "asc",
294
+ "groupKind": "mixed",
295
+ "ignoreCase": false
296
+ }
297
+ ]
298
+ }
299
+ }
300
+ ];
301
+
261
302
  // src/configs/pinia.ts
262
303
  import pluginPinia from "eslint-plugin-pinia";
263
304
  var pinia = [
@@ -645,6 +686,8 @@ function iqrfEslint(options = {}, config = []) {
645
686
  import: enableImport = true,
646
687
  jsdoc: enableJsDoc = true,
647
688
  markdown: enableMarkdown = true,
689
+ node: enableNode = false,
690
+ perfectionist: enablePerfectionist = false,
648
691
  pinia: enablePinia = hasPinia,
649
692
  promise: enablePromise = true,
650
693
  regExp: enableRegExp = true,
@@ -687,6 +730,12 @@ function iqrfEslint(options = {}, config = []) {
687
730
  if (enableMarkdown) {
688
731
  configs3.push(...markdown({ typescript: enableTypescript }));
689
732
  }
733
+ if (enableNode) {
734
+ configs3.push(...node);
735
+ }
736
+ if (enablePerfectionist) {
737
+ configs3.push(...perfectionist);
738
+ }
690
739
  if (enableVue) {
691
740
  configs3.push(...vue({
692
741
  typescript: enableTypescript,
@@ -731,6 +780,8 @@ export {
731
780
  jsDoc,
732
781
  json,
733
782
  markdown,
783
+ node,
784
+ perfectionist,
734
785
  pinia,
735
786
  promise,
736
787
  regexp,
package/package.json CHANGED
@@ -16,46 +16,47 @@
16
16
  "description": "ESLint configuration for IQRF projects",
17
17
  "dependencies": {
18
18
  "@eslint/compat": "^1.1.1",
19
- "@eslint/js": "^9.9.1",
19
+ "@eslint/js": "^9.11.0",
20
20
  "@intlify/eslint-plugin-vue-i18n": "^3.0.0",
21
- "@stylistic/eslint-plugin": "^2.6.4",
22
- "@typescript-eslint/parser": "^8.3.0",
23
- "@vitest/eslint-plugin": "^1.0.5",
24
- "eslint-config-flat-gitignore": "^0.1.8",
21
+ "@stylistic/eslint-plugin": "^2.8.0",
22
+ "@typescript-eslint/parser": "^8.6.0",
23
+ "@vitest/eslint-plugin": "^1.1.4",
24
+ "eslint-config-flat-gitignore": "^0.3.0",
25
25
  "eslint-import-resolver-typescript": "^3.6.3",
26
26
  "eslint-plugin-cypress": "^3.5.0",
27
27
  "eslint-plugin-deprecation": "^3.0.0",
28
28
  "eslint-plugin-eslint-comments": "^3.2.0",
29
- "eslint-plugin-import-x": "^4.0.0",
30
- "eslint-plugin-jsdoc": "^50.2.2",
29
+ "eslint-plugin-import-x": "^4.2.1",
30
+ "eslint-plugin-jsdoc": "^50.2.4",
31
31
  "eslint-plugin-jsonc": "^2.16.0",
32
32
  "eslint-plugin-markdown": "^5.1.0",
33
33
  "eslint-plugin-math": "^0.6.0",
34
- "eslint-plugin-perfectionist": "^3.2.0",
34
+ "eslint-plugin-n": "^17.10.3",
35
+ "eslint-plugin-perfectionist": "^3.6.0",
35
36
  "eslint-plugin-pinia": "^0.4.1",
36
37
  "eslint-plugin-promise": "^7.1.0",
37
38
  "eslint-plugin-regexp": "^2.6.0",
38
39
  "eslint-plugin-unicorn": "^55.0.0",
39
- "eslint-plugin-vue": "^9.27.0",
40
+ "eslint-plugin-vue": "^9.28.0",
40
41
  "eslint-plugin-vue-scoped-css": "^2.8.1",
41
42
  "eslint-plugin-vuetify": "^2.4.0",
42
43
  "globals": "^15.9.0",
43
44
  "jsonc-eslint-parser": "^2.4.0",
44
45
  "local-pkg": "^0.5.0",
45
- "typescript-eslint": "^8.3.0",
46
+ "typescript-eslint": "^8.6.0",
46
47
  "vue-eslint-parser": "^9.4.3"
47
48
  },
48
49
  "devDependencies": {
49
50
  "@types/eslint": "^9.6.1",
50
51
  "@types/eslint-plugin-markdown": "^2.0.2",
51
52
  "@types/eslint__js": "^8.42.3",
52
- "@types/node": "^22.5.0",
53
+ "@types/node": "^22.5.5",
53
54
  "bumpp": "^9.5.2",
54
- "eslint": "^9.9.1",
55
+ "eslint": "^9.11.0",
55
56
  "eslint-plugin-eslint-plugin": "^6.2.0",
56
- "tsup": "^8.2.4",
57
- "tsx": "^4.19.0",
58
- "typescript": "^5.5.4"
57
+ "tsup": "^8.3.0",
58
+ "tsx": "^4.19.1",
59
+ "typescript": "^5.6.2"
59
60
  },
60
61
  "engines": {
61
62
  "node": "^18.18.0 || >=20.0.0"
@@ -85,7 +86,7 @@
85
86
  },
86
87
  "type": "module",
87
88
  "types": "dist/index.d.ts",
88
- "version": "0.1.9",
89
+ "version": "0.1.11",
89
90
  "scripts": {
90
91
  "build": "tsup",
91
92
  "lint": "eslint .",