@xylabs/eslint-config-react-flat 7.4.18 → 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 +41 -0
- package/README.md +63 -0
- package/package.json +4 -4
package/README.body.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
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-react-flat'
|
|
13
|
+
|
|
14
|
+
export default config
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Extending with custom rules
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import { config } from '@xylabs/eslint-config-react-flat'
|
|
21
|
+
|
|
22
|
+
export default [
|
|
23
|
+
...config,
|
|
24
|
+
{
|
|
25
|
+
rules: {
|
|
26
|
+
// your overrides
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## What's included
|
|
33
|
+
|
|
34
|
+
Everything from [`@xylabs/eslint-config-flat`](https://www.npmjs.com/package/@xylabs/eslint-config-flat), plus:
|
|
35
|
+
|
|
36
|
+
- React component and hooks linting via `eslint-plugin-react-x`
|
|
37
|
+
- DOM API validation via `eslint-plugin-react-dom`
|
|
38
|
+
- Enhanced hooks rules via `eslint-plugin-react-hooks-extra`
|
|
39
|
+
- Naming convention enforcement via `eslint-plugin-react-naming-convention`
|
|
40
|
+
- React Refresh validation via `eslint-plugin-react-refresh`
|
|
41
|
+
- Web API best practices via `eslint-plugin-react-web-api`
|
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
[![logo][]](https://xylabs.com)
|
|
2
|
+
|
|
3
|
+
# @xylabs/eslint-config-react-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-react-flat'
|
|
22
|
+
|
|
23
|
+
export default config
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Extending with custom rules
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import { config } from '@xylabs/eslint-config-react-flat'
|
|
30
|
+
|
|
31
|
+
export default [
|
|
32
|
+
...config,
|
|
33
|
+
{
|
|
34
|
+
rules: {
|
|
35
|
+
// your overrides
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## What's included
|
|
42
|
+
|
|
43
|
+
Everything from [`@xylabs/eslint-config-flat`](https://www.npmjs.com/package/@xylabs/eslint-config-flat), plus:
|
|
44
|
+
|
|
45
|
+
- React component and hooks linting via `eslint-plugin-react-x`
|
|
46
|
+
- DOM API validation via `eslint-plugin-react-dom`
|
|
47
|
+
- Enhanced hooks rules via `eslint-plugin-react-hooks-extra`
|
|
48
|
+
- Naming convention enforcement via `eslint-plugin-react-naming-convention`
|
|
49
|
+
- React Refresh validation via `eslint-plugin-react-refresh`
|
|
50
|
+
- Web API best practices via `eslint-plugin-react-web-api`
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
|
|
60
|
+
[npm-badge]: https://img.shields.io/npm/v/@xylabs/eslint-config-react-flat.svg
|
|
61
|
+
[npm-link]: https://www.npmjs.com/package/@xylabs/eslint-config-react-flat
|
|
62
|
+
[license-badge]: https://img.shields.io/npm/l/@xylabs/eslint-config-react-flat.svg
|
|
63
|
+
[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-react-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",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@typescript-eslint/parser": "~8.57.0",
|
|
42
|
-
"@xylabs/eslint-config-flat": "~7.4.
|
|
42
|
+
"@xylabs/eslint-config-flat": "~7.4.19",
|
|
43
43
|
"eslint-plugin-react-dom": "^2.13.0",
|
|
44
44
|
"eslint-plugin-react-hooks-extra": "^2.13.0",
|
|
45
45
|
"eslint-plugin-react-naming-convention": "^2.13.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"globals": "~17.4.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@xylabs/ts-scripts-yarn3": "~7.4.
|
|
53
|
-
"@xylabs/tsconfig": "~7.4.
|
|
52
|
+
"@xylabs/ts-scripts-yarn3": "~7.4.19",
|
|
53
|
+
"@xylabs/tsconfig": "~7.4.19",
|
|
54
54
|
"eslint": "^10.0.3",
|
|
55
55
|
"typescript": "~5.9.3"
|
|
56
56
|
},
|