@alexlit/lint-kit 124.0.0 → 124.1.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/package.json
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
|
-
{
|
|
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,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "91.
|
|
3
|
+
"version": "91.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Eslint config",
|
|
6
6
|
"keywords": [
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"type": "module",
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"files": [
|
|
27
|
+
"plugins",
|
|
27
28
|
"README.md",
|
|
28
29
|
"index.js"
|
|
29
30
|
],
|
|
@@ -37,8 +38,10 @@
|
|
|
37
38
|
"@intlify/eslint-plugin-vue-i18n": "^3.0.0",
|
|
38
39
|
"@tanstack/eslint-plugin-query": "^5.51.15",
|
|
39
40
|
"eslint": "^9.8.0",
|
|
40
|
-
"eslint-
|
|
41
|
+
"eslint-config-prettier": "^9.1.0",
|
|
42
|
+
"eslint-plugin-jsdoc": "^48.10.2",
|
|
41
43
|
"eslint-plugin-perfectionist": "^3.0.0",
|
|
44
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
42
45
|
"eslint-plugin-regexp": "^2.6.0",
|
|
43
46
|
"eslint-plugin-sonarjs": "^1.0.4",
|
|
44
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 } }];
|