@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 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
- ### Default JS/TS project
24
+ ### Minimal flat config
25
+
26
+ Create `eslint.config.ts` in your project root:
23
27
 
24
- For most kind of project, just edit `eslintrc.json` and add default configuration
28
+ ```ts
29
+ import defineConfig from '@w5s/eslint-config';
25
30
 
26
- ```json
27
- {
28
- "extends": [
29
- "@w5s/eslint-config"
30
- ]
31
- }
31
+ export default defineConfig();
32
32
  ```
33
33
 
34
- **Features :**
35
-
36
- - `ES` and `TS` validation
37
- - `Prettier` formatting
38
- - `JSX` and `React` syntax validation
39
- - `Jest` tests
40
-
41
- ### Custom project
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
- **Available configurations :**
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`: for ECMA Script (ES) files
63
- - `@w5s/eslint-config/jest`: for jest environment tests
64
- - `@w5s/eslint-config/json`: for json and jsonc files
65
- - `@w5s/eslint-config/ts`: for typescript files
66
- - `@w5s/eslint-config/yml`: for yaml files
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}) -->