@w5s/eslint-config 3.5.6 → 3.7.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 +35 -38
- package/dist/index.d.ts +643 -22
- package/dist/index.js +140 -145
- package/dist/index.js.map +1 -1
- package/package.json +11 -9
- package/src/config/e18e.ts +71 -0
- package/src/config/es.ts +10 -3
- package/src/config/ignores.ts +5 -79
- package/src/config/imports.ts +21 -11
- package/src/config/jsdoc.ts +20 -9
- package/src/config/jsonc.ts +7 -2
- package/src/config/markdown.ts +8 -2
- package/src/config/next.ts +50 -0
- package/src/config/node.ts +18 -13
- package/src/config/test.ts +10 -3
- package/src/config/unicorn.ts +2 -3
- package/src/config/yml.ts +8 -6
- package/src/config.ts +2 -0
- package/src/defineConfig.ts +23 -46
- package/src/type/PluginOptionsBase.ts +5 -0
- package/src/typegen/e18e.d.ts +123 -0
- package/src/typegen/next.d.ts +120 -0
package/README.md
CHANGED
|
@@ -17,53 +17,50 @@ npm install --save-dev @w5s/eslint-config
|
|
|
17
17
|
```
|
|
18
18
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
19
19
|
|
|
20
|
+
> Requires ESLint `9.x` or `10.x`. Optional TypeScript support for `4.x`, `5.x`, and `6.x`.
|
|
21
|
+
|
|
20
22
|
## Usage
|
|
21
23
|
|
|
22
|
-
###
|
|
24
|
+
### Minimal flat config
|
|
25
|
+
|
|
26
|
+
Create `eslint.config.ts` in your project root:
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
```ts
|
|
29
|
+
import defineConfig from '@w5s/eslint-config';
|
|
25
30
|
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
"extends": [
|
|
29
|
-
"@w5s/eslint-config"
|
|
30
|
-
]
|
|
31
|
-
}
|
|
31
|
+
export default defineConfig();
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
For most kind of project, just edit `eslintrc.json` and cherry pick only configurations
|
|
44
|
-
|
|
45
|
-
```jsonc
|
|
46
|
-
{
|
|
47
|
-
"root": true,
|
|
48
|
-
"extends": [
|
|
49
|
-
"@w5s/eslint-config/es",
|
|
50
|
-
"@w5s/eslint-config/jest",
|
|
51
|
-
"@w5s/eslint-config/json",
|
|
52
|
-
"@w5s/eslint-config/ts",
|
|
53
|
-
"@w5s/eslint-config/yml"
|
|
54
|
-
// include more configurations here
|
|
55
|
-
]
|
|
56
|
-
// ...
|
|
57
|
-
}
|
|
34
|
+
### Customize enabled integrations
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import defineConfig from '@w5s/eslint-config';
|
|
38
|
+
|
|
39
|
+
export default defineConfig({
|
|
40
|
+
stylistic: { indent: 2 },
|
|
41
|
+
yml: true,
|
|
42
|
+
});
|
|
58
43
|
```
|
|
59
44
|
|
|
60
|
-
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
- Supported languages : `JS`, `TS`, `JSX`, `JSON`, `YAML`, `MARKDOWN`
|
|
48
|
+
- Standalone formatting : no prettier cli/configuration required (uses stylistic plugin)
|
|
49
|
+
- Enforce best practices : Airbnb base as default
|
|
50
|
+
- Opinionated but customizable
|
|
51
|
+
- Supports frameworks :
|
|
52
|
+
- UI : `React`
|
|
53
|
+
- Testing : `Jest`, `Vitest`
|
|
54
|
+
|
|
55
|
+
### Advanced usage
|
|
56
|
+
|
|
57
|
+
If you want fine-grained control, the package also exports individual configs:
|
|
61
58
|
|
|
62
|
-
- `@w5s/eslint-config/es
|
|
63
|
-
- `@w5s/eslint-config/
|
|
64
|
-
- `@w5s/eslint-config/
|
|
65
|
-
- `@w5s/eslint-config/
|
|
66
|
-
- `@w5s/eslint-config/
|
|
59
|
+
- `@w5s/eslint-config/es`
|
|
60
|
+
- `@w5s/eslint-config/jsonc`
|
|
61
|
+
- `@w5s/eslint-config/ts`
|
|
62
|
+
- `@w5s/eslint-config/yml`
|
|
63
|
+
- `@w5s/eslint-config/test`
|
|
67
64
|
|
|
68
65
|
## License
|
|
69
66
|
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[${license}][license-url] © ${author}) -->
|