@plumile/eslint-config-typescript 0.1.84 → 0.1.86
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 +77 -43
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# @plumile/eslint-config-typescript
|
|
2
2
|
|
|
3
|
-
Shared ESLint
|
|
3
|
+
Shared ESLint flat config for TypeScript-forward React projects.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
Recommended for external use. This is one of the clearest standalone packages in
|
|
8
|
+
the repository and is designed to work outside the Plumile monorepo.
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
The package provides:
|
|
13
|
+
|
|
14
|
+
- a reusable flat ESLint config array
|
|
15
|
+
- a `createConfig` helper for custom `tsconfig` locations
|
|
16
|
+
- a Relay-specific preset in `relay.js`
|
|
17
|
+
|
|
18
|
+
It is intended for projects that want Plumile's TypeScript, React, accessibility
|
|
19
|
+
and code-quality defaults without copying rule definitions manually.
|
|
4
20
|
|
|
5
21
|
## Installation
|
|
6
22
|
|
|
@@ -8,13 +24,46 @@ Shared ESLint configuration optimized for TypeScript-heavy React projects inside
|
|
|
8
24
|
npm install --save-dev eslint @plumile/eslint-config-typescript
|
|
9
25
|
```
|
|
10
26
|
|
|
11
|
-
|
|
27
|
+
Typical peer dependencies:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install --save-dev \
|
|
31
|
+
@stylistic/eslint-plugin \
|
|
32
|
+
@typescript-eslint/eslint-plugin \
|
|
33
|
+
eslint-plugin-jsdoc \
|
|
34
|
+
eslint-plugin-jsx-a11y \
|
|
35
|
+
eslint-plugin-n \
|
|
36
|
+
eslint-plugin-react \
|
|
37
|
+
eslint-plugin-react-hooks \
|
|
38
|
+
eslint-plugin-sonarjs
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If you use the Relay preset, also install:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install --save-dev eslint-plugin-relay
|
|
45
|
+
```
|
|
12
46
|
|
|
13
|
-
##
|
|
47
|
+
## Main Public Surface
|
|
14
48
|
|
|
15
|
-
|
|
49
|
+
### Default export
|
|
16
50
|
|
|
17
|
-
|
|
51
|
+
The package default export is an array of ESLint flat config fragments that you
|
|
52
|
+
spread into `eslint.config.js`.
|
|
53
|
+
|
|
54
|
+
### `createConfig`
|
|
55
|
+
|
|
56
|
+
Use `createConfig({ project })` when your ESLint TypeScript project file is not
|
|
57
|
+
at `./tsconfig.eslint.json`.
|
|
58
|
+
|
|
59
|
+
### Relay preset
|
|
60
|
+
|
|
61
|
+
Import `@plumile/eslint-config-typescript/relay.js` to add Relay-specific
|
|
62
|
+
syntax, naming, and colocated fragment checks.
|
|
63
|
+
|
|
64
|
+
## Quick Start
|
|
65
|
+
|
|
66
|
+
### Flat config
|
|
18
67
|
|
|
19
68
|
```ts
|
|
20
69
|
import plumileTs from '@plumile/eslint-config-typescript';
|
|
@@ -22,29 +71,23 @@ import plumileTs from '@plumile/eslint-config-typescript';
|
|
|
22
71
|
export default [
|
|
23
72
|
...plumileTs,
|
|
24
73
|
{
|
|
25
|
-
files: ['
|
|
74
|
+
files: ['src/**/*.ts', 'src/**/*.tsx'],
|
|
26
75
|
rules: {
|
|
27
|
-
// Project-specific overrides go here
|
|
28
76
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
29
77
|
},
|
|
30
78
|
},
|
|
31
79
|
];
|
|
32
80
|
```
|
|
33
81
|
|
|
34
|
-
|
|
82
|
+
### Custom TypeScript project
|
|
35
83
|
|
|
36
84
|
```ts
|
|
37
|
-
import
|
|
85
|
+
import { createConfig } from '@plumile/eslint-config-typescript';
|
|
38
86
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export default [
|
|
42
|
-
...base,
|
|
43
|
-
// overrides...
|
|
44
|
-
];
|
|
87
|
+
export default [...createConfig({ project: './tsconfig.eslint.json' })];
|
|
45
88
|
```
|
|
46
89
|
|
|
47
|
-
Relay preset
|
|
90
|
+
### Relay preset
|
|
48
91
|
|
|
49
92
|
```ts
|
|
50
93
|
import plumileTs from '@plumile/eslint-config-typescript';
|
|
@@ -53,37 +96,28 @@ import relayPreset from '@plumile/eslint-config-typescript/relay.js';
|
|
|
53
96
|
export default [...plumileTs, ...relayPreset];
|
|
54
97
|
```
|
|
55
98
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
```json
|
|
59
|
-
{
|
|
60
|
-
"extends": ["@plumile/eslint-config-typescript"],
|
|
61
|
-
"rules": {
|
|
62
|
-
"@typescript-eslint/no-explicit-any": "off"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## What You Get
|
|
99
|
+
## What the Preset Covers
|
|
68
100
|
|
|
69
|
-
-
|
|
70
|
-
- React
|
|
71
|
-
-
|
|
72
|
-
-
|
|
101
|
+
- TypeScript parsing and project-aware linting
|
|
102
|
+
- React hooks rules
|
|
103
|
+
- accessibility checks
|
|
104
|
+
- jsdoc and general code-quality rules
|
|
105
|
+
- stylistic rules aligned with the repository expectations
|
|
73
106
|
|
|
74
|
-
|
|
107
|
+
## Validation Notes
|
|
75
108
|
|
|
76
|
-
|
|
109
|
+
- public config shape should be covered by tests that load the default config and
|
|
110
|
+
the Relay preset
|
|
111
|
+
- README examples should stay aligned with the exported entry points
|
|
77
112
|
|
|
78
|
-
|
|
113
|
+
## Limitations
|
|
79
114
|
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
-
|
|
115
|
+
- this package assumes ESLint flat config as the primary integration model
|
|
116
|
+
- legacy `.eslintrc` consumers may still adapt it, but flat config is the
|
|
117
|
+
documented path
|
|
118
|
+
- consumers remain responsible for installing the required peer dependencies
|
|
84
119
|
|
|
85
|
-
## Related
|
|
120
|
+
## Related Docs
|
|
86
121
|
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
- See [`AGENTS.md`](https://gitlab.com/plumile/js/-/blob/main/AGENTS.md) for contributor workflow expectations.
|
|
122
|
+
- [Repository Guidelines](../../AGENTS.md)
|
|
123
|
+
- [Documentation Index](../../docs/index.md)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Olivier Hardy <olivier@plumile.com>",
|
|
3
3
|
"name": "@plumile/eslint-config-typescript",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.86",
|
|
5
5
|
"description": "Shared ESLint flat config tuned for TypeScript-forward React projects",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"npm": ">=8.0.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@typescript-eslint/parser": "8.
|
|
34
|
+
"@typescript-eslint/parser": "8.58.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
38
|
-
"eslint": "
|
|
39
|
-
"eslint-plugin-jsdoc": "62.8.
|
|
38
|
+
"eslint": "10.1.0",
|
|
39
|
+
"eslint-plugin-jsdoc": "62.8.1",
|
|
40
40
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
41
41
|
"eslint-plugin-n": "17.24.0",
|
|
42
42
|
"eslint-plugin-react": "7.37.5",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": ">=8.
|
|
50
|
-
"eslint": "
|
|
51
|
-
"eslint-plugin-jsdoc": ">=62.8.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": ">=8.58.0",
|
|
50
|
+
"eslint": "10.x.x",
|
|
51
|
+
"eslint-plugin-jsdoc": ">=62.8.1",
|
|
52
52
|
"eslint-plugin-jsx-a11y": ">=6.10.2",
|
|
53
53
|
"eslint-plugin-n": "17.24.0",
|
|
54
54
|
"eslint-plugin-react": ">=7.37.5",
|