@etchteam/eslint-config 2.6.65 → 3.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/CHANGELOG.md +16 -3
- package/README.md +48 -1
- package/package.json +36 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
##
|
|
1
|
+
## 3.0.0 (2026-04-02)
|
|
2
2
|
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* feat!: move environment-specific plugins to optional peer dependencies ([3366a41](https://github.com/etchteam/eslint/commit/3366a41))
|
|
4
|
+
* Merge pull request #546 from etchteam/feat/optional-peer-deps ([e7c1636](https://github.com/etchteam/eslint/commit/e7c1636)), closes [#546](https://github.com/etchteam/eslint/issues/546)
|
|
5
|
+
* Merge remote-tracking branch 'origin/main' into feat/optional-peer-deps ([4ab7150](https://github.com/etchteam/eslint/commit/4ab7150))
|
|
6
|
+
* docs: document required plugins for each config ([07b25d0](https://github.com/etchteam/eslint/commit/07b25d0))
|
|
7
|
+
* fix: add environment-specific plugins as devDependencies for CI ([9cc0973](https://github.com/etchteam/eslint/commit/9cc0973))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### BREAKING CHANGE
|
|
11
|
+
|
|
12
|
+
* Environment-specific plugins are no longer installed
|
|
13
|
+
automatically. Users must manually install the peer dependencies required
|
|
14
|
+
for their chosen config (e.g. `npm install angular-eslint` when using
|
|
15
|
+
`@etchteam/eslint-config/angular`).
|
|
16
|
+
|
|
17
|
+
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ The eslint config that we use at [Etch](https://etch.co)
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm i -D eslint@^9.0.0 prettier @etchteam/eslint-config
|
|
10
|
+
npm i -D eslint@^9.0.0 prettier @etchteam/eslint-config eslint-plugin-react eslint-plugin-jsx-a11y
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
@@ -26,6 +26,10 @@ For projects that don't need the full config, use environment-specific imports t
|
|
|
26
26
|
|
|
27
27
|
### Next.js
|
|
28
28
|
|
|
29
|
+
```bash
|
|
30
|
+
npm i -D eslint prettier @etchteam/eslint-config eslint-plugin-react eslint-plugin-jsx-a11y @next/eslint-plugin-next eslint-plugin-react-hooks
|
|
31
|
+
```
|
|
32
|
+
|
|
29
33
|
```javascript
|
|
30
34
|
import nextjs from '@etchteam/eslint-config/nextjs';
|
|
31
35
|
|
|
@@ -34,6 +38,10 @@ export default nextjs;
|
|
|
34
38
|
|
|
35
39
|
### Node.js / Express
|
|
36
40
|
|
|
41
|
+
```bash
|
|
42
|
+
npm i -D eslint prettier @etchteam/eslint-config
|
|
43
|
+
```
|
|
44
|
+
|
|
37
45
|
```javascript
|
|
38
46
|
import nodejs from '@etchteam/eslint-config/nodejs';
|
|
39
47
|
|
|
@@ -42,6 +50,10 @@ export default nodejs;
|
|
|
42
50
|
|
|
43
51
|
### Angular
|
|
44
52
|
|
|
53
|
+
```bash
|
|
54
|
+
npm i -D eslint prettier @etchteam/eslint-config angular-eslint
|
|
55
|
+
```
|
|
56
|
+
|
|
45
57
|
```javascript
|
|
46
58
|
import angular from '@etchteam/eslint-config/angular';
|
|
47
59
|
|
|
@@ -50,6 +62,10 @@ export default angular;
|
|
|
50
62
|
|
|
51
63
|
### Preact
|
|
52
64
|
|
|
65
|
+
```bash
|
|
66
|
+
npm i -D eslint prettier @etchteam/eslint-config eslint-plugin-react eslint-plugin-jsx-a11y
|
|
67
|
+
```
|
|
68
|
+
|
|
53
69
|
```javascript
|
|
54
70
|
import preact from '@etchteam/eslint-config/preact';
|
|
55
71
|
|
|
@@ -58,6 +74,10 @@ export default preact;
|
|
|
58
74
|
|
|
59
75
|
### Web Components (Lit)
|
|
60
76
|
|
|
77
|
+
```bash
|
|
78
|
+
npm i -D eslint prettier @etchteam/eslint-config eslint-plugin-lit
|
|
79
|
+
```
|
|
80
|
+
|
|
61
81
|
```javascript
|
|
62
82
|
import webComponents from '@etchteam/eslint-config/web-components';
|
|
63
83
|
|
|
@@ -66,6 +86,10 @@ export default webComponents;
|
|
|
66
86
|
|
|
67
87
|
### NestJS
|
|
68
88
|
|
|
89
|
+
```bash
|
|
90
|
+
npm i -D eslint prettier @etchteam/eslint-config @darraghor/eslint-plugin-nestjs-typed
|
|
91
|
+
```
|
|
92
|
+
|
|
69
93
|
```javascript
|
|
70
94
|
import nestjs from '@etchteam/eslint-config/nestjs';
|
|
71
95
|
|
|
@@ -114,6 +138,29 @@ export default [
|
|
|
114
138
|
| `web-components` | base + json + yaml + storybook + Lit rules |
|
|
115
139
|
| `nestjs` | base + json + yaml + NestJS rules + Jest globals |
|
|
116
140
|
|
|
141
|
+
### Required Plugins
|
|
142
|
+
|
|
143
|
+
The **base**, **json**, **yaml**, and **storybook** modules have all their plugins included as package dependencies — no extra installs needed.
|
|
144
|
+
|
|
145
|
+
Environment-specific configs require additional plugins to be installed as peer dependencies:
|
|
146
|
+
|
|
147
|
+
| Config | Additional plugins to install |
|
|
148
|
+
|--------|-------------------------------|
|
|
149
|
+
| Default (`@etchteam/eslint-config`) | `eslint-plugin-react` `eslint-plugin-jsx-a11y` |
|
|
150
|
+
| `react` | `eslint-plugin-react` `eslint-plugin-jsx-a11y` |
|
|
151
|
+
| `nextjs` | `eslint-plugin-react` `eslint-plugin-jsx-a11y` `@next/eslint-plugin-next` `eslint-plugin-react-hooks` |
|
|
152
|
+
| `nodejs` | None |
|
|
153
|
+
| `preact` | `eslint-plugin-react` `eslint-plugin-jsx-a11y` |
|
|
154
|
+
| `angular` | `angular-eslint` |
|
|
155
|
+
| `web-components` | `eslint-plugin-lit` |
|
|
156
|
+
| `nestjs` | `@darraghor/eslint-plugin-nestjs-typed` |
|
|
157
|
+
|
|
158
|
+
For example, to use the Next.js config:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
npm i -D eslint prettier @etchteam/eslint-config eslint-plugin-react eslint-plugin-jsx-a11y @next/eslint-plugin-next eslint-plugin-react-hooks
|
|
162
|
+
```
|
|
163
|
+
|
|
117
164
|
## With lint-staged
|
|
118
165
|
|
|
119
166
|
### New project
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etchteam/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Etch's standard eslint config",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.mjs",
|
|
@@ -42,6 +42,13 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@commitlint/cli": "^20.0.0",
|
|
44
44
|
"@commitlint/config-conventional": "^20.0.0",
|
|
45
|
+
"@darraghor/eslint-plugin-nestjs-typed": "^7.1.27",
|
|
46
|
+
"@next/eslint-plugin-next": "^16.2.1",
|
|
47
|
+
"angular-eslint": "^21.3.1",
|
|
48
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
49
|
+
"eslint-plugin-lit": "^2.2.1",
|
|
50
|
+
"eslint-plugin-react": "^7.37.5",
|
|
51
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
45
52
|
"husky": "^9.0.11",
|
|
46
53
|
"lint-staged": "^16.0.0"
|
|
47
54
|
},
|
|
@@ -61,21 +68,40 @@
|
|
|
61
68
|
"globals": "^17.2.0",
|
|
62
69
|
"typescript-eslint": "^8.35.0"
|
|
63
70
|
},
|
|
64
|
-
"optionalDependencies": {
|
|
65
|
-
"@darraghor/eslint-plugin-nestjs-typed": "^7.1.18",
|
|
66
|
-
"@next/eslint-plugin-next": "^16.1.6",
|
|
67
|
-
"angular-eslint": "^21.1.0",
|
|
68
|
-
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
69
|
-
"eslint-plugin-lit": "^2.1.1",
|
|
70
|
-
"eslint-plugin-react": "^7.37.5",
|
|
71
|
-
"eslint-plugin-react-hooks": "^7.0.1"
|
|
72
|
-
},
|
|
73
71
|
"peerDependencies": {
|
|
72
|
+
"@darraghor/eslint-plugin-nestjs-typed": ">=7.0.0",
|
|
73
|
+
"@next/eslint-plugin-next": ">=15.0.0",
|
|
74
|
+
"angular-eslint": ">=19.0.0",
|
|
74
75
|
"eslint": ">=9.0.0",
|
|
76
|
+
"eslint-plugin-jsx-a11y": ">=6.0.0",
|
|
77
|
+
"eslint-plugin-lit": ">=2.0.0",
|
|
78
|
+
"eslint-plugin-react": ">=7.0.0",
|
|
79
|
+
"eslint-plugin-react-hooks": ">=5.0.0",
|
|
75
80
|
"prettier": ">=3.0.0",
|
|
76
81
|
"typescript": ">=4.8.4"
|
|
77
82
|
},
|
|
78
83
|
"peerDependenciesMeta": {
|
|
84
|
+
"@darraghor/eslint-plugin-nestjs-typed": {
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
"@next/eslint-plugin-next": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"angular-eslint": {
|
|
91
|
+
"optional": true
|
|
92
|
+
},
|
|
93
|
+
"eslint-plugin-jsx-a11y": {
|
|
94
|
+
"optional": true
|
|
95
|
+
},
|
|
96
|
+
"eslint-plugin-lit": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
99
|
+
"eslint-plugin-react": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"eslint-plugin-react-hooks": {
|
|
103
|
+
"optional": true
|
|
104
|
+
},
|
|
79
105
|
"typescript": {
|
|
80
106
|
"optional": true
|
|
81
107
|
}
|