eslint-plugin-th-rules 2.7.1 → 3.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/README.md +171 -11
- package/dist/configs/bundles/recommended-react.d.ts +199 -0
- package/dist/configs/bundles/recommended-react.js +11 -0
- package/dist/configs/bundles/recommended-typescript.d.ts +190 -0
- package/dist/configs/bundles/recommended-typescript.js +6 -0
- package/dist/configs/bundles/recommended.d.ts +190 -0
- package/dist/configs/bundles/recommended.js +8 -0
- package/dist/configs/core/base.d.ts +170 -0
- package/dist/configs/core/base.js +23 -0
- package/dist/configs/core/react.d.ts +6 -0
- package/dist/configs/core/react.js +8 -0
- package/dist/configs/core/typescript.d.ts +2 -0
- package/dist/configs/core/typescript.js +19 -0
- package/dist/configs/externals/base.d.ts +15 -0
- package/dist/configs/externals/base.js +16 -0
- package/dist/configs/externals/opinionated.d.ts +10 -0
- package/dist/configs/externals/opinionated.js +12 -0
- package/dist/index.d.ts +1170 -0
- package/dist/index.js +21 -0
- package/dist/plugin.d.ts +5 -0
- package/dist/plugin.js +14 -0
- package/dist/rules/no-boolean-coercion.d.ts +5 -0
- package/dist/rules/no-boolean-coercion.js +98 -0
- package/dist/rules/no-comments.d.ts +11 -0
- package/dist/rules/no-comments.js +83 -0
- package/dist/rules/no-default-export.d.ts +5 -0
- package/dist/rules/no-default-export.js +61 -0
- package/dist/rules/no-destructuring.d.ts +8 -0
- package/dist/rules/no-destructuring.js +121 -0
- package/dist/rules/prefer-is-empty.d.ts +5 -0
- package/dist/rules/prefer-is-empty.js +101 -0
- package/dist/rules/schemas-in-schemas-file.d.ts +9 -0
- package/dist/rules/schemas-in-schemas-file.js +141 -0
- package/dist/rules/top-level-functions.d.ts +5 -0
- package/dist/rules/top-level-functions.js +153 -0
- package/dist/rules/types-in-dts.d.ts +8 -0
- package/dist/rules/types-in-dts.js +76 -0
- package/package.json +25 -14
- package/.github/dependabot.yml +0 -15
- package/.github/workflows/codecov.yml +0 -26
- package/.github/workflows/codeql.yml +0 -82
- package/.github/workflows/dependency-review.yml +0 -20
- package/.github/workflows/main.yml +0 -43
- package/.github/workflows/scorecard.yml +0 -72
- package/.github/workflows/snyk-security.yml +0 -67
- package/.releaserc +0 -13
- package/.vscode/settings.json +0 -8
- package/.yarn/releases/yarn-4.12.0.cjs +0 -942
- package/.yarnrc.yml +0 -3
- package/CHANGELOG.md +0 -628
- package/SECURITY.md +0 -48
- package/docs/rules/no-boolean-coercion.md +0 -9
- package/docs/rules/no-comments.md +0 -50
- package/docs/rules/no-default-export.md +0 -26
- package/docs/rules/no-destructuring.md +0 -40
- package/docs/rules/prefer-is-empty.md +0 -9
- package/docs/rules/schemas-in-schemas-file.md +0 -170
- package/docs/rules/top-level-functions.md +0 -48
- package/docs/rules/types-in-dts.md +0 -112
- package/renovate.json +0 -3
- package/scripts/verify.mjs +0 -16
- package/src/index.js +0 -144
- package/src/rules/no-boolean-coercion.js +0 -124
- package/src/rules/no-comments.js +0 -94
- package/src/rules/no-default-export.js +0 -64
- package/src/rules/no-destructuring.js +0 -114
- package/src/rules/prefer-is-empty.js +0 -104
- package/src/rules/schemas-in-schemas-file.js +0 -191
- package/src/rules/top-level-functions.js +0 -200
- package/src/rules/types-in-dts.js +0 -94
- package/tests/no-boolean-coercion.test.ts +0 -83
- package/tests/prefer-is-empty.test.ts +0 -148
- package/tsconfig.json +0 -22
- package/xo.config.ts +0 -2
package/README.md
CHANGED
|
@@ -5,9 +5,143 @@
|
|
|
5
5
|
[](../../actions/workflows/codeql.yml)
|
|
6
6
|
[](https://securityscorecards.dev/viewer/?uri=github.com/tomerh2001/eslint-plugin-th-rules)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
A set of custom ESLint rules designed to improve code quality, enforce consistency, and introduce development conventions across TypeScript, React, and JavaScript projects.
|
|
9
|
+
|
|
10
|
+
This plugin provides:
|
|
11
|
+
|
|
12
|
+
- Custom rules unique to this repository
|
|
13
|
+
- Recommended flat configs that bundle th-rules with popular third-party plugins
|
|
14
|
+
- Advanced composable config layers for consumers who want fine-grained control
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install --save-dev eslint-plugin-th-rules
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This plugin requires ESLint Flat Config (ESLint 8.21+).
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# Usage
|
|
29
|
+
|
|
30
|
+
The plugin exposes three public recommended configurations.
|
|
31
|
+
|
|
32
|
+
These are the presets most users should consume.
|
|
33
|
+
|
|
34
|
+
## Recommended (Full Opinionated)
|
|
35
|
+
|
|
36
|
+
Includes:
|
|
37
|
+
|
|
38
|
+
- All th-rules
|
|
39
|
+
- External plugins (lodash, n, sonarjs, security)
|
|
40
|
+
- Opinionated rule settings for externals
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
// eslint.config.js
|
|
44
|
+
import thRules from "eslint-plugin-th-rules";
|
|
45
|
+
|
|
46
|
+
export default [
|
|
47
|
+
...thRules.configs.recommended
|
|
48
|
+
];
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Recommended + TypeScript
|
|
52
|
+
|
|
53
|
+
Recommended plus full strict/stylistic TypeScript configurations.
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
import thRules from "eslint-plugin-th-rules";
|
|
57
|
+
|
|
58
|
+
export default [
|
|
59
|
+
...thRules.configs["recommended-typescript"]
|
|
60
|
+
];
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Recommended + React
|
|
64
|
+
|
|
65
|
+
Recommended plus:
|
|
66
|
+
|
|
67
|
+
- eslint-plugin-react
|
|
68
|
+
- eslint-plugin-react-hooks
|
|
69
|
+
- JSX Runtime rules
|
|
70
|
+
|
|
71
|
+
```js
|
|
72
|
+
import thRules from "eslint-plugin-th-rules";
|
|
73
|
+
|
|
74
|
+
export default [
|
|
75
|
+
...thRules.configs["recommended-react"]
|
|
76
|
+
];
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
# Advanced Composition (Optional)
|
|
82
|
+
|
|
83
|
+
If you want total control, you may import internal composition layers.
|
|
84
|
+
|
|
85
|
+
These layers are intentionally not included in `configs`, because they are not presets but building blocks.
|
|
86
|
+
|
|
87
|
+
```js
|
|
88
|
+
import {
|
|
89
|
+
coreBase,
|
|
90
|
+
externalsBase,
|
|
91
|
+
externalsOpinionated,
|
|
92
|
+
coreTypescript,
|
|
93
|
+
coreReact
|
|
94
|
+
} from "eslint-plugin-th-rules";
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Only use th-rules
|
|
98
|
+
|
|
99
|
+
```js
|
|
100
|
+
export default [
|
|
101
|
+
...coreBase
|
|
102
|
+
];
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Add external plugins (unstyled)
|
|
106
|
+
|
|
107
|
+
```js
|
|
108
|
+
export default [
|
|
109
|
+
...coreBase,
|
|
110
|
+
...externalsBase
|
|
111
|
+
];
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Add external plugins + th-rules opinions
|
|
115
|
+
|
|
116
|
+
```js
|
|
117
|
+
export default [
|
|
118
|
+
...coreBase,
|
|
119
|
+
...externalsBase,
|
|
120
|
+
...externalsOpinionated
|
|
121
|
+
];
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Add TypeScript or React extensions
|
|
125
|
+
|
|
126
|
+
```js
|
|
127
|
+
export default [
|
|
128
|
+
...coreBase,
|
|
129
|
+
...externalsBase,
|
|
130
|
+
...externalsOpinionated,
|
|
131
|
+
...coreTypescript,
|
|
132
|
+
...coreReact
|
|
133
|
+
];
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
# Auto-Generated Rule Documentation
|
|
139
|
+
|
|
140
|
+
The following section is generated via `eslint-doc-generator`.
|
|
141
|
+
Do not edit below this line.
|
|
9
142
|
|
|
10
143
|
## Rules
|
|
144
|
+
|
|
11
145
|
<!-- begin auto-generated rules list -->
|
|
12
146
|
|
|
13
147
|
💼 Configurations enabled in.\
|
|
@@ -17,16 +151,42 @@ This repository contains custom ESLint rules to enhance code quality and consist
|
|
|
17
151
|
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
|
|
18
152
|
💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).
|
|
19
153
|
|
|
20
|
-
| Name | Description
|
|
21
|
-
| :--------------------------------------------------------------- |
|
|
22
|
-
| [no-boolean-coercion](docs/rules/no-boolean-coercion.md) | Disallow Boolean(value) or !!value. Enforce _.isNil(value) for
|
|
23
|
-
| [no-comments](docs/rules/no-comments.md) | Disallow comments except for specified allowed patterns.
|
|
24
|
-
| [no-default-export](docs/rules/no-default-export.md) | Convert unnamed default exports to named default exports based on the file name.
|
|
25
|
-
| [no-destructuring](docs/rules/no-destructuring.md) | Disallow destructuring that does not meet certain conditions
|
|
26
|
-
| [prefer-is-empty](docs/rules/prefer-is-empty.md) | Require _.isEmpty instead of length comparisons
|
|
27
|
-
| [schemas-in-schemas-file](docs/rules/schemas-in-schemas-file.md) | Require Zod schema declarations to be placed in a .schemas.ts file
|
|
28
|
-
| [top-level-functions](docs/rules/top-level-functions.md) | Require all top-level functions to be named
|
|
29
|
-
| [types-in-dts](docs/rules/types-in-dts.md) | Require TypeScript type declarations (type/interface/enum) to be placed in .d.ts files
|
|
154
|
+
| Name | Description | 💼 | 🔧 | 💡 |
|
|
155
|
+
| :--------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :------ | :- | :- |
|
|
156
|
+
| [no-boolean-coercion](docs/rules/no-boolean-coercion.md) | Disallow Boolean(value) or !!value. Enforce explicit checks: !_.isNil(value) for scalars and !_.isEmpty(value) for strings, arrays, and objects. | ✅ ⚛️ 🟦 | | 💡 |
|
|
157
|
+
| [no-comments](docs/rules/no-comments.md) | Disallow comments except for specified allowed patterns. | ✅ ⚛️ 🟦 | 🔧 | |
|
|
158
|
+
| [no-default-export](docs/rules/no-default-export.md) | Convert unnamed default exports to named default exports based on the file name. | ✅ ⚛️ 🟦 | 🔧 | |
|
|
159
|
+
| [no-destructuring](docs/rules/no-destructuring.md) | Disallow destructuring that does not meet certain conditions. | ✅ ⚛️ 🟦 | | |
|
|
160
|
+
| [prefer-is-empty](docs/rules/prefer-is-empty.md) | Require _.isEmpty instead of length comparisons. | ✅ ⚛️ 🟦 | | 💡 |
|
|
161
|
+
| [schemas-in-schemas-file](docs/rules/schemas-in-schemas-file.md) | Require Zod schema declarations to be placed in a .schemas.ts file. | ✅ ⚛️ 🟦 | | |
|
|
162
|
+
| [top-level-functions](docs/rules/top-level-functions.md) | Require all top-level functions to be named regular functions. | ✅ ⚛️ 🟦 | 🔧 | |
|
|
163
|
+
| [types-in-dts](docs/rules/types-in-dts.md) | Require TypeScript type declarations (type/interface/enum) to be placed in .d.ts files. | ✅ ⚛️ 🟦 | | |
|
|
30
164
|
|
|
31
165
|
<!-- end auto-generated rules list -->
|
|
32
166
|
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
# Updating Documentation
|
|
170
|
+
|
|
171
|
+
Auto-generate rule docs:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
npm run update:eslint-docs
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Recommended command:
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
"update:eslint-docs": "eslint-doc-generator \
|
|
181
|
+
--config-emoji \"recommended,✅\" \
|
|
182
|
+
--config-emoji \"recommended-react,⚛️\" \
|
|
183
|
+
--config-emoji \"recommended-typescript,🟦\""
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Internal layers (`core-*`, `externals-*`) are not included because they are not presets.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
# License
|
|
191
|
+
|
|
192
|
+
MIT
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import react from 'eslint-plugin-react';
|
|
2
|
+
export declare const recommendedReact: ({
|
|
3
|
+
name: string;
|
|
4
|
+
plugins: {
|
|
5
|
+
'th-rules': {
|
|
6
|
+
rules: any;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
languageOptions: {
|
|
10
|
+
ecmaVersion: string;
|
|
11
|
+
sourceType: string;
|
|
12
|
+
globals: {
|
|
13
|
+
afterAll: false;
|
|
14
|
+
afterEach: false;
|
|
15
|
+
beforeAll: false;
|
|
16
|
+
beforeEach: false;
|
|
17
|
+
describe: false;
|
|
18
|
+
expect: false;
|
|
19
|
+
fit: false;
|
|
20
|
+
it: false;
|
|
21
|
+
jest: false;
|
|
22
|
+
test: false;
|
|
23
|
+
xdescribe: false;
|
|
24
|
+
xit: false;
|
|
25
|
+
xtest: false;
|
|
26
|
+
AggregateError: false;
|
|
27
|
+
Array: false;
|
|
28
|
+
ArrayBuffer: false;
|
|
29
|
+
Atomics: false;
|
|
30
|
+
BigInt: false;
|
|
31
|
+
BigInt64Array: false;
|
|
32
|
+
BigUint64Array: false;
|
|
33
|
+
Boolean: false;
|
|
34
|
+
DataView: false;
|
|
35
|
+
Date: false;
|
|
36
|
+
decodeURI: false;
|
|
37
|
+
decodeURIComponent: false;
|
|
38
|
+
encodeURI: false;
|
|
39
|
+
encodeURIComponent: false;
|
|
40
|
+
Error: false;
|
|
41
|
+
escape: false;
|
|
42
|
+
eval: false;
|
|
43
|
+
EvalError: false;
|
|
44
|
+
FinalizationRegistry: false;
|
|
45
|
+
Float32Array: false;
|
|
46
|
+
Float64Array: false;
|
|
47
|
+
Function: false;
|
|
48
|
+
globalThis: false;
|
|
49
|
+
Infinity: false;
|
|
50
|
+
Int16Array: false;
|
|
51
|
+
Int32Array: false;
|
|
52
|
+
Int8Array: false;
|
|
53
|
+
Intl: false;
|
|
54
|
+
isFinite: false;
|
|
55
|
+
isNaN: false;
|
|
56
|
+
JSON: false;
|
|
57
|
+
Map: false;
|
|
58
|
+
Math: false;
|
|
59
|
+
NaN: false;
|
|
60
|
+
Number: false;
|
|
61
|
+
Object: false;
|
|
62
|
+
parseFloat: false;
|
|
63
|
+
parseInt: false;
|
|
64
|
+
Promise: false;
|
|
65
|
+
Proxy: false;
|
|
66
|
+
RangeError: false;
|
|
67
|
+
ReferenceError: false;
|
|
68
|
+
Reflect: false;
|
|
69
|
+
RegExp: false;
|
|
70
|
+
Set: false;
|
|
71
|
+
SharedArrayBuffer: false;
|
|
72
|
+
String: false;
|
|
73
|
+
Symbol: false;
|
|
74
|
+
SyntaxError: false;
|
|
75
|
+
TypeError: false;
|
|
76
|
+
Uint16Array: false;
|
|
77
|
+
Uint32Array: false;
|
|
78
|
+
Uint8Array: false;
|
|
79
|
+
Uint8ClampedArray: false;
|
|
80
|
+
undefined: false;
|
|
81
|
+
unescape: false;
|
|
82
|
+
URIError: false;
|
|
83
|
+
WeakMap: false;
|
|
84
|
+
WeakRef: false;
|
|
85
|
+
WeakSet: false;
|
|
86
|
+
__dirname: false;
|
|
87
|
+
__filename: false;
|
|
88
|
+
AbortController: false;
|
|
89
|
+
AbortSignal: false;
|
|
90
|
+
AsyncDisposableStack: false;
|
|
91
|
+
atob: false;
|
|
92
|
+
Blob: false;
|
|
93
|
+
BroadcastChannel: false;
|
|
94
|
+
btoa: false;
|
|
95
|
+
Buffer: false;
|
|
96
|
+
ByteLengthQueuingStrategy: false;
|
|
97
|
+
clearImmediate: false;
|
|
98
|
+
clearInterval: false;
|
|
99
|
+
clearTimeout: false;
|
|
100
|
+
CloseEvent: false;
|
|
101
|
+
CompressionStream: false;
|
|
102
|
+
console: false;
|
|
103
|
+
CountQueuingStrategy: false;
|
|
104
|
+
crypto: false;
|
|
105
|
+
Crypto: false;
|
|
106
|
+
CryptoKey: false;
|
|
107
|
+
CustomEvent: false;
|
|
108
|
+
DecompressionStream: false;
|
|
109
|
+
DisposableStack: false;
|
|
110
|
+
DOMException: false;
|
|
111
|
+
ErrorEvent: false;
|
|
112
|
+
Event: false;
|
|
113
|
+
EventTarget: false;
|
|
114
|
+
exports: true;
|
|
115
|
+
fetch: false;
|
|
116
|
+
File: false;
|
|
117
|
+
FormData: false;
|
|
118
|
+
global: false;
|
|
119
|
+
Headers: false;
|
|
120
|
+
localStorage: false;
|
|
121
|
+
MessageChannel: false;
|
|
122
|
+
MessageEvent: false;
|
|
123
|
+
MessagePort: false;
|
|
124
|
+
module: false;
|
|
125
|
+
navigator: false;
|
|
126
|
+
Navigator: false;
|
|
127
|
+
performance: false;
|
|
128
|
+
Performance: false;
|
|
129
|
+
PerformanceEntry: false;
|
|
130
|
+
PerformanceMark: false;
|
|
131
|
+
PerformanceMeasure: false;
|
|
132
|
+
PerformanceObserver: false;
|
|
133
|
+
PerformanceObserverEntryList: false;
|
|
134
|
+
PerformanceResourceTiming: false;
|
|
135
|
+
process: false;
|
|
136
|
+
queueMicrotask: false;
|
|
137
|
+
ReadableByteStreamController: false;
|
|
138
|
+
ReadableStream: false;
|
|
139
|
+
ReadableStreamBYOBReader: false;
|
|
140
|
+
ReadableStreamBYOBRequest: false;
|
|
141
|
+
ReadableStreamDefaultController: false;
|
|
142
|
+
ReadableStreamDefaultReader: false;
|
|
143
|
+
Request: false;
|
|
144
|
+
require: false;
|
|
145
|
+
Response: false;
|
|
146
|
+
sessionStorage: false;
|
|
147
|
+
setImmediate: false;
|
|
148
|
+
setInterval: false;
|
|
149
|
+
setTimeout: false;
|
|
150
|
+
Storage: false;
|
|
151
|
+
structuredClone: false;
|
|
152
|
+
SubtleCrypto: false;
|
|
153
|
+
SuppressedError: false;
|
|
154
|
+
TextDecoder: false;
|
|
155
|
+
TextDecoderStream: false;
|
|
156
|
+
TextEncoder: false;
|
|
157
|
+
TextEncoderStream: false;
|
|
158
|
+
TransformStream: false;
|
|
159
|
+
TransformStreamDefaultController: false;
|
|
160
|
+
URL: false;
|
|
161
|
+
URLPattern: false;
|
|
162
|
+
URLSearchParams: false;
|
|
163
|
+
WebAssembly: false;
|
|
164
|
+
WebSocket: false;
|
|
165
|
+
WritableStream: false;
|
|
166
|
+
WritableStreamDefaultController: false;
|
|
167
|
+
WritableStreamDefaultWriter: false;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
rules: Record<string, string>;
|
|
171
|
+
} | {
|
|
172
|
+
name: string;
|
|
173
|
+
plugins: {
|
|
174
|
+
lodash: any;
|
|
175
|
+
n: import("@eslint/core", { with: { "resolution-mode": "require" } }).Plugin & {
|
|
176
|
+
configs: import("eslint-plugin-n").Configs;
|
|
177
|
+
};
|
|
178
|
+
sonarjs: typeof import("eslint-plugin-sonarjs");
|
|
179
|
+
security: typeof import("eslint-plugin-security");
|
|
180
|
+
};
|
|
181
|
+
rules: {};
|
|
182
|
+
} | {
|
|
183
|
+
name: string;
|
|
184
|
+
rules: {
|
|
185
|
+
'lodash/import-scope': string[];
|
|
186
|
+
'lodash/chaining': string[];
|
|
187
|
+
camelcase: string;
|
|
188
|
+
'security/detect-unsafe-regex': string;
|
|
189
|
+
'sonarjs/no-clear-text-protocols': string;
|
|
190
|
+
};
|
|
191
|
+
} | {
|
|
192
|
+
name: string;
|
|
193
|
+
rules: {
|
|
194
|
+
'react-hooks/set-state-in-effect': string;
|
|
195
|
+
};
|
|
196
|
+
} | react.ReactFlatConfig | {
|
|
197
|
+
plugins: string[];
|
|
198
|
+
rules: import("eslint").Linter.RulesRecord;
|
|
199
|
+
})[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import react from 'eslint-plugin-react';
|
|
2
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
3
|
+
import { coreReact } from '../core/react.js';
|
|
4
|
+
import { recommended } from './recommended.js';
|
|
5
|
+
export const recommendedReact = [
|
|
6
|
+
...recommended,
|
|
7
|
+
react.configs.flat.recommended,
|
|
8
|
+
react.configs.flat['jsx-runtime'],
|
|
9
|
+
reactHooks.configs.recommended,
|
|
10
|
+
...coreReact,
|
|
11
|
+
];
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
export declare const recommendedTypescript: ({
|
|
2
|
+
name: string;
|
|
3
|
+
plugins: {
|
|
4
|
+
'th-rules': {
|
|
5
|
+
rules: any;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
languageOptions: {
|
|
9
|
+
ecmaVersion: string;
|
|
10
|
+
sourceType: string;
|
|
11
|
+
globals: {
|
|
12
|
+
afterAll: false;
|
|
13
|
+
afterEach: false;
|
|
14
|
+
beforeAll: false;
|
|
15
|
+
beforeEach: false;
|
|
16
|
+
describe: false;
|
|
17
|
+
expect: false;
|
|
18
|
+
fit: false;
|
|
19
|
+
it: false;
|
|
20
|
+
jest: false;
|
|
21
|
+
test: false;
|
|
22
|
+
xdescribe: false;
|
|
23
|
+
xit: false;
|
|
24
|
+
xtest: false;
|
|
25
|
+
AggregateError: false;
|
|
26
|
+
Array: false;
|
|
27
|
+
ArrayBuffer: false;
|
|
28
|
+
Atomics: false;
|
|
29
|
+
BigInt: false;
|
|
30
|
+
BigInt64Array: false;
|
|
31
|
+
BigUint64Array: false;
|
|
32
|
+
Boolean: false;
|
|
33
|
+
DataView: false;
|
|
34
|
+
Date: false;
|
|
35
|
+
decodeURI: false;
|
|
36
|
+
decodeURIComponent: false;
|
|
37
|
+
encodeURI: false;
|
|
38
|
+
encodeURIComponent: false;
|
|
39
|
+
Error: false;
|
|
40
|
+
escape: false;
|
|
41
|
+
eval: false;
|
|
42
|
+
EvalError: false;
|
|
43
|
+
FinalizationRegistry: false;
|
|
44
|
+
Float32Array: false;
|
|
45
|
+
Float64Array: false;
|
|
46
|
+
Function: false;
|
|
47
|
+
globalThis: false;
|
|
48
|
+
Infinity: false;
|
|
49
|
+
Int16Array: false;
|
|
50
|
+
Int32Array: false;
|
|
51
|
+
Int8Array: false;
|
|
52
|
+
Intl: false;
|
|
53
|
+
isFinite: false;
|
|
54
|
+
isNaN: false;
|
|
55
|
+
JSON: false;
|
|
56
|
+
Map: false;
|
|
57
|
+
Math: false;
|
|
58
|
+
NaN: false;
|
|
59
|
+
Number: false;
|
|
60
|
+
Object: false;
|
|
61
|
+
parseFloat: false;
|
|
62
|
+
parseInt: false;
|
|
63
|
+
Promise: false;
|
|
64
|
+
Proxy: false;
|
|
65
|
+
RangeError: false;
|
|
66
|
+
ReferenceError: false;
|
|
67
|
+
Reflect: false;
|
|
68
|
+
RegExp: false;
|
|
69
|
+
Set: false;
|
|
70
|
+
SharedArrayBuffer: false;
|
|
71
|
+
String: false;
|
|
72
|
+
Symbol: false;
|
|
73
|
+
SyntaxError: false;
|
|
74
|
+
TypeError: false;
|
|
75
|
+
Uint16Array: false;
|
|
76
|
+
Uint32Array: false;
|
|
77
|
+
Uint8Array: false;
|
|
78
|
+
Uint8ClampedArray: false;
|
|
79
|
+
undefined: false;
|
|
80
|
+
unescape: false;
|
|
81
|
+
URIError: false;
|
|
82
|
+
WeakMap: false;
|
|
83
|
+
WeakRef: false;
|
|
84
|
+
WeakSet: false;
|
|
85
|
+
__dirname: false;
|
|
86
|
+
__filename: false;
|
|
87
|
+
AbortController: false;
|
|
88
|
+
AbortSignal: false;
|
|
89
|
+
AsyncDisposableStack: false;
|
|
90
|
+
atob: false;
|
|
91
|
+
Blob: false;
|
|
92
|
+
BroadcastChannel: false;
|
|
93
|
+
btoa: false;
|
|
94
|
+
Buffer: false;
|
|
95
|
+
ByteLengthQueuingStrategy: false;
|
|
96
|
+
clearImmediate: false;
|
|
97
|
+
clearInterval: false;
|
|
98
|
+
clearTimeout: false;
|
|
99
|
+
CloseEvent: false;
|
|
100
|
+
CompressionStream: false;
|
|
101
|
+
console: false;
|
|
102
|
+
CountQueuingStrategy: false;
|
|
103
|
+
crypto: false;
|
|
104
|
+
Crypto: false;
|
|
105
|
+
CryptoKey: false;
|
|
106
|
+
CustomEvent: false;
|
|
107
|
+
DecompressionStream: false;
|
|
108
|
+
DisposableStack: false;
|
|
109
|
+
DOMException: false;
|
|
110
|
+
ErrorEvent: false;
|
|
111
|
+
Event: false;
|
|
112
|
+
EventTarget: false;
|
|
113
|
+
exports: true;
|
|
114
|
+
fetch: false;
|
|
115
|
+
File: false;
|
|
116
|
+
FormData: false;
|
|
117
|
+
global: false;
|
|
118
|
+
Headers: false;
|
|
119
|
+
localStorage: false;
|
|
120
|
+
MessageChannel: false;
|
|
121
|
+
MessageEvent: false;
|
|
122
|
+
MessagePort: false;
|
|
123
|
+
module: false;
|
|
124
|
+
navigator: false;
|
|
125
|
+
Navigator: false;
|
|
126
|
+
performance: false;
|
|
127
|
+
Performance: false;
|
|
128
|
+
PerformanceEntry: false;
|
|
129
|
+
PerformanceMark: false;
|
|
130
|
+
PerformanceMeasure: false;
|
|
131
|
+
PerformanceObserver: false;
|
|
132
|
+
PerformanceObserverEntryList: false;
|
|
133
|
+
PerformanceResourceTiming: false;
|
|
134
|
+
process: false;
|
|
135
|
+
queueMicrotask: false;
|
|
136
|
+
ReadableByteStreamController: false;
|
|
137
|
+
ReadableStream: false;
|
|
138
|
+
ReadableStreamBYOBReader: false;
|
|
139
|
+
ReadableStreamBYOBRequest: false;
|
|
140
|
+
ReadableStreamDefaultController: false;
|
|
141
|
+
ReadableStreamDefaultReader: false;
|
|
142
|
+
Request: false;
|
|
143
|
+
require: false;
|
|
144
|
+
Response: false;
|
|
145
|
+
sessionStorage: false;
|
|
146
|
+
setImmediate: false;
|
|
147
|
+
setInterval: false;
|
|
148
|
+
setTimeout: false;
|
|
149
|
+
Storage: false;
|
|
150
|
+
structuredClone: false;
|
|
151
|
+
SubtleCrypto: false;
|
|
152
|
+
SuppressedError: false;
|
|
153
|
+
TextDecoder: false;
|
|
154
|
+
TextDecoderStream: false;
|
|
155
|
+
TextEncoder: false;
|
|
156
|
+
TextEncoderStream: false;
|
|
157
|
+
TransformStream: false;
|
|
158
|
+
TransformStreamDefaultController: false;
|
|
159
|
+
URL: false;
|
|
160
|
+
URLPattern: false;
|
|
161
|
+
URLSearchParams: false;
|
|
162
|
+
WebAssembly: false;
|
|
163
|
+
WebSocket: false;
|
|
164
|
+
WritableStream: false;
|
|
165
|
+
WritableStreamDefaultController: false;
|
|
166
|
+
WritableStreamDefaultWriter: false;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
rules: Record<string, string>;
|
|
170
|
+
} | {
|
|
171
|
+
name: string;
|
|
172
|
+
plugins: {
|
|
173
|
+
lodash: any;
|
|
174
|
+
n: import("@eslint/core", { with: { "resolution-mode": "require" } }).Plugin & {
|
|
175
|
+
configs: import("eslint-plugin-n").Configs;
|
|
176
|
+
};
|
|
177
|
+
sonarjs: typeof import("eslint-plugin-sonarjs");
|
|
178
|
+
security: typeof import("eslint-plugin-security");
|
|
179
|
+
};
|
|
180
|
+
rules: {};
|
|
181
|
+
} | {
|
|
182
|
+
name: string;
|
|
183
|
+
rules: {
|
|
184
|
+
'lodash/import-scope': string[];
|
|
185
|
+
'lodash/chaining': string[];
|
|
186
|
+
camelcase: string;
|
|
187
|
+
'security/detect-unsafe-regex': string;
|
|
188
|
+
'sonarjs/no-clear-text-protocols': string;
|
|
189
|
+
};
|
|
190
|
+
} | import("typescript-eslint").ConfigWithExtends)[];
|