@theholocron/eslint-config 4.2.2 → 5.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/README.md +18 -6
- package/configs/node.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ A [ESLint configuration](https://eslint.org/docs/latest/use/configure/configurat
|
|
|
8
8
|
npm install --save-dev @theholocron/eslint-config
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Install only the peer dependencies for the presets you use (all are optional):
|
|
11
|
+
Install only the peer dependencies for the presets you use (all are optional except the core):
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
# Core (always required)
|
|
@@ -40,19 +40,31 @@ npm install --save-dev eslint-plugin-cypress
|
|
|
40
40
|
|
|
41
41
|
### Individual presets
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Each preset is a separate subpath import so only its plugin loads — importing
|
|
44
|
+
`base` won't pull in React or Cypress plugins you don't use.
|
|
45
|
+
|
|
46
|
+
`base` and `typescript` are available from the root:
|
|
44
47
|
|
|
45
48
|
```javascript
|
|
46
|
-
import { base, typescript
|
|
49
|
+
import { base, typescript } from "@theholocron/eslint-config";
|
|
47
50
|
|
|
48
|
-
export default [...base(), ...typescript()
|
|
51
|
+
export default [...base(), ...typescript()];
|
|
49
52
|
```
|
|
50
53
|
|
|
51
|
-
|
|
54
|
+
All other presets use subpath imports:
|
|
55
|
+
|
|
56
|
+
```javascript
|
|
57
|
+
import { node } from "@theholocron/eslint-config/node";
|
|
58
|
+
import { react } from "@theholocron/eslint-config/react";
|
|
59
|
+
import { vitest } from "@theholocron/eslint-config/vitest";
|
|
60
|
+
import { next } from "@theholocron/eslint-config/next";
|
|
61
|
+
import { storybook } from "@theholocron/eslint-config/storybook";
|
|
62
|
+
import { cypress } from "@theholocron/eslint-config/cypress";
|
|
63
|
+
```
|
|
52
64
|
|
|
53
65
|
### Bundles
|
|
54
66
|
|
|
55
|
-
Bundles combine presets and peer plugins into a single import for common project types:
|
|
67
|
+
Bundles combine presets and peer plugins into a single import for common project types. Use these when you want a ready-made config with no manual composition:
|
|
56
68
|
|
|
57
69
|
```javascript
|
|
58
70
|
// React app (base + typescript + react + vitest)
|
package/configs/node.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "A ESLint configuration for writing well-formed Javascript within the Galaxy.",
|
|
5
5
|
"homepage": "https://github.com/theholocron/configs/tree/main/packages/eslint-config#readme",
|
|
6
6
|
"bugs": "https://github.com/theholocron/configs/issues",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"eslint-plugin-n": "^18",
|
|
91
91
|
"eslint-plugin-react": "^7",
|
|
92
92
|
"eslint-plugin-storybook": "^10",
|
|
93
|
-
"globals": "^
|
|
93
|
+
"globals": "^17",
|
|
94
94
|
"typescript-eslint": "^8"
|
|
95
95
|
},
|
|
96
96
|
"peerDependenciesMeta": {
|