@ladamczyk/qoq-eslint-v9-ts-react 4.2.3 → 4.3.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/AGENTS.md +1 -1
- package/README.md +3 -18
- package/lib/index.mjs +4 -1
- package/package.json +11 -11
- package/lib/index.cjs +0 -27
package/AGENTS.md
CHANGED
|
@@ -18,4 +18,4 @@ export default [baseConfig];
|
|
|
18
18
|
|
|
19
19
|
## Inheritance
|
|
20
20
|
|
|
21
|
-
Merges JS-React base (plugins: `@eslint-react`, `@stylistic`, `compat`) with the TS base (TypeScript parser + `@typescript-eslint` rules). Uses `@eslint-react/recommended-typescript` rules on top of both.
|
|
21
|
+
Merges JS-React base (plugins: `@eslint-react`, `@stylistic`, `compat`, `react-refresh`) with the TS base (TypeScript parser + `@typescript-eslint` rules). Uses `@eslint-react/recommended-typescript` rules on top of both. The custom `@eslint-react/no-multi-comp` rule (defined in `eslint-v9-js-react`) is inherited via the JS-React base and re-asserted here so it survives the `recommended-typescript` merge. The Fast-Refresh rule `react-refresh/only-export-components` is likewise inherited from the JS-React base (plugin and rule both flow through the base spread; no re-assertion needed since `recommended-typescript` doesn't touch that namespace).
|
package/README.md
CHANGED
|
@@ -15,29 +15,14 @@ These configurations inherit from base presets and include all necessary package
|
|
|
15
15
|
|
|
16
16
|
## Usage
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### For CommonJS
|
|
21
|
-
|
|
22
|
-
```js
|
|
23
|
-
const jsBaseConfig = require("@ladamczyk/qoq-eslint-v9-ts-react");
|
|
24
|
-
|
|
25
|
-
module.exports = [
|
|
26
|
-
{
|
|
27
|
-
...jsBaseConfig,
|
|
28
|
-
files: [...]
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### For ESM
|
|
18
|
+
This package ships **ESM only** (its React plugin dependencies are ESM-only). Import the named `baseConfig` export in your ESLint flat config — use `eslint.config.js` in an ESM project (`"type": "module"`) or `eslint.config.mjs` otherwise.
|
|
34
19
|
|
|
35
20
|
```js
|
|
36
|
-
import
|
|
21
|
+
import { baseConfig } from '@ladamczyk/qoq-eslint-v9-ts-react';
|
|
37
22
|
|
|
38
23
|
export default [
|
|
39
24
|
{
|
|
40
|
-
...
|
|
25
|
+
...baseConfig,
|
|
41
26
|
files: [...]
|
|
42
27
|
}
|
|
43
28
|
];
|
package/lib/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import reactPlugin from '@eslint-react/eslint-plugin';
|
|
2
|
-
import { baseConfig as baseConfig$1, disabledRules } from '@ladamczyk/qoq-eslint-v9-js-react';
|
|
2
|
+
import { baseConfig as baseConfig$1, disabledRules, NO_MULTI_COMP_RULE_NAME } from '@ladamczyk/qoq-eslint-v9-js-react';
|
|
3
3
|
import { baseConfig as baseConfig$2 } from '@ladamczyk/qoq-eslint-v9-ts';
|
|
4
4
|
import { objectMergeRight } from '@ladamczyk/qoq-utils';
|
|
5
5
|
import importPlugin from 'eslint-plugin-import-x';
|
|
@@ -17,6 +17,9 @@ const baseConfig = {
|
|
|
17
17
|
rules: {
|
|
18
18
|
...disabledRules,
|
|
19
19
|
...(reactPlugin.configs['recommended-typescript'].rules ?? {}),
|
|
20
|
+
// Our custom rule lives in (and is registered by) `eslint-v9-js-react`;
|
|
21
|
+
// re-assert it here so it survives the `recommended-typescript` merge.
|
|
22
|
+
[`@eslint-react/${NO_MULTI_COMP_RULE_NAME}`]: 2,
|
|
20
23
|
},
|
|
21
24
|
}),
|
|
22
25
|
plugins: { ...jsReactBaseConfigPlugins, ...tsBaseConfigPlugins },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ladamczyk/qoq-eslint-v9-ts-react",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Eslint flat config template for TS + React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint TypeScript + React template",
|
|
@@ -22,11 +22,10 @@
|
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./lib/src/index.d.ts",
|
|
25
|
-
"import": "./lib/index.mjs"
|
|
26
|
-
"require": "./lib/index.cjs"
|
|
25
|
+
"import": "./lib/index.mjs"
|
|
27
26
|
}
|
|
28
27
|
},
|
|
29
|
-
"main": "./lib/index.
|
|
28
|
+
"main": "./lib/index.mjs",
|
|
30
29
|
"module": "./lib/index.mjs",
|
|
31
30
|
"types": "./lib/src/index.d.ts",
|
|
32
31
|
"bin": {
|
|
@@ -40,18 +39,19 @@
|
|
|
40
39
|
],
|
|
41
40
|
"scripts": {
|
|
42
41
|
"build": "rimraf ./lib && rollup -c rollup.config.js --silent && rimraf ./bin && rollup -c rollup.bin.js --silent",
|
|
43
|
-
"inspect": "node ./bin/bin.cjs"
|
|
42
|
+
"inspect": "node ./bin/bin.cjs",
|
|
43
|
+
"typecheck": "tsc --noEmit"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@eslint-react/eslint-plugin": "5.
|
|
47
|
-
"@ladamczyk/qoq-eslint-v9-js-react": "^4.
|
|
48
|
-
"@ladamczyk/qoq-eslint-v9-ts": "^4.
|
|
49
|
-
"@ladamczyk/qoq-utils": "^4.
|
|
46
|
+
"@eslint-react/eslint-plugin": "5.9.0",
|
|
47
|
+
"@ladamczyk/qoq-eslint-v9-js-react": "^4.3.0",
|
|
48
|
+
"@ladamczyk/qoq-eslint-v9-ts": "^4.3.0",
|
|
49
|
+
"@ladamczyk/qoq-utils": "^4.3.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@rollup/plugin-typescript": "12.3.0",
|
|
53
53
|
"rimraf": "6.1.3",
|
|
54
|
-
"rollup": "4.
|
|
54
|
+
"rollup": "4.62.0",
|
|
55
55
|
"typescript": "6.0.3"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "3f2415ad6e2241c3b59eae520d25ba60b4f679e6"
|
|
68
68
|
}
|
package/lib/index.cjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var reactPlugin = require('@eslint-react/eslint-plugin');
|
|
4
|
-
var qoqEslintV9JsReact = require('@ladamczyk/qoq-eslint-v9-js-react');
|
|
5
|
-
var qoqEslintV9Ts = require('@ladamczyk/qoq-eslint-v9-ts');
|
|
6
|
-
var qoqUtils = require('@ladamczyk/qoq-utils');
|
|
7
|
-
var importPlugin = require('eslint-plugin-import-x');
|
|
8
|
-
|
|
9
|
-
const { plugins: jsReactBaseConfigPlugins, ...jsReactBaseConfigRest } = qoqEslintV9JsReact.baseConfig;
|
|
10
|
-
const { plugins: tsBaseConfigPlugins, ...tsBaseConfigRest } = qoqEslintV9Ts.baseConfig;
|
|
11
|
-
const baseConfig = {
|
|
12
|
-
...qoqUtils.objectMergeRight(jsReactBaseConfigRest, {
|
|
13
|
-
rules: Object.keys(importPlugin.configs.recommended.rules).reduce((acc, key) => {
|
|
14
|
-
acc[key] = undefined;
|
|
15
|
-
return acc;
|
|
16
|
-
}, {}),
|
|
17
|
-
}, tsBaseConfigRest, {
|
|
18
|
-
name: 'qoq-eslint-v9-ts-react',
|
|
19
|
-
rules: {
|
|
20
|
-
...qoqEslintV9JsReact.disabledRules,
|
|
21
|
-
...(reactPlugin.configs['recommended-typescript'].rules ?? {}),
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
plugins: { ...jsReactBaseConfigPlugins, ...tsBaseConfigPlugins },
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports.baseConfig = baseConfig;
|