@alexlit/config-eslint 91.0.2 → 91.2.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.
package/index.js CHANGED
@@ -4,6 +4,7 @@ import globals from 'globals';
4
4
  import { javascript } from './plugins/javascript.js';
5
5
  import { jsdoc } from './plugins/jsdoc.js';
6
6
  import { perfectionist } from './plugins/perfectionist.js';
7
+ import { prettier, prettierConfig } from './plugins/prettier.js';
7
8
  import { regexp } from './plugins/regexp.js';
8
9
  import { sonar } from './plugins/sonar.js';
9
10
  import { tanstackQuery } from './plugins/tanstack-query.js';
@@ -15,7 +16,21 @@ import { vueI18n } from './plugins/vue-i18n.js';
15
16
  import { vue } from './plugins/vue.js';
16
17
 
17
18
  export const config = [
18
- { files: ['**/*.{js,mjs,cjs,typescript,vue}'] },
19
+ {
20
+ files: ['**/*.{js,mjs,cjs,typescript,vue}'],
21
+ ignores: [
22
+ '**/.temp',
23
+ '**/mockServiceWorker.js',
24
+ '.histoire',
25
+ '.nuxt',
26
+ 'build',
27
+ 'dist',
28
+ 'docs',
29
+ 'storybook-*',
30
+ 'sw.js',
31
+ ],
32
+ },
33
+
19
34
  { languageOptions: { globals: globals.browser } },
20
35
 
21
36
  ...javascript,
@@ -30,12 +45,16 @@ export const config = [
30
45
  ...vue,
31
46
  ...vueAccessibility,
32
47
  ...vueI18n,
48
+
49
+ ...prettierConfig, // must be last
33
50
  ];
34
51
 
35
52
  export {
36
53
  javascript,
37
54
  jsdoc,
38
55
  perfectionist,
56
+ prettier,
57
+ prettierConfig,
39
58
  regexp,
40
59
  sonar,
41
60
  tanstackQuery,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-eslint",
3
- "version": "91.0.2",
3
+ "version": "91.2.0",
4
4
  "private": false,
5
5
  "description": "Eslint config",
6
6
  "keywords": [
@@ -38,8 +38,10 @@
38
38
  "@intlify/eslint-plugin-vue-i18n": "^3.0.0",
39
39
  "@tanstack/eslint-plugin-query": "^5.51.15",
40
40
  "eslint": "^9.8.0",
41
- "eslint-plugin-jsdoc": "^48.10.1",
41
+ "eslint-config-prettier": "^9.1.0",
42
+ "eslint-plugin-jsdoc": "^48.10.2",
42
43
  "eslint-plugin-perfectionist": "^3.0.0",
44
+ "eslint-plugin-prettier": "^5.2.1",
43
45
  "eslint-plugin-regexp": "^2.6.0",
44
46
  "eslint-plugin-sonarjs": "^1.0.4",
45
47
  "eslint-plugin-unicorn": "^55.0.0",
@@ -0,0 +1,25 @@
1
+ import config from 'eslint-config-prettier';
2
+ import plugin from 'eslint-plugin-prettier/recommended';
3
+
4
+ const fixes = {
5
+ // fix for prettier/vue
6
+ 'vue/html-self-closing': [
7
+ 'error',
8
+ {
9
+ html: {
10
+ component: 'always',
11
+ normal: 'never',
12
+ void: 'always',
13
+ },
14
+
15
+ math: 'always',
16
+ svg: 'always',
17
+ },
18
+ ],
19
+ };
20
+
21
+ /** @see [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) */
22
+ export const prettier = [plugin, { rules: { ...fixes } }];
23
+
24
+ /** @see [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) */
25
+ export const prettierConfig = [config, { rules: { ...fixes } }];
@@ -6,10 +6,8 @@ export const typescript = [
6
6
  ...plugin.configs.stylistic,
7
7
 
8
8
  {
9
- languageOptions: {
10
- parserOptions: {
11
- project: ['./tsconfig.json'],
12
- },
9
+ rules: {
10
+ '@typescript-eslint/consistent-type-assertions': 'off', // too slow
13
11
  },
14
12
  },
15
13
  ];