@theholocron/eslint-config 4.2.2 → 5.0.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 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
- Compose the presets your project needs in `eslint.config.js`:
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, react, node, vitest } from "@theholocron/eslint-config";
49
+ import { base, typescript } from "@theholocron/eslint-config";
47
50
 
48
- export default [...base(), ...typescript(), ...react(), ...vitest()];
51
+ export default [...base(), ...typescript()];
49
52
  ```
50
53
 
51
- Available presets: `base`, `typescript`, `react`, `next`, `node`, `vitest`, `storybook`, `cypress`.
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
@@ -2,7 +2,7 @@ import n from "eslint-plugin-n";
2
2
 
3
3
  export function node() {
4
4
  return [
5
- ...n.configs["flat/recommended"],
5
+ n.configs["flat/recommended-module"],
6
6
  {
7
7
  name: "@theholocron/node",
8
8
  rules: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/eslint-config",
3
- "version": "4.2.2",
3
+ "version": "5.0.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": "^16",
93
+ "globals": "^17",
94
94
  "typescript-eslint": "^8"
95
95
  },
96
96
  "peerDependenciesMeta": {