@xylabs/eslint-config-flat 7.4.17 → 7.4.19
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 +55 -0
- package/README.md +77 -0
- package/package.json +3 -3
package/README.body.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
## Install
|
|
2
|
+
|
|
3
|
+
```sh
|
|
4
|
+
yarn add -D {{name}}
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
Use this config in your `eslint.config.mjs`:
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import { config } from '@xylabs/eslint-config-flat'
|
|
13
|
+
|
|
14
|
+
export default config
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Extending with custom rules
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import { config } from '@xylabs/eslint-config-flat'
|
|
21
|
+
|
|
22
|
+
export default [
|
|
23
|
+
...config,
|
|
24
|
+
{
|
|
25
|
+
rules: {
|
|
26
|
+
// your overrides
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Individual configs
|
|
33
|
+
|
|
34
|
+
You can also import individual configs for more granular control:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
import {
|
|
38
|
+
importConfig,
|
|
39
|
+
rulesConfig,
|
|
40
|
+
typescriptConfig,
|
|
41
|
+
unicornConfig,
|
|
42
|
+
} from '@xylabs/eslint-config-flat'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## What's included
|
|
46
|
+
|
|
47
|
+
- TypeScript strict linting via `@typescript-eslint`
|
|
48
|
+
- Import sorting and validation via `eslint-plugin-import-x`
|
|
49
|
+
- Code quality checks via `eslint-plugin-sonarjs`
|
|
50
|
+
- Best practices via `eslint-plugin-unicorn`
|
|
51
|
+
- Monorepo workspace rules via `eslint-plugin-workspaces`
|
|
52
|
+
- Markdown linting via `eslint-plugin-markdown`
|
|
53
|
+
- Stylistic formatting (no semicolons, single quotes, trailing commas, 2-space indent)
|
|
54
|
+
|
|
55
|
+
For React projects, use [`@xylabs/eslint-config-react-flat`](https://www.npmjs.com/package/@xylabs/eslint-config-react-flat) instead.
|
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
[![logo][]](https://xylabs.com)
|
|
2
|
+
|
|
3
|
+
# @xylabs/eslint-config-flat
|
|
4
|
+
|
|
5
|
+
[![npm][npm-badge]][npm-link]
|
|
6
|
+
[![license][license-badge]][license-link]
|
|
7
|
+
|
|
8
|
+
> ESLint Config used throughout XY Labs TypeScript/JavaScript libraries and react projects
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
yarn add -D {{name}}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
Use this config in your `eslint.config.mjs`:
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
import { config } from '@xylabs/eslint-config-flat'
|
|
22
|
+
|
|
23
|
+
export default config
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Extending with custom rules
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { config } from '@xylabs/eslint-config-flat'
|
|
30
|
+
|
|
31
|
+
export default [
|
|
32
|
+
...config,
|
|
33
|
+
{
|
|
34
|
+
rules: {
|
|
35
|
+
// your overrides
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Individual configs
|
|
42
|
+
|
|
43
|
+
You can also import individual configs for more granular control:
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
import {
|
|
47
|
+
importConfig,
|
|
48
|
+
rulesConfig,
|
|
49
|
+
typescriptConfig,
|
|
50
|
+
unicornConfig,
|
|
51
|
+
} from '@xylabs/eslint-config-flat'
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## What's included
|
|
55
|
+
|
|
56
|
+
- TypeScript strict linting via `@typescript-eslint`
|
|
57
|
+
- Import sorting and validation via `eslint-plugin-import-x`
|
|
58
|
+
- Code quality checks via `eslint-plugin-sonarjs`
|
|
59
|
+
- Best practices via `eslint-plugin-unicorn`
|
|
60
|
+
- Monorepo workspace rules via `eslint-plugin-workspaces`
|
|
61
|
+
- Markdown linting via `eslint-plugin-markdown`
|
|
62
|
+
- Stylistic formatting (no semicolons, single quotes, trailing commas, 2-space indent)
|
|
63
|
+
|
|
64
|
+
For React projects, use [`@xylabs/eslint-config-react-flat`](https://www.npmjs.com/package/@xylabs/eslint-config-react-flat) instead.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
|
|
74
|
+
[npm-badge]: https://img.shields.io/npm/v/@xylabs/eslint-config-flat.svg
|
|
75
|
+
[npm-link]: https://www.npmjs.com/package/@xylabs/eslint-config-flat
|
|
76
|
+
[license-badge]: https://img.shields.io/npm/l/@xylabs/eslint-config-flat.svg
|
|
77
|
+
[license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
|
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.4.
|
|
4
|
+
"version": "7.4.19",
|
|
5
5
|
"description": "ESLint Config used throughout XY Labs TypeScript/JavaScript libraries and react projects",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"xylabs",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/eslint-plugin-markdown": "~2.0.2",
|
|
57
|
-
"@xylabs/ts-scripts-yarn3": "~7.4.
|
|
58
|
-
"@xylabs/tsconfig": "~7.4.
|
|
57
|
+
"@xylabs/ts-scripts-yarn3": "~7.4.19",
|
|
58
|
+
"@xylabs/tsconfig": "~7.4.19",
|
|
59
59
|
"eslint": "^10.0.3",
|
|
60
60
|
"typescript": "~5.9.3"
|
|
61
61
|
},
|