@xylabs/eslint-config-flat 7.8.6 → 7.9.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 +19 -2
- package/dist/neutral/core/index.d.ts +3 -0
- package/dist/neutral/core/index.d.ts.map +1 -0
- package/dist/neutral/import/index.d.ts +1 -1
- package/dist/neutral/import/index.d.ts.map +1 -1
- package/dist/neutral/index.d.ts +6 -1
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +321 -261
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/markdown/index.d.ts +1 -1
- package/dist/neutral/markdown/index.d.ts.map +1 -1
- package/dist/neutral/rules/index.d.ts.map +1 -1
- package/dist/neutral/shared.d.ts +13 -0
- package/dist/neutral/shared.d.ts.map +1 -0
- package/dist/neutral/typescript/index.d.ts +2 -1
- package/dist/neutral/typescript/index.d.ts.map +1 -1
- package/dist/neutral/unicorn/index.d.ts.map +1 -1
- package/dist/node/core/index.d.ts +3 -0
- package/dist/node/core/index.d.ts.map +1 -0
- package/dist/node/import/index.d.ts +1 -1
- package/dist/node/import/index.d.ts.map +1 -1
- package/dist/node/index.d.ts +6 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.mjs +321 -261
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/markdown/index.d.ts +1 -1
- package/dist/node/markdown/index.d.ts.map +1 -1
- package/dist/node/rules/index.d.ts.map +1 -1
- package/dist/node/shared.d.ts +13 -0
- package/dist/node/shared.d.ts.map +1 -0
- package/dist/node/typescript/index.d.ts +2 -1
- package/dist/node/typescript/index.d.ts.map +1 -1
- package/dist/node/unicorn/index.d.ts.map +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ pnpm add -D {{name}}
|
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
31
31
|
|
|
32
|
-
Use
|
|
32
|
+
Use the default type-aware preset in your `eslint.config.mjs`:
|
|
33
33
|
|
|
34
34
|
```js
|
|
35
35
|
import { config } from '@xylabs/eslint-config-flat'
|
|
@@ -37,6 +37,12 @@ import { config } from '@xylabs/eslint-config-flat'
|
|
|
37
37
|
export default config
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
For explicit composition, prefer the named presets:
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
import { recommendedConfig, recommendedTypeCheckedConfig } from '@xylabs/eslint-config-flat'
|
|
44
|
+
```
|
|
45
|
+
|
|
40
46
|
### Extending with custom rules
|
|
41
47
|
|
|
42
48
|
```js
|
|
@@ -58,9 +64,12 @@ You can also import individual configs for more granular control:
|
|
|
58
64
|
|
|
59
65
|
```js
|
|
60
66
|
import {
|
|
67
|
+
coreConfig,
|
|
68
|
+
docsConfig,
|
|
61
69
|
importConfig,
|
|
62
70
|
rulesConfig,
|
|
63
71
|
typescriptConfig,
|
|
72
|
+
typescriptTypeCheckedConfig,
|
|
64
73
|
unicornConfig,
|
|
65
74
|
} from '@xylabs/eslint-config-flat'
|
|
66
75
|
```
|
|
@@ -68,13 +77,21 @@ import {
|
|
|
68
77
|
## What's included
|
|
69
78
|
|
|
70
79
|
- TypeScript strict linting via `@typescript-eslint`
|
|
80
|
+
- ESLint core recommended rules via `@eslint/js`
|
|
71
81
|
- Import sorting and validation via `eslint-plugin-import-x`
|
|
72
82
|
- Code quality checks via `eslint-plugin-sonarjs`
|
|
73
83
|
- Best practices via `eslint-plugin-unicorn`
|
|
74
84
|
- Monorepo workspace rules via `eslint-plugin-workspaces`
|
|
75
|
-
- Markdown linting via
|
|
85
|
+
- Markdown linting via `@eslint/markdown`
|
|
76
86
|
- Stylistic formatting (no semicolons, single quotes, trailing commas, 2-space indent)
|
|
77
87
|
|
|
88
|
+
Named presets:
|
|
89
|
+
|
|
90
|
+
- `recommendedConfig`: shared base preset without type-aware rules
|
|
91
|
+
- `recommendedTypeCheckedConfig`: shared base preset with type-aware TypeScript rules
|
|
92
|
+
- `docsConfig`: Markdown + JSON/JSONC/JSON5 support
|
|
93
|
+
- `config`: compatibility alias of `recommendedTypeCheckedConfig`
|
|
94
|
+
|
|
78
95
|
For React projects, use [`@xylabs/eslint-config-react-flat`](https://www.npmjs.com/package/@xylabs/eslint-config-react-flat) instead.
|
|
79
96
|
|
|
80
97
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AASpC,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAKrC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/import/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/import/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AAa5C,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EA+CvC,CAAA"}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
|
+
export declare const recommendedConfig: Linter.Config[];
|
|
3
|
+
export declare const recommendedTypeCheckedConfig: Linter.Config[];
|
|
4
|
+
export declare const docsConfig: Linter.Config[];
|
|
2
5
|
export declare const config: Linter.Config[];
|
|
6
|
+
export { coreConfig } from './core/index.ts';
|
|
3
7
|
export * from './ignores.ts';
|
|
4
8
|
export { importConfig } from './import/index.ts';
|
|
5
9
|
export { json5Config, jsoncConfig, jsonConfig, } from './json/index.ts';
|
|
10
|
+
export { markdownConfig } from './markdown/index.ts';
|
|
6
11
|
export { rulesConfig } from './rules/index.ts';
|
|
7
12
|
export { sonarConfig } from './sonar/index.ts';
|
|
8
|
-
export { typescriptConfig } from './typescript/index.ts';
|
|
13
|
+
export { typescriptConfig, typescriptTypeCheckedConfig } from './typescript/index.ts';
|
|
9
14
|
export { unicornConfig } from './unicorn/index.ts';
|
|
10
15
|
export { workspacesConfig } from './workspaces/index.ts';
|
|
11
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAWpC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAK5C,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAKvD,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAKrC,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAiC,CAAA;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EACL,WAAW,EAAE,WAAW,EAAE,UAAU,GACrC,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA"}
|