@switz/eslint-config 12.1.0 → 12.1.1
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 +17 -32
- package/package.json +2 -2
- package/react.mjs +3 -1
- package/tailwind.mjs +1 -2
package/README.md
CHANGED
|
@@ -2,59 +2,44 @@ HI
|
|
|
2
2
|
|
|
3
3
|
# switz's eslint-config
|
|
4
4
|
|
|
5
|
-
## Motivation
|
|
6
|
-
|
|
7
|
-
I've had this lying around in my home dir `~/.eslintrc.js` for a while and decided to package it up so I can override it in project settings (e.g. targets) and include it in my personal projects.
|
|
8
|
-
|
|
9
|
-
You probably have your own preferences, feel free to hack and slash it.
|
|
10
|
-
|
|
11
5
|
## Installation
|
|
12
6
|
|
|
13
7
|
```
|
|
14
|
-
|
|
15
|
-
$ yarn add -D @switz/eslint-config
|
|
8
|
+
$ yarn add -D eslint @switz/eslint-config
|
|
16
9
|
# or
|
|
17
|
-
$
|
|
10
|
+
$ pnpm install -D eslint @switz/eslint-config
|
|
18
11
|
```
|
|
19
12
|
|
|
20
|
-
Update your eslint config (
|
|
13
|
+
Update your eslint config (`eslint.config.mjs`)
|
|
21
14
|
|
|
22
15
|
```
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
]
|
|
27
|
-
}
|
|
16
|
+
import main from '@switz/eslint-config';
|
|
17
|
+
|
|
18
|
+
export default [...main];
|
|
28
19
|
```
|
|
29
20
|
|
|
30
21
|
If you need React support, use
|
|
31
22
|
|
|
32
23
|
```
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
]
|
|
37
|
-
}
|
|
24
|
+
import react from '@switz/eslint-config/react';
|
|
25
|
+
|
|
26
|
+
export default [...react];
|
|
38
27
|
```
|
|
39
28
|
|
|
40
|
-
Or
|
|
29
|
+
Or typescript:
|
|
41
30
|
|
|
42
31
|
```
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
]
|
|
47
|
-
}
|
|
32
|
+
import typescript from '@switz/eslint-config/typescript';
|
|
33
|
+
|
|
34
|
+
export default [...typescript];
|
|
48
35
|
```
|
|
49
36
|
|
|
50
|
-
Or
|
|
37
|
+
Or tailwind:
|
|
51
38
|
|
|
52
39
|
```
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
]
|
|
57
|
-
}
|
|
40
|
+
import tailwind from '@switz/eslint-config/tailwind';
|
|
41
|
+
|
|
42
|
+
export default [...tailwind];
|
|
58
43
|
```
|
|
59
44
|
|
|
60
45
|
## Reference
|
package/package.json
CHANGED
package/react.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import react from 'eslint-plugin-react';
|
|
2
2
|
import main from './eslint.config.mjs';
|
|
3
|
+
import tailwind from './tailwind.mjs';
|
|
3
4
|
|
|
4
5
|
export default [
|
|
5
|
-
...main,
|
|
6
6
|
react.configs.flat.recommended,
|
|
7
7
|
react.configs.flat['jsx-runtime'],
|
|
8
|
+
...main,
|
|
9
|
+
...tailwind,
|
|
8
10
|
{
|
|
9
11
|
rules: {
|
|
10
12
|
'react/display-name': 'off',
|
package/tailwind.mjs
CHANGED