@plumile/eslint-config-typescript 0.1.21 → 0.1.23
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 +66 -1
- package/index.js +2 -0
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1 +1,66 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @plumile/eslint-config-typescript
|
|
2
|
+
|
|
3
|
+
Shared ESLint configuration optimized for TypeScript-heavy React projects inside the Plumile ecosystem.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install --save-dev eslint @plumile/eslint-config-typescript
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
If you lint React or JSX files, ensure `@typescript-eslint/eslint-plugin`, `eslint-plugin-react`, and related peer dependencies are available. They are bundled transitively in the router workspace, but declare them explicitly if you use the config standalone.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Add the preset to your flat ESLint config (recommended) or `.eslintrc` file.
|
|
16
|
+
|
|
17
|
+
### Flat Config (`eslint.config.js`)
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import plumileTs from '@plumile/eslint-config-typescript';
|
|
21
|
+
|
|
22
|
+
export default [
|
|
23
|
+
...plumileTs,
|
|
24
|
+
{
|
|
25
|
+
files: ['packages/**/*.ts', 'packages/**/*.tsx'],
|
|
26
|
+
rules: {
|
|
27
|
+
// Project-specific overrides go here
|
|
28
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Legacy `.eslintrc`
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"extends": ["@plumile/eslint-config-typescript"],
|
|
39
|
+
"rules": {
|
|
40
|
+
"@typescript-eslint/no-explicit-any": "off"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## What You Get
|
|
46
|
+
|
|
47
|
+
- Strict TypeScript analysis (no implicit `any`, consistent casing, unused symbol checks).
|
|
48
|
+
- React best practices (hooks rules, JSX runtime defaults).
|
|
49
|
+
- Import ordering and module boundary enforcement.
|
|
50
|
+
- Prettier alignment where applicable (single quotes, spacing).
|
|
51
|
+
|
|
52
|
+
The preset ships multiple config fragments; `eslint.config.js` in the repo shows how we layer additional overrides for tests and generated files. Copy those patterns when adapting to other workspaces.
|
|
53
|
+
|
|
54
|
+
## Extending Rules
|
|
55
|
+
|
|
56
|
+
Because the package exports an array of config objects, you can spread it and append overrides. Common adjustments:
|
|
57
|
+
|
|
58
|
+
- Disable costly rules in generated code directories via `ignores`.
|
|
59
|
+
- Relax naming conventions for GraphQL fragments or relay artifacts.
|
|
60
|
+
- Add custom plugins (e.g., router DX rule `@plumile-router/dx/no-direct-window-location-search`).
|
|
61
|
+
|
|
62
|
+
## Related Tooling
|
|
63
|
+
|
|
64
|
+
- Prettier runs separately via `npm run prettier:apply`.
|
|
65
|
+
- Husky + lint-staged invoke Prettier before commits; ESLint runs through `npm run eslint`.
|
|
66
|
+
- See [`AGENTS.md`](../../AGENTS.md) for contributor workflow expectations.
|
package/index.js
CHANGED
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.23",
|
|
5
5
|
"description": "@plumile/eslint-config-typescript",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"type": "module",
|
|
@@ -22,25 +22,25 @@
|
|
|
22
22
|
"npm": ">=8.0.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@typescript-eslint/parser": "8.
|
|
25
|
+
"@typescript-eslint/parser": "8.44.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@stylistic/eslint-plugin": "5.
|
|
28
|
+
"@stylistic/eslint-plugin": "5.4.0",
|
|
29
29
|
"eslint": "9.19.0",
|
|
30
|
-
"eslint-plugin-jsdoc": "
|
|
30
|
+
"eslint-plugin-jsdoc": "59.1.0",
|
|
31
31
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
32
|
-
"eslint-plugin-n": "17.
|
|
32
|
+
"eslint-plugin-n": "17.23.1",
|
|
33
33
|
"eslint-plugin-react": "7.37.5",
|
|
34
34
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
35
35
|
"eslint-plugin-sonarjs": "3.0.5"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@stylistic/eslint-plugin": "5.
|
|
39
|
-
"@typescript-eslint/eslint-plugin": ">=8.
|
|
38
|
+
"@stylistic/eslint-plugin": "5.4.0",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": ">=8.44.0",
|
|
40
40
|
"eslint": "9.x.x",
|
|
41
|
-
"eslint-plugin-jsdoc": ">=
|
|
41
|
+
"eslint-plugin-jsdoc": ">=59.1.0",
|
|
42
42
|
"eslint-plugin-jsx-a11y": ">=6.10.2",
|
|
43
|
-
"eslint-plugin-n": "17.
|
|
43
|
+
"eslint-plugin-n": "17.23.1",
|
|
44
44
|
"eslint-plugin-react": ">=7.37.5",
|
|
45
45
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
46
46
|
"eslint-plugin-sonarjs": ">=3.0.5"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "cf4e919005af37ac2e6f56bb49690f9d1ae88d87"
|
|
52
52
|
}
|