@xylabs/eslint-config-flat 7.9.6 → 7.9.7
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.body.md +16 -6
- package/README.md +17 -7
- package/package.json +4 -4
package/README.body.md
CHANGED
|
@@ -26,20 +26,28 @@ bun add -D {{name}}
|
|
|
26
26
|
|
|
27
27
|
## Usage
|
|
28
28
|
|
|
29
|
-
Use this config in your `eslint.config.
|
|
29
|
+
Use this config in your `eslint.config.ts`:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import type { Linter } from 'eslint'
|
|
30
33
|
|
|
31
|
-
```js
|
|
32
34
|
import { config } from '@xylabs/eslint-config-flat'
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
const eslintConfig: Linter.Config[] = [
|
|
37
|
+
...config,
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
export default eslintConfig
|
|
35
41
|
```
|
|
36
42
|
|
|
37
43
|
### Extending with custom rules
|
|
38
44
|
|
|
39
|
-
```
|
|
45
|
+
```ts
|
|
46
|
+
import type { Linter } from 'eslint'
|
|
47
|
+
|
|
40
48
|
import { config } from '@xylabs/eslint-config-flat'
|
|
41
49
|
|
|
42
|
-
|
|
50
|
+
const eslintConfig: Linter.Config[] = [
|
|
43
51
|
...config,
|
|
44
52
|
{
|
|
45
53
|
rules: {
|
|
@@ -47,13 +55,15 @@ export default [
|
|
|
47
55
|
},
|
|
48
56
|
},
|
|
49
57
|
]
|
|
58
|
+
|
|
59
|
+
export default eslintConfig
|
|
50
60
|
```
|
|
51
61
|
|
|
52
62
|
### Individual configs
|
|
53
63
|
|
|
54
64
|
You can also import individual configs for more granular control:
|
|
55
65
|
|
|
56
|
-
```
|
|
66
|
+
```ts
|
|
57
67
|
import {
|
|
58
68
|
importConfig,
|
|
59
69
|
rulesConfig,
|
package/README.md
CHANGED
|
@@ -29,26 +29,34 @@ pnpm add -D {{name}}
|
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
31
31
|
|
|
32
|
-
Use the default type-aware preset in your `eslint.config.
|
|
32
|
+
Use the default type-aware preset in your `eslint.config.ts`:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import type { Linter } from 'eslint'
|
|
33
36
|
|
|
34
|
-
```js
|
|
35
37
|
import { config } from '@xylabs/eslint-config-flat'
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
const eslintConfig: Linter.Config[] = [
|
|
40
|
+
...config,
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
export default eslintConfig
|
|
38
44
|
```
|
|
39
45
|
|
|
40
46
|
For explicit composition, prefer the named presets:
|
|
41
47
|
|
|
42
|
-
```
|
|
48
|
+
```ts
|
|
43
49
|
import { recommendedConfig, recommendedTypeCheckedConfig } from '@xylabs/eslint-config-flat'
|
|
44
50
|
```
|
|
45
51
|
|
|
46
52
|
### Extending with custom rules
|
|
47
53
|
|
|
48
|
-
```
|
|
54
|
+
```ts
|
|
55
|
+
import type { Linter } from 'eslint'
|
|
56
|
+
|
|
49
57
|
import { config } from '@xylabs/eslint-config-flat'
|
|
50
58
|
|
|
51
|
-
|
|
59
|
+
const eslintConfig: Linter.Config[] = [
|
|
52
60
|
...config,
|
|
53
61
|
{
|
|
54
62
|
rules: {
|
|
@@ -56,13 +64,15 @@ export default [
|
|
|
56
64
|
},
|
|
57
65
|
},
|
|
58
66
|
]
|
|
67
|
+
|
|
68
|
+
export default eslintConfig
|
|
59
69
|
```
|
|
60
70
|
|
|
61
71
|
### Individual configs
|
|
62
72
|
|
|
63
73
|
You can also import individual configs for more granular control:
|
|
64
74
|
|
|
65
|
-
```
|
|
75
|
+
```ts
|
|
66
76
|
import {
|
|
67
77
|
coreConfig,
|
|
68
78
|
docsConfig,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@xylabs/eslint-config-flat",
|
|
4
|
-
"version": "7.9.
|
|
4
|
+
"version": "7.9.7",
|
|
5
5
|
"description": "ESLint Config used throughout XY Labs TypeScript/JavaScript libraries and react projects",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"xylabs",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^25.5.2",
|
|
56
|
-
"@xylabs/ts-scripts-common": "~7.9.
|
|
57
|
-
"@xylabs/ts-scripts-yarn3": "~7.9.
|
|
58
|
-
"@xylabs/tsconfig": "~7.9.
|
|
56
|
+
"@xylabs/ts-scripts-common": "~7.9.7",
|
|
57
|
+
"@xylabs/ts-scripts-yarn3": "~7.9.7",
|
|
58
|
+
"@xylabs/tsconfig": "~7.9.7",
|
|
59
59
|
"acorn": "^8.16.0",
|
|
60
60
|
"cosmiconfig": "^9.0.1",
|
|
61
61
|
"esbuild": "^0.28.0",
|