@mouse_484/eslint-config 4.0.2 → 4.0.4
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 +1 -1
- package/src/index.js +39 -23
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import antfu, {
|
|
3
3
|
GLOB_ASTRO,
|
|
4
|
-
GLOB_SRC,
|
|
5
4
|
GLOB_SVELTE,
|
|
6
5
|
} from '@antfu/eslint-config'
|
|
7
6
|
|
|
@@ -31,9 +30,11 @@ async function mouse(options, ...userConfigs) {
|
|
|
31
30
|
'antfu/top-level-function': 'off',
|
|
32
31
|
},
|
|
33
32
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
if (options?.stylistic) {
|
|
36
|
+
configs.push({
|
|
37
|
+
name: 'mouse/stylistic',
|
|
37
38
|
rules: {
|
|
38
39
|
'style/max-len': [
|
|
39
40
|
'error',
|
|
@@ -41,16 +42,9 @@ async function mouse(options, ...userConfigs) {
|
|
|
41
42
|
code: 100,
|
|
42
43
|
tabWidth: 2,
|
|
43
44
|
comments: 120,
|
|
45
|
+
ignoreUrls: true,
|
|
44
46
|
},
|
|
45
47
|
],
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
]
|
|
49
|
-
|
|
50
|
-
if (options?.stylistic) {
|
|
51
|
-
configs.push({
|
|
52
|
-
name: 'mouse/stylistic',
|
|
53
|
-
rules: {
|
|
54
48
|
'style/brace-style': [
|
|
55
49
|
'error',
|
|
56
50
|
'1tbs',
|
|
@@ -71,18 +65,27 @@ async function mouse(options, ...userConfigs) {
|
|
|
71
65
|
}
|
|
72
66
|
|
|
73
67
|
if (options?.svelte) {
|
|
74
|
-
configs.push(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
'
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
configs.push(
|
|
69
|
+
{
|
|
70
|
+
name: 'mouse/svelte/components',
|
|
71
|
+
files: [GLOB_SVELTE],
|
|
72
|
+
rules: {
|
|
73
|
+
'unicorn/filename-case': [
|
|
74
|
+
'error',
|
|
75
|
+
{
|
|
76
|
+
case: CASES.PascalCase,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
84
80
|
},
|
|
85
|
-
|
|
81
|
+
{
|
|
82
|
+
name: 'mouse/svelte/kit-routes',
|
|
83
|
+
files: ['**/src/routes/**/\+*.svelte'],
|
|
84
|
+
rules: {
|
|
85
|
+
'unicorn/filename-case': 'off',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
)
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
if (options?.unicorn) {
|
|
@@ -98,6 +101,19 @@ async function mouse(options, ...userConfigs) {
|
|
|
98
101
|
},
|
|
99
102
|
],
|
|
100
103
|
},
|
|
104
|
+
}, {
|
|
105
|
+
name: 'mouse/unicorn/filename-case',
|
|
106
|
+
files: [
|
|
107
|
+
'**/README.md',
|
|
108
|
+
/**
|
|
109
|
+
* Code block in markdown
|
|
110
|
+
* @see https://github.com/eslint/markdown/blob/32d8cbd8b6d2d121225b5291c2f9a0ea6c2ccd00/docs/processors/markdown.md?plain=1#L96
|
|
111
|
+
*/
|
|
112
|
+
'**/*.md/**',
|
|
113
|
+
],
|
|
114
|
+
rules: {
|
|
115
|
+
'unicorn/filename-case': 'off',
|
|
116
|
+
},
|
|
101
117
|
})
|
|
102
118
|
}
|
|
103
119
|
|