@epic-web/config 1.21.2 → 1.22.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/.github/workflows/release.yml +8 -9
- package/README.md +29 -1
- package/eslint.js +1 -1
- package/oxlint-config.json +124 -0
- package/package.json +3 -2
- package/utils.js +1 -1
|
@@ -17,12 +17,12 @@ jobs:
|
|
|
17
17
|
runs-on: ubuntu-latest
|
|
18
18
|
steps:
|
|
19
19
|
- name: ⬇️ Checkout repo
|
|
20
|
-
uses: actions/checkout@
|
|
20
|
+
uses: actions/checkout@v5
|
|
21
21
|
|
|
22
22
|
- name: ⎔ Setup node
|
|
23
|
-
uses: actions/setup-node@
|
|
23
|
+
uses: actions/setup-node@v6
|
|
24
24
|
with:
|
|
25
|
-
node-version:
|
|
25
|
+
node-version: lts/*
|
|
26
26
|
|
|
27
27
|
- name: 📥 Download deps
|
|
28
28
|
uses: bahmutov/npm-install@v1
|
|
@@ -42,12 +42,12 @@ jobs:
|
|
|
42
42
|
github.ref) && github.event_name == 'push' }}
|
|
43
43
|
steps:
|
|
44
44
|
- name: ⬇️ Checkout repo
|
|
45
|
-
uses: actions/checkout@
|
|
45
|
+
uses: actions/checkout@v5
|
|
46
46
|
|
|
47
47
|
- name: ⎔ Setup node
|
|
48
|
-
uses: actions/setup-node@
|
|
48
|
+
uses: actions/setup-node@v6
|
|
49
49
|
with:
|
|
50
|
-
node-version:
|
|
50
|
+
node-version: lts/*
|
|
51
51
|
|
|
52
52
|
- name: 📥 Download deps
|
|
53
53
|
uses: bahmutov/npm-install@v1
|
|
@@ -55,9 +55,9 @@ jobs:
|
|
|
55
55
|
useLockFile: false
|
|
56
56
|
|
|
57
57
|
- name: 🚀 Release
|
|
58
|
-
uses: cycjimmy/semantic-release-action@
|
|
58
|
+
uses: cycjimmy/semantic-release-action@v5.0.2
|
|
59
59
|
with:
|
|
60
|
-
semantic_version:
|
|
60
|
+
semantic_version: 25
|
|
61
61
|
branches: |
|
|
62
62
|
[
|
|
63
63
|
'+([0-9])?(.{+([0-9]),x}).x',
|
|
@@ -70,4 +70,3 @@ jobs:
|
|
|
70
70
|
env:
|
|
71
71
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
72
72
|
NPM_CONFIG_PROVENANCE: true
|
|
73
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div>
|
|
2
2
|
<h1 align="center"><a href="https://npm.im/@epic-web/config">👮 @epic-web/config</a></h1>
|
|
3
3
|
<strong>
|
|
4
|
-
Reasonable ESLint, Prettier, and TypeScript configs for epic web devs
|
|
4
|
+
Reasonable ESLint, Oxlint, Prettier, and TypeScript configs for epic web devs
|
|
5
5
|
</strong>
|
|
6
6
|
<p>
|
|
7
7
|
This makes assumptions about the way you prefer to develop software and gives you configurations that will actually help you in your development.
|
|
@@ -139,6 +139,34 @@ configurations minimal and only enable rules that catch real problems (the kind
|
|
|
139
139
|
that are likely to happen). This keeps our linting faster and reduces the number
|
|
140
140
|
of false positives.
|
|
141
141
|
|
|
142
|
+
### Oxlint
|
|
143
|
+
|
|
144
|
+
Create a `.oxlintrc.json` file in your project root with the following content:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"extends": ["./node_modules/@epic-web/config/oxlint-config.json"]
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Note: `typescript/no-misused-promises` and `typescript/no-floating-promises` are
|
|
153
|
+
type-aware in Oxlint and require the type-aware setup described in the Oxlint
|
|
154
|
+
docs.
|
|
155
|
+
|
|
156
|
+
#### Unsupported rules
|
|
157
|
+
|
|
158
|
+
The following ESLint rules/plugins from this config are not yet available in
|
|
159
|
+
Oxlint, so they are intentionally omitted:
|
|
160
|
+
|
|
161
|
+
- `import/order`
|
|
162
|
+
- `react-hooks/rules-of-hooks`
|
|
163
|
+
- `react-hooks/exhaustive-deps`
|
|
164
|
+
- `@typescript-eslint/no-unused-vars` (falls back to `eslint/no-unused-vars`)
|
|
165
|
+
- `testing-library/*`
|
|
166
|
+
- `jest-dom/*`
|
|
167
|
+
- `vitest/*` (except `vitest/no-import-node-test`)
|
|
168
|
+
- `playwright/*`
|
|
169
|
+
|
|
142
170
|
## License
|
|
143
171
|
|
|
144
172
|
MIT
|
package/eslint.js
CHANGED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"env": {
|
|
4
|
+
"browser": true,
|
|
5
|
+
"node": true
|
|
6
|
+
},
|
|
7
|
+
"plugins": ["import", "react", "typescript", "vitest"],
|
|
8
|
+
"ignorePatterns": [
|
|
9
|
+
"**/.cache/**",
|
|
10
|
+
"**/node_modules/**",
|
|
11
|
+
"**/build/**",
|
|
12
|
+
"**/public/**",
|
|
13
|
+
"**/*.json",
|
|
14
|
+
"**/playwright-report/**",
|
|
15
|
+
"**/server-build/**",
|
|
16
|
+
"**/dist/**",
|
|
17
|
+
"**/coverage/**",
|
|
18
|
+
"**/*.tsbuildinfo",
|
|
19
|
+
"**/.react-router/**",
|
|
20
|
+
"**/.wrangler/**",
|
|
21
|
+
"**/worker-configuration.d.ts"
|
|
22
|
+
],
|
|
23
|
+
"rules": {
|
|
24
|
+
"eslint/no-unexpected-multiline": "error",
|
|
25
|
+
"eslint/no-warning-comments": [
|
|
26
|
+
"error",
|
|
27
|
+
{
|
|
28
|
+
"terms": ["FIXME"],
|
|
29
|
+
"location": "anywhere"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"import/no-duplicates": [
|
|
33
|
+
"warn",
|
|
34
|
+
{
|
|
35
|
+
"prefer-inline": true
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"overrides": [
|
|
40
|
+
{
|
|
41
|
+
"files": ["**/*.tsx", "**/*.jsx"],
|
|
42
|
+
"rules": {
|
|
43
|
+
"react/jsx-key": "warn"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"files": ["**/*.js", "**/*.jsx"],
|
|
48
|
+
"rules": {
|
|
49
|
+
"eslint/no-undef": "error"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"files": ["**/*.ts", "**/*.tsx"],
|
|
54
|
+
"rules": {
|
|
55
|
+
"import/consistent-type-specifier-style": ["warn", "prefer-inline"],
|
|
56
|
+
"typescript/consistent-type-imports": [
|
|
57
|
+
"warn",
|
|
58
|
+
{
|
|
59
|
+
"prefer": "type-imports",
|
|
60
|
+
"disallowTypeAnnotations": true,
|
|
61
|
+
"fixStyle": "inline-type-imports"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"typescript/no-misused-promises": [
|
|
65
|
+
"error",
|
|
66
|
+
{
|
|
67
|
+
"checksVoidReturn": false
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"typescript/no-floating-promises": "error"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"files": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
|
|
75
|
+
"rules": {
|
|
76
|
+
"eslint/no-unused-vars": [
|
|
77
|
+
"warn",
|
|
78
|
+
{
|
|
79
|
+
"args": "after-used",
|
|
80
|
+
"argsIgnorePattern": "^_",
|
|
81
|
+
"ignoreRestSiblings": true,
|
|
82
|
+
"varsIgnorePattern": "^ignored"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"eslint/no-restricted-imports": [
|
|
86
|
+
"error",
|
|
87
|
+
{
|
|
88
|
+
"patterns": [
|
|
89
|
+
{
|
|
90
|
+
"group": [
|
|
91
|
+
"**/tests/**",
|
|
92
|
+
"**/#tests/**",
|
|
93
|
+
"**/__tests__/**/*",
|
|
94
|
+
"**/*.test.*",
|
|
95
|
+
"**/*.spec.*"
|
|
96
|
+
],
|
|
97
|
+
"message": "Do not import test files in source files"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"files": [
|
|
106
|
+
"**/tests/**",
|
|
107
|
+
"**/#tests/**",
|
|
108
|
+
"**/__tests__/**/*",
|
|
109
|
+
"**/*.test.*",
|
|
110
|
+
"**/*.spec.*"
|
|
111
|
+
],
|
|
112
|
+
"rules": {
|
|
113
|
+
"eslint/no-restricted-imports": "off",
|
|
114
|
+
"vitest/no-import-node-test": "error"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"files": ["**/tests/e2e/**"],
|
|
119
|
+
"rules": {
|
|
120
|
+
"vitest/no-import-node-test": "off"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.22.0",
|
|
8
8
|
"description": "Reasonable ESLint configs for epic web devs",
|
|
9
9
|
"main": "index.js",
|
|
10
10
|
"type": "module",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"./prettier": "./prettier.js",
|
|
17
17
|
"./typescript": "./typescript.json",
|
|
18
18
|
"./reset.d.ts": "./reset.d.ts",
|
|
19
|
-
"./eslint": "./eslint.js"
|
|
19
|
+
"./eslint": "./eslint.js",
|
|
20
|
+
"./oxlint": "./oxlint-config.json"
|
|
20
21
|
},
|
|
21
22
|
"prettier": "./prettier.js",
|
|
22
23
|
"scripts": {
|
package/utils.js
CHANGED