@mouse_484/eslint-config 5.9.2 → 5.10.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/README.md +3 -3
- package/package.json +2 -2
- package/src/configs/stylistic.js +0 -9
- package/src/configs/unicorn.js +1 -0
- package/src/index.js +1 -26
- package/src/lib/rules.gen.d.ts +1320 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ ESLint Config based on [@antfu/eslint-config](https://github.com/antfu/eslint-co
|
|
|
7
7
|
|
|
8
8
|
## Usage
|
|
9
9
|
Run the setup command:
|
|
10
|
-
```
|
|
10
|
+
```sh
|
|
11
11
|
npx @mouse_484/eslint-config@latest
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ npx @mouse_484/eslint-config@latest
|
|
|
27
27
|
|
|
28
28
|
## Advanced Configuration
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
### TypeScript
|
|
31
31
|
|
|
32
32
|
for type-aware linting
|
|
33
33
|
|
|
@@ -39,7 +39,7 @@ export default mouse({
|
|
|
39
39
|
})
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
### Tailwind CSS
|
|
43
43
|
|
|
44
44
|
```js
|
|
45
45
|
export default mouse({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mouse_484/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.10.0",
|
|
5
5
|
"author": "mouse_484",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/mouse484/config/tree/main/packages/eslint",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"typegen": "node scripts/typegen.js"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@antfu/eslint-config": "^7.
|
|
27
|
+
"@antfu/eslint-config": "^7.6.1",
|
|
28
28
|
"baseline-browser-mapping": "^2.10.0",
|
|
29
29
|
"eslint-plugin-better-tailwindcss": "^4.3.0",
|
|
30
30
|
"package-manager-detector": "^1.6.0"
|
package/src/configs/stylistic.js
CHANGED
package/src/configs/unicorn.js
CHANGED
package/src/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import antfu, { GLOB_JS, GLOB_JSX
|
|
2
|
-
import { isPackageExists } from 'local-pkg'
|
|
1
|
+
import antfu, { GLOB_JS, GLOB_JSX } from '@antfu/eslint-config'
|
|
3
2
|
import astro from './configs/astro.js'
|
|
4
3
|
import base from './configs/base.js'
|
|
5
4
|
import perfectionist from './configs/perfectionist.js'
|
|
@@ -19,30 +18,6 @@ async function mouse(options, ...userConfigs) {
|
|
|
19
18
|
...options,
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
if (options.formatters === true || typeof options.formatters === 'object') {
|
|
23
|
-
options.formatters = typeof options.formatters === 'boolean' ? {} : options.formatters
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @see https://github.com/antfu/eslint-config/blob/f6d1a566fbe3d76a9fdc12dcba87302b5f0c9301/src/configs/formatters.ts#L30-L39
|
|
27
|
-
*/
|
|
28
|
-
const isPrettierPluginXmlInScope = isPackageInScope('@prettier/plugin-xml')
|
|
29
|
-
options.formatters = {
|
|
30
|
-
astro: isPackageInScope('prettier-plugin-astro'),
|
|
31
|
-
css: true,
|
|
32
|
-
graphql: true,
|
|
33
|
-
html: true,
|
|
34
|
-
markdown: true,
|
|
35
|
-
slidev: isPackageExists('@slidev/cli'),
|
|
36
|
-
svg: isPrettierPluginXmlInScope,
|
|
37
|
-
xml: isPrettierPluginXmlInScope,
|
|
38
|
-
...options.formatters,
|
|
39
|
-
}
|
|
40
|
-
options.formatters.prettierOptions = {
|
|
41
|
-
printWidth: 100,
|
|
42
|
-
...options.formatters.prettierOptions,
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
21
|
const configs = [
|
|
47
22
|
...base(options),
|
|
48
23
|
// Code style
|