@alexlit/config-eslint 92.0.0 → 92.0.2

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 CHANGED
@@ -31,3 +31,7 @@ npm i @alexlit/config-eslint -D
31
31
 
32
32
  export default [...typescript, ...unicorn, ...vitest];
33
33
  ```
34
+
35
+ ## Usefull links
36
+
37
+ - [Awesome ESLint](https://github.com/dustinspecker/awesome-eslint)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-eslint",
3
- "version": "92.0.0",
3
+ "version": "92.0.2",
4
4
  "private": false,
5
5
  "description": "Eslint config",
6
6
  "keywords": [
@@ -29,6 +29,7 @@
29
29
  "index.js"
30
30
  ],
31
31
  "scripts": {
32
+ "inspect": "npx @eslint/config-inspector@latest",
32
33
  "release": "../../scripts/release.sh",
33
34
  "semver": "../../scripts/semver.sh",
34
35
  "up": "../../scripts/up.sh"
@@ -34,6 +34,7 @@ export const javascript = [
34
34
  ],
35
35
  },
36
36
  ],
37
+ 'prefer-template': 'warn',
37
38
  },
38
39
  },
39
40
  ];
@@ -19,7 +19,19 @@ const fixes = {
19
19
  };
20
20
 
21
21
  /** @see [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) */
22
- export const prettier = [plugin, { rules: { ...fixes } }];
22
+ export const prettier = [
23
+ plugin,
24
+ {
25
+ files: ['**/*.vue'],
26
+ rules: { ...fixes },
27
+ },
28
+ ];
23
29
 
24
30
  /** @see [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) */
25
- export const prettierConfig = [config, { rules: { ...fixes } }];
31
+ export const prettierConfig = [
32
+ config,
33
+ {
34
+ files: ['**/*.vue'],
35
+ rules: { ...fixes },
36
+ },
37
+ ];
@@ -4,10 +4,4 @@ import plugin from 'typescript-eslint';
4
4
  export const typescript = [
5
5
  ...plugin.configs.strict,
6
6
  ...plugin.configs.stylistic,
7
-
8
- {
9
- rules: {
10
- '@typescript-eslint/consistent-type-assertions': 'off', // too slow
11
- },
12
- },
13
7
  ];
@@ -4,6 +4,7 @@ import plugin from 'eslint-plugin-vuejs-accessibility';
4
4
  export const vueAccessibility = [
5
5
  ...plugin.configs['flat/recommended'],
6
6
  {
7
+ files: ['**/*.vue'],
7
8
  rules: {
8
9
  'vuejs-accessibility/label-has-for': [
9
10
  'warn',
@@ -4,6 +4,7 @@ import plugin from '@intlify/eslint-plugin-vue-i18n';
4
4
  export const vueI18n = [
5
5
  ...plugin.configs['flat/recommended'],
6
6
  {
7
+ files: ['**/*.vue'],
7
8
  rules: {
8
9
  '@intlify/vue-i18n/key-format-style': [
9
10
  'error',
package/plugins/vue.js CHANGED
@@ -7,18 +7,13 @@ export const vue = [
7
7
  {
8
8
  files: ['**/*.vue'],
9
9
  languageOptions: { parserOptions: { parser: typescript.parser } },
10
- },
11
- {
12
- files: ['**/pages/**/*', '**/layouts/**/*'],
13
- rules: { 'vue/multi-word-component-names': 'off' },
14
- },
15
- {
16
10
  rules: {
17
11
  'vue/attributes-order': ['error', { alphabetical: true }],
18
12
  'vue/block-lang': [
19
13
  'error',
20
14
  { script: { lang: 'ts' }, style: { lang: 'scss' }, template: {} },
21
15
  ],
16
+ 'vue/block-order': ['error', { order: ['script', 'template', 'style'] }],
22
17
  'vue/component-api-style': ['error', ['script-setup']],
23
18
  'vue/component-definition-name-casing': ['error', 'kebab-case'],
24
19
  'vue/component-name-in-template-casing': [
@@ -27,10 +22,6 @@ export const vue = [
27
22
  { registeredComponentsOnly: false },
28
23
  ],
29
24
  'vue/component-options-name-casing': ['error', 'PascalCase'],
30
- 'vue/component-tags-order': [
31
- 'error',
32
- { order: ['script', 'template', 'style'] },
33
- ],
34
25
  'vue/define-emits-declaration': ['error'],
35
26
  'vue/define-macros-order': [
36
27
  'error',
@@ -85,7 +76,6 @@ export const vue = [
85
76
  'vue/no-deprecated-slot-scope-attribute': ['error'],
86
77
  'vue/no-duplicate-attr-inheritance': ['error'],
87
78
  'vue/no-empty-component-block': ['error'],
88
- 'vue/no-invalid-model-keys': ['error'],
89
79
  'vue/no-irregular-whitespace': ['error'],
90
80
  'vue/no-loss-of-precision': ['error'],
91
81
  'vue/no-multiple-objects-in-class': ['error'],
@@ -169,4 +159,8 @@ export const vue = [
169
159
  'vue/valid-v-slot': ['error'],
170
160
  },
171
161
  },
162
+ {
163
+ files: ['**/pages/**/*.vue', '**/layouts/**/*.vue'],
164
+ rules: { 'vue/multi-word-component-names': 'off' },
165
+ },
172
166
  ];