@ladamczyk/qoq-eslint-v9-ts-react 4.0.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 +21 -0
- package/LICENSE +21 -0
- package/README.md +56 -0
- package/bin/bin.js +2 -0
- package/eslint.config.local.js +5 -0
- package/lib/index.cjs +24 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.mjs +22 -0
- package/package.json +68 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# @ladamczyk/qoq-eslint-v9-ts-react — Agent Context
|
|
2
|
+
|
|
3
|
+
ESLint flat config template for TypeScript + React projects. Merges `@ladamczyk/qoq-eslint-v9-js-react` and `@ladamczyk/qoq-eslint-v9-ts`.
|
|
4
|
+
|
|
5
|
+
## Exports
|
|
6
|
+
|
|
7
|
+
- `baseConfig` — TS + React config
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
Typically consumed via `qoq.config.js` using the `template` field. For manual use:
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import { baseConfig } from '@ladamczyk/qoq-eslint-v9-ts-react';
|
|
15
|
+
|
|
16
|
+
export default [baseConfig];
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Inheritance
|
|
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.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Łukasz Adamczyk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @ladamczyk/qoq-eslint-v9-ts-react
|
|
2
|
+
|
|
3
|
+
 
|
|
4
|
+
  
|
|
5
|
+
|
|
6
|
+
## Rationale
|
|
7
|
+
|
|
8
|
+
Tired of setting up [ESLint](https://www.npmjs.com/package/eslint) from scratch for every new project? With the introduction of [Flat Config](https://eslint.org/docs/latest/use/configure/configuration-files) in ESLint v9, we created a set of base templates for different setups. Check out all our [@ladamczyk/qoq-eslint-v9-\* packages](https://www.npmjs.com/search?q=%40ladamczyk%2Fqoq-eslint-v9-).
|
|
9
|
+
|
|
10
|
+
These configurations inherit from base presets and include all necessary packages and settings. The rules are opinionated, shaped by years of development experience, and can be used as a complete setup without any tweaks or as a foundation for your own configurations.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
npm install @ladamczyk/qoq-eslint-v9-ts-react
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
Package exports both CommonJS and ESM code just import it in Your eslint config file.
|
|
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
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
import jsBaseConfig from '@ladamczyk/qoq-eslint-v9-ts-react';
|
|
37
|
+
|
|
38
|
+
export default [
|
|
39
|
+
{
|
|
40
|
+
...jsBaseConfig,
|
|
41
|
+
files: [...]
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Rules preview with ESLint Config Inspector
|
|
47
|
+
|
|
48
|
+
To preview all rules defined by this config simply run:
|
|
49
|
+
|
|
50
|
+
npx -y @ladamczyk/qoq-eslint-v9-ts-react
|
|
51
|
+
|
|
52
|
+
### Last but not least
|
|
53
|
+
|
|
54
|
+
_Feel free to join us, please read [General Contributing Guidelines](https://github.com/ladamczyk-it/qoq/blob/master/.github/CONTRIBUTING.md)_
|
|
55
|
+
|
|
56
|
+
CLI technical documentation can be found [here](../eslint-v9/PROJECT.md)
|
package/bin/bin.js
ADDED
package/lib/index.cjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
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: '@ladamczyk/qoq-eslint-v9-ts-react',
|
|
19
|
+
rules: { ...qoqEslintV9JsReact.disabledRules, ...(reactPlugin.configs['recommended-typescript'].rules ?? {}) },
|
|
20
|
+
}),
|
|
21
|
+
plugins: { ...jsReactBaseConfigPlugins, ...tsBaseConfigPlugins },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.baseConfig = baseConfig;
|
package/lib/index.d.ts
ADDED
package/lib/index.mjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import reactPlugin from '@eslint-react/eslint-plugin';
|
|
2
|
+
import { baseConfig as baseConfig$1, disabledRules } from '@ladamczyk/qoq-eslint-v9-js-react';
|
|
3
|
+
import { baseConfig as baseConfig$2 } from '@ladamczyk/qoq-eslint-v9-ts';
|
|
4
|
+
import { objectMergeRight } from '@ladamczyk/qoq-utils';
|
|
5
|
+
import importPlugin from 'eslint-plugin-import-x';
|
|
6
|
+
|
|
7
|
+
const { plugins: jsReactBaseConfigPlugins, ...jsReactBaseConfigRest } = baseConfig$1;
|
|
8
|
+
const { plugins: tsBaseConfigPlugins, ...tsBaseConfigRest } = baseConfig$2;
|
|
9
|
+
const baseConfig = {
|
|
10
|
+
...objectMergeRight(jsReactBaseConfigRest, {
|
|
11
|
+
rules: Object.keys(importPlugin.configs.recommended.rules).reduce((acc, key) => {
|
|
12
|
+
acc[key] = undefined;
|
|
13
|
+
return acc;
|
|
14
|
+
}, {}),
|
|
15
|
+
}, tsBaseConfigRest, {
|
|
16
|
+
name: '@ladamczyk/qoq-eslint-v9-ts-react',
|
|
17
|
+
rules: { ...disabledRules, ...(reactPlugin.configs['recommended-typescript'].rules ?? {}) },
|
|
18
|
+
}),
|
|
19
|
+
plugins: { ...jsReactBaseConfigPlugins, ...tsBaseConfigPlugins },
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { baseConfig };
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ladamczyk/qoq-eslint-v9-ts-react",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "Eslint flat config template for TS + React",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"eslint TypeScript + React template",
|
|
7
|
+
"flat config",
|
|
8
|
+
"ladamczyk",
|
|
9
|
+
"qoq",
|
|
10
|
+
"QualityOverQuantity"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/ladamczyk-it/qoq/tree/master/packages/eslint-v9-ts-react",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/ladamczyk-it/qoq/issues"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+ssh://git@github.com/ladamczyk-it/qoq.git",
|
|
19
|
+
"directory": "packages/eslint-v9-ts-react"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./lib/index.d.ts",
|
|
25
|
+
"import": "./lib/index.mjs",
|
|
26
|
+
"require": "./lib/index.cjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"main": "./lib/index.cjs",
|
|
30
|
+
"module": "./lib/index.mjs",
|
|
31
|
+
"types": "./lib/index.d.ts",
|
|
32
|
+
"bin": {
|
|
33
|
+
"@ladamczyk/qoq-eslint-v9-ts-react": "./bin/bin.js"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"bin",
|
|
37
|
+
"lib",
|
|
38
|
+
"eslint.config.local.js",
|
|
39
|
+
"AGENTS.md"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "rimraf ./lib && rollup -c rollup.config.js --silent && rimraf ./bin && rollup -c rollup.bin.js --silent",
|
|
43
|
+
"inspect": "node ./bin/bin.cjs"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@eslint-react/eslint-plugin": "5.8.10",
|
|
47
|
+
"@ladamczyk/qoq-eslint-v9-js-react": "^4.0.0",
|
|
48
|
+
"@ladamczyk/qoq-eslint-v9-ts": "^4.0.0",
|
|
49
|
+
"@ladamczyk/qoq-utils": "^4.0.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@rollup/plugin-typescript": "12.3.0",
|
|
53
|
+
"rimraf": "6.1.3",
|
|
54
|
+
"rollup": "4.61.0",
|
|
55
|
+
"typescript": "6.0.3"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"eslint": "^10.3.0",
|
|
59
|
+
"typescript": ">=4.8.4 <7.0.0"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=22.15.0"
|
|
63
|
+
},
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"access": "public"
|
|
66
|
+
},
|
|
67
|
+
"gitHead": "6c4ed8c36b5428e2bcf3f56d4976319357b2522d"
|
|
68
|
+
}
|