@iqrf/eslint-config 0.0.12 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +29 -11
  2. package/dist/index.js +18 -8
  3. package/package.json +10 -10
package/README.md CHANGED
@@ -1,18 +1,28 @@
1
- # @iqrf/eslint-config
1
+ # @iqrf/eslint-config
2
2
 
3
- Flat ESLint configuration for JavaScript, TypeScript, Vue 3 and Vuetify 3.
3
+ [![Build Status](https://gitlab.iqrf.org/open-source/iqrf-gateway-webapp-utils/eslint-config/badges/master/pipeline.svg)](https://gitlab.iqrf.org/open-source/iqrf-gateway-webapp-utils/eslint-config/-/commits/master)
4
+ [![NPM Version](https://img.shields.io/npm/v/%40iqrf%2Fiqrf-repository-client)](https://www.npmjs.com/package/@iqrf/iqrf-repository-client)
5
+ [![NPM Downloads](https://img.shields.io/npm/dm/%40iqrf%2Fiqrf-repository-client)](https://www.npmjs.com/package/@iqrf/iqrf-repository-client)
6
+ [![Apache License](https://img.shields.io/badge/license-APACHE2-blue.svg)](LICENSE)
7
+
8
+ Flat ESLint configuration for JavaScript, TypeScript, Vue.js and Vuetify 3.
4
9
 
5
10
  ## Features
6
11
 
7
12
  - [ESLint flat configuration](https://eslint.org/docs/latest/use/configure/configuration-files)
8
- - JavaScript
9
- - TypeScript
10
- - Vue 3
13
+ - Languages:
14
+ - JavaScript (with JSDoc)
15
+ - JSON
16
+ - Markdown
17
+ - TypeScript
18
+ - State managements:
19
+ - Pinia
20
+ - Testing frameworks:
21
+ - Cypress
22
+ - Vitest
23
+ - Vue.js 2 and 3
24
+ - vue-i18n
11
25
  - Vuetify 3
12
- - JSON
13
- - Markdown
14
- - Sort imports
15
- -
16
26
 
17
27
  ## Installation
18
28
 
@@ -39,11 +49,19 @@ import { iqrfEslint } from '@iqrf/eslint-config';
39
49
 
40
50
  export default iqrfEslint(
41
51
  {
52
+ cypress: true,
53
+ ignores: ['dist/', 'node_modules/'],
54
+ import: true,
55
+ jsdoc: true,
56
+ markdown: true,
57
+ pinia: true,
58
+ promise: true,
59
+ regExp: true,
42
60
  typescript: true,
61
+ vitest: true,
43
62
  vue: true,
63
+ vueI18n: true,
44
64
  vuetify: true,
45
- json: true,
46
- markdown: true,
47
65
  },
48
66
  [
49
67
  // Add your custom rules here
package/dist/index.js CHANGED
@@ -33,6 +33,13 @@ var commonRules = (options) => ({
33
33
  "error",
34
34
  "prefer-inline"
35
35
  ],
36
+ "import-x/no-named-as-default-member": "off",
37
+ "import-x/no-unresolved": [
38
+ "warn",
39
+ options.vue ? {
40
+ ignore: ["^virtual:"]
41
+ } : {}
42
+ ],
36
43
  "import-x/order": [
37
44
  "error",
38
45
  {
@@ -58,12 +65,6 @@ var commonRules = (options) => ({
58
65
  ],
59
66
  "newlines-between": "always"
60
67
  }
61
- ],
62
- "import-x/no-unresolved": [
63
- "warn",
64
- options.vue ? {
65
- ignore: ["^virtual:"]
66
- } : {}
67
68
  ]
68
69
  });
69
70
  var imports = (options) => [
@@ -546,8 +547,10 @@ var vitest = [
546
547
  ];
547
548
 
548
549
  // src/configs/vue.ts
550
+ import { fixupPluginRules as fixupPluginRules2 } from "@eslint/compat";
549
551
  import pluginVue from "eslint-plugin-vue";
550
552
  import pluginVueScopedCSS from "eslint-plugin-vue-scoped-css";
553
+ import pluginVuetify from "eslint-plugin-vuetify";
551
554
  import { getPackageInfoSync as getPackageInfoSync2 } from "local-pkg";
552
555
  import tsEslint2 from "typescript-eslint";
553
556
  import parserVue from "vue-eslint-parser";
@@ -570,7 +573,10 @@ var vue = (options) => [
570
573
  {
571
574
  files: ["**/*.vue"],
572
575
  plugins: {
573
- vue: pluginVue
576
+ vue: pluginVue,
577
+ ...options.vuetify ? {
578
+ vuetify: fixupPluginRules2(pluginVuetify)
579
+ } : {}
574
580
  },
575
581
  languageOptions: {
576
582
  ecmaVersion: 2022,
@@ -602,7 +608,11 @@ var vue = (options) => [
602
608
  "vue/valid-v-slot": [
603
609
  "error",
604
610
  { allowModifiers: options.vuetify }
605
- ]
611
+ ],
612
+ ...options.vuetify ? {
613
+ ...pluginVuetify.configs.base.rules,
614
+ ...pluginVuetify.configs.recommended.rules
615
+ } : {}
606
616
  }
607
617
  }
608
618
  ];
package/package.json CHANGED
@@ -16,22 +16,22 @@
16
16
  "description": "ESLint configuration for IQRF projects",
17
17
  "dependencies": {
18
18
  "@eslint/compat": "^1.1.1",
19
- "@eslint/js": "^9.6.0",
19
+ "@eslint/js": "^9.7.0",
20
20
  "@intlify/eslint-plugin-vue-i18n": "^3.0.0",
21
21
  "@stylistic/eslint-plugin": "^2.3.0",
22
- "eslint-config-flat-gitignore": "^0.1.7",
22
+ "eslint-config-flat-gitignore": "^0.1.8",
23
23
  "eslint-import-resolver-typescript": "^3.6.1",
24
24
  "eslint-plugin-cypress": "^3.3.0",
25
25
  "eslint-plugin-deprecation": "^3.0.0",
26
26
  "eslint-plugin-eslint-comments": "^3.2.0",
27
- "eslint-plugin-import-x": "^0.5.3",
28
- "eslint-plugin-jsdoc": "^48.7.0",
27
+ "eslint-plugin-import-x": "^3.0.1",
28
+ "eslint-plugin-jsdoc": "^48.8.3",
29
29
  "eslint-plugin-jsonc": "^2.16.0",
30
30
  "eslint-plugin-markdown": "^5.1.0",
31
31
  "eslint-plugin-math": "^0.6.0",
32
32
  "eslint-plugin-perfectionist": "^2.11.0",
33
33
  "eslint-plugin-pinia": "^0.2.0",
34
- "eslint-plugin-promise": "^6.4.0",
34
+ "eslint-plugin-promise": "^6.6.0",
35
35
  "eslint-plugin-regexp": "^2.6.0",
36
36
  "eslint-plugin-unicorn": "^54.0.0",
37
37
  "eslint-plugin-vitest": "^0.5.4",
@@ -41,18 +41,18 @@
41
41
  "globals": "^15.8.0",
42
42
  "jsonc-eslint-parser": "^2.4.0",
43
43
  "local-pkg": "^0.5.0",
44
- "typescript-eslint": "^7.16.0",
44
+ "typescript-eslint": "^7.16.1",
45
45
  "vue-eslint-parser": "^9.4.3"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/eslint": "^8.56.10",
49
49
  "@types/eslint-plugin-markdown": "^2.0.2",
50
50
  "@types/eslint__js": "^8.42.3",
51
- "@types/node": "^20.14.10",
51
+ "@types/node": "^20.14.11",
52
52
  "bumpp": "^9.4.1",
53
- "eslint": "^9.6.0",
53
+ "eslint": "^9.7.0",
54
54
  "eslint-plugin-eslint-plugin": "^6.2.0",
55
- "tsup": "^8.1.0",
55
+ "tsup": "^8.2.2",
56
56
  "tsx": "^4.16.2",
57
57
  "typescript": "^5.5.3"
58
58
  },
@@ -84,7 +84,7 @@
84
84
  },
85
85
  "type": "module",
86
86
  "types": "dist/index.d.ts",
87
- "version": "0.0.12",
87
+ "version": "0.1.1",
88
88
  "scripts": {
89
89
  "build": "tsup",
90
90
  "lint": "eslint .",