@naturalcycles/dev-lib 13.36.0 → 13.37.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.
@@ -445,5 +445,53 @@ module.exports = {
445
445
  '@typescript-eslint/dot-notation': 0, // not always desireable
446
446
  '@typescript-eslint/consistent-indexed-object-style': 0, // Record looses the name of the key
447
447
  '@typescript-eslint/no-unsafe-enum-comparison': 0, // not practically helpful
448
+ // non-default vue rules
449
+ 'vue/block-order': [
450
+ 'error',
451
+ {
452
+ order: ['script', 'template', 'style'],
453
+ },
454
+ ],
455
+ 'vue/component-api-style': [2, ['script-setup', 'composition', 'composition-vue2']],
456
+ 'vue/component-name-in-template-casing': [
457
+ 2,
458
+ 'PascalCase',
459
+ {
460
+ registeredComponentsOnly: true,
461
+ },
462
+ ],
463
+ 'vue/component-options-name-casing': [2, 'PascalCase'],
464
+ 'vue/custom-event-name-casing': [2, 'camelCase'],
465
+ 'vue/define-emits-declaration': [2, 'type-based'],
466
+ 'vue/define-macros-order': 2,
467
+ 'vue/define-props-declaration': 2,
468
+ 'vue/html-comment-content-spacing': 2,
469
+ 'vue/match-component-file-name': [
470
+ 2,
471
+ {
472
+ extensions: ['vue', 'jsx'],
473
+ shouldMatchCase: true,
474
+ },
475
+ ],
476
+ 'vue/match-component-import-name': 2,
477
+ 'vue/no-boolean-default': 2,
478
+ 'vue/no-deprecated-model-definition': 2,
479
+ 'vue/no-multiple-objects-in-class': 2,
480
+ 'vue/no-ref-object-destructure': 2,
481
+ 'vue/no-required-prop-with-default': 2,
482
+ 'vue/no-root-v-if': 2,
483
+ 'vue/no-this-in-before-route-enter': 2,
484
+ 'vue/padding-line-between-blocks': 2,
485
+ 'vue/prefer-define-options': 2,
486
+ 'vue/prefer-separate-static-class': 2,
487
+ 'vue/require-direct-export': 2,
488
+ 'vue/require-emit-validator': 2,
489
+ 'vue/require-expose': 2,
490
+ 'vue/require-macro-variable-name': 2,
491
+ 'vue/require-typed-object-prop': 2,
492
+ 'vue/require-typed-ref': 2,
493
+ 'vue/v-for-delimiter-style': [2, 'of'],
494
+ 'vue/valid-define-options': 2,
495
+ 'vue/eqeqeq': 2,
448
496
  },
449
497
  }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @naturalcycles/dev-lib/cfg/eslint-vue2.config.js
3
+ */
4
+
5
+ module.exports = {
6
+ overrides: [
7
+ {
8
+ files: ['*.vue'],
9
+ extends: [
10
+ 'eslint:recommended',
11
+ 'plugin:@typescript-eslint/recommended-type-checked',
12
+ 'plugin:@typescript-eslint/stylistic-type-checked',
13
+ 'plugin:unicorn/recommended',
14
+ 'plugin:vue/recommended',
15
+ './eslint-rules.js',
16
+ 'prettier', // must go last
17
+ ],
18
+ env: {
19
+ browser: true,
20
+ },
21
+ parser: 'vue-eslint-parser',
22
+ parserOptions: {
23
+ parser: '@typescript-eslint/parser',
24
+ project: ['tsconfig.json'],
25
+ sourceType: 'module',
26
+ ecmaVersion: 'latest',
27
+ extraFileExtensions: ['.vue'],
28
+ },
29
+ },
30
+ ],
31
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @naturalcycles/dev-lib/cfg/eslint-vue3.config.js
3
+ */
4
+
5
+ module.exports = {
6
+ overrides: [
7
+ {
8
+ files: ['*.vue'],
9
+ extends: [
10
+ 'eslint:recommended',
11
+ 'plugin:@typescript-eslint/recommended-type-checked',
12
+ 'plugin:@typescript-eslint/stylistic-type-checked',
13
+ 'plugin:unicorn/recommended',
14
+ 'plugin:vue/vue3-recommended',
15
+ './eslint-rules.js',
16
+ 'prettier', // must go last
17
+ ],
18
+ env: {
19
+ browser: true,
20
+ },
21
+ parser: 'vue-eslint-parser',
22
+ parserOptions: {
23
+ parser: '@typescript-eslint/parser',
24
+ project: ['tsconfig.json'],
25
+ sourceType: 'module',
26
+ ecmaVersion: 'latest',
27
+ extraFileExtensions: ['.vue'],
28
+ },
29
+ },
30
+ ],
31
+ }
@@ -37,15 +37,15 @@ module.exports = {
37
37
  // 'plugin:import/recommended',
38
38
  // https://github.com/import-js/eslint-plugin-import/blob/main/config/typescript.js
39
39
  // 'plugin:import/typescript',
40
- './eslint-rules.js',
41
40
  hasJest && './eslint-jest-rules.js',
41
+ './eslint-rules.js',
42
42
  'prettier', // must be last! it only turns off eslint rules that conflict with prettier
43
43
  ].filter(Boolean),
44
44
  parser: '@typescript-eslint/parser',
45
45
  parserOptions: {
46
46
  project: ['tsconfig.json'],
47
47
  sourceType: 'module',
48
- ecmaVersion: 2020,
48
+ ecmaVersion: 'latest',
49
49
  extraFileExtensions: ['.vue', '.html'],
50
50
  },
51
51
  plugins: [
@@ -58,29 +58,5 @@ module.exports = {
58
58
  'unicorn',
59
59
  ].filter(Boolean),
60
60
  },
61
- {
62
- files: ['*.vue'],
63
- extends: [
64
- 'eslint:recommended',
65
- 'plugin:@typescript-eslint/recommended',
66
- 'plugin:@typescript-eslint/recommended-requiring-type-checking',
67
- 'plugin:unicorn/recommended',
68
- './eslint-rules.js',
69
- 'plugin:vue/recommended',
70
- 'prettier', // must go last
71
- ],
72
- env: {
73
- browser: true,
74
- },
75
- parser: 'vue-eslint-parser',
76
- parserOptions: {
77
- parser: '@typescript-eslint/parser',
78
- project: ['tsconfig.json'],
79
- sourceType: 'module',
80
- ecmaVersion: 2020,
81
- extraFileExtensions: ['.vue'],
82
- // createDefaultProgram: true,
83
- },
84
- },
85
61
  ],
86
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
- "version": "13.36.0",
3
+ "version": "13.37.0",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "tsn-debug": "tsn testScript.ts",