eslint-config-typed 2.0.0 → 2.2.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 +62 -15
- package/dist/configs/jest.d.mts.map +1 -1
- package/dist/configs/preact.d.mts.map +1 -1
- package/dist/configs/preact.mjs.map +1 -1
- package/dist/configs/react.mjs.map +1 -1
- package/dist/configs/testing-library.d.mts.map +1 -1
- package/dist/configs/typescript-without-rules.d.mts.map +1 -1
- package/dist/configs/typescript-without-rules.mjs +10 -1
- package/dist/configs/typescript-without-rules.mjs.map +1 -1
- package/dist/configs/typescript.d.mts.map +1 -1
- package/dist/configs/typescript.mjs.map +1 -1
- package/dist/configs/vitest.d.mts.map +1 -1
- package/dist/entry-point.d.mts +1 -1
- package/dist/entry-point.d.mts.map +1 -1
- package/dist/entry-point.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/rules/eslint-import-rules.d.mts.map +1 -1
- package/dist/rules/eslint-import-rules.mjs +1 -0
- package/dist/rules/eslint-import-rules.mjs.map +1 -1
- package/dist/rules/eslint-plugin-rules.d.mts +1 -0
- package/dist/rules/eslint-plugin-rules.d.mts.map +1 -1
- package/dist/rules/eslint-plugin-rules.mjs +1 -0
- package/dist/rules/eslint-plugin-rules.mjs.map +1 -1
- package/dist/rules/eslint-react-rules.mjs +1 -1
- package/dist/rules/eslint-rules.d.mts +67 -3
- package/dist/rules/eslint-rules.d.mts.map +1 -1
- package/dist/rules/eslint-rules.mjs +182 -36
- package/dist/rules/eslint-rules.mjs.map +1 -1
- package/dist/rules/eslint-unicorn-rules.d.mts +4 -1
- package/dist/rules/eslint-unicorn-rules.d.mts.map +1 -1
- package/dist/rules/eslint-unicorn-rules.mjs +4 -1
- package/dist/rules/eslint-unicorn-rules.mjs.map +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/types/rules/eslint-plugin-rules.d.mts +17 -0
- package/dist/types/rules/eslint-plugin-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-react-hooks-rules.d.mts +2 -1
- package/dist/types/rules/eslint-react-hooks-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-unicorn-rules.d.mts +219 -142
- package/dist/types/rules/eslint-unicorn-rules.d.mts.map +1 -1
- package/package.json +11 -8
- package/src/configs/jest.mts +1 -1
- package/src/configs/preact.mts +36 -35
- package/src/configs/react.mts +1 -1
- package/src/configs/testing-library.mts +1 -1
- package/src/configs/typescript-without-rules.mts +10 -1
- package/src/configs/typescript.mts +74 -72
- package/src/configs/vitest.mts +1 -1
- package/src/entry-point.mts +2 -0
- package/src/rules/eslint-import-rules.mts +2 -0
- package/src/rules/eslint-plugin-rules.mts +1 -0
- package/src/rules/eslint-react-rules.mts +1 -1
- package/src/rules/eslint-rules.mts +216 -38
- package/src/rules/eslint-unicorn-rules.mts +5 -1
- package/src/types/rules/eslint-plugin-rules.mts +18 -0
- package/src/types/rules/eslint-react-hooks-rules.mts +2 -1
- package/src/types/rules/eslint-unicorn-rules.mts +226 -142
package/README.md
CHANGED
|
@@ -21,6 +21,8 @@ A comprehensive ESLint configuration package with strongly-typed rule definition
|
|
|
21
21
|
- [Node.js TypeScript Project](#nodejs-typescript-project)
|
|
22
22
|
- [React + Testing Libraries](#react--testing-libraries)
|
|
23
23
|
- [VS Code Integration](#vs-code-integration)
|
|
24
|
+
- [TypeScript Configuration Files](#typescript-configuration-files)
|
|
25
|
+
- [Included plugins](#included-plugins)
|
|
24
26
|
- [API Reference](#api-reference)
|
|
25
27
|
- [Configuration Functions](#configuration-functions)
|
|
26
28
|
- [Base Configurations](#base-configurations)
|
|
@@ -44,7 +46,6 @@ A comprehensive ESLint configuration package with strongly-typed rule definition
|
|
|
44
46
|
- [Known Limitations](#known-limitations)
|
|
45
47
|
- [Contributing](#contributing)
|
|
46
48
|
- [License](#license)
|
|
47
|
-
- [Future Updates](#future-updates)
|
|
48
49
|
|
|
49
50
|
## Features
|
|
50
51
|
|
|
@@ -63,11 +64,11 @@ A comprehensive ESLint configuration package with strongly-typed rule definition
|
|
|
63
64
|
## Installation
|
|
64
65
|
|
|
65
66
|
```sh
|
|
66
|
-
npm add -D eslint-config-typed
|
|
67
|
+
npm add -D eslint eslint-config-typed
|
|
67
68
|
# or
|
|
68
|
-
yarn add -D eslint-config-typed
|
|
69
|
+
yarn add -D eslint eslint-config-typed
|
|
69
70
|
# or
|
|
70
|
-
pnpm add -D eslint-config-typed
|
|
71
|
+
pnpm add -D eslint eslint-config-typed
|
|
71
72
|
```
|
|
72
73
|
|
|
73
74
|
All required ESLint plugins and dependencies are automatically installed.
|
|
@@ -316,6 +317,55 @@ Add the following to `.vscode/settings.json` for proper ESLint integration:
|
|
|
316
317
|
}
|
|
317
318
|
```
|
|
318
319
|
|
|
320
|
+
## TypeScript Configuration Files
|
|
321
|
+
|
|
322
|
+
You can also write your eslint config in `.ts` or `.mts` format, all you need to do is run `npm add -D jiti`.
|
|
323
|
+
|
|
324
|
+
```ts
|
|
325
|
+
import {
|
|
326
|
+
eslintConfigForTypeScript,
|
|
327
|
+
eslintConfigForVitest,
|
|
328
|
+
type FlatConfig,
|
|
329
|
+
} from 'eslint-config-typed';
|
|
330
|
+
|
|
331
|
+
export default [
|
|
332
|
+
...eslintConfigForTypeScript({
|
|
333
|
+
tsconfigRootDir: thisDir,
|
|
334
|
+
tsconfigFileName: './tsconfig.json',
|
|
335
|
+
packageDirs: [thisDir],
|
|
336
|
+
}),
|
|
337
|
+
eslintConfigForVitest(),
|
|
338
|
+
] satisfies FlatConfig[];
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
For details, see <https://eslint.org/docs/latest/use/configure/configuration-files#typescript-configuration-files>.
|
|
342
|
+
|
|
343
|
+
## Included plugins
|
|
344
|
+
|
|
345
|
+
- @typescript-eslint/eslint-plugin
|
|
346
|
+
- eslint-plugin-unicorn
|
|
347
|
+
- eslint-plugin-functional
|
|
348
|
+
- eslint-plugin-total-functions (Reimplemented in this repository to support flat config)
|
|
349
|
+
- eslint-plugin-array-func
|
|
350
|
+
- eslint-plugin-prefer-arrow-functions
|
|
351
|
+
- eslint-plugin-sort-destructure-keys
|
|
352
|
+
- eslint-plugin-security
|
|
353
|
+
- eslint-plugin-promise
|
|
354
|
+
- eslint-plugin-import
|
|
355
|
+
- eslint-plugin-strict-dependencies
|
|
356
|
+
- eslint-plugin-tree-shakable (Reimplemented in this repository to support flat config)
|
|
357
|
+
- eslint-plugin-react
|
|
358
|
+
- eslint-plugin-react-hooks
|
|
359
|
+
- eslint-plugin-react-perf
|
|
360
|
+
- eslint-plugin-react-refresh
|
|
361
|
+
- eslint-plugin-jsx-a11y
|
|
362
|
+
- eslint-plugin-vitest
|
|
363
|
+
- eslint-plugin-jest
|
|
364
|
+
- eslint-plugin-playwright
|
|
365
|
+
- eslint-plugin-cypress
|
|
366
|
+
- eslint-plugin-testing-library
|
|
367
|
+
- eslint-plugin-eslint-plugin
|
|
368
|
+
|
|
319
369
|
## API Reference
|
|
320
370
|
|
|
321
371
|
### Configuration Functions
|
|
@@ -379,15 +429,17 @@ Pre-configured rule sets that can be imported and customized:
|
|
|
379
429
|
|
|
380
430
|
### Exported Pre-configured Rule Options
|
|
381
431
|
|
|
382
|
-
| Pre-configured rule option | Rule | Description
|
|
383
|
-
| :-------------------------------- | :---------------------- |
|
|
384
|
-
| **`restrictedGlobals`** | `no-restricted-globals` | Array of restricted global variables
|
|
385
|
-
| **`restrictedGlobalsForBrowser`** | `no-restricted-globals` | Browser-environment-specific restricted globals
|
|
432
|
+
| Pre-configured rule option | Rule | Description |
|
|
433
|
+
| :-------------------------------- | :---------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
434
|
+
| **`restrictedGlobals`** | `no-restricted-globals` | Array of restricted global variables |
|
|
435
|
+
| **`restrictedGlobalsForBrowser`** | `no-restricted-globals` | Browser-environment-specific restricted globals |
|
|
436
|
+
| **`restrictedSyntax`** | `no-restricted-syntax` | Disallows the `in` operator, `Object.prototype.hasOwnProperty.call` (suggests using `Object.hasOwn`), and `new Array(*)` syntax (suggests using `Array.from`) |
|
|
437
|
+
| **`restrictedSyntaxForReact`** | `no-restricted-syntax` | Rule set to restrict React component styling |
|
|
386
438
|
|
|
387
439
|
You can find other pre-configured rule options by traversing the pre-defined rules object like this:
|
|
388
440
|
|
|
389
|
-
- `typescriptEslintRules['@typescript-eslint/no-
|
|
390
|
-
- `eslintRules['
|
|
441
|
+
- `typescriptEslintRules['@typescript-eslint/no-unused-vars'][1].varsIgnorePattern`
|
|
442
|
+
- `eslintRules['logical-assignment-operators'].slice(1)`
|
|
391
443
|
|
|
392
444
|
The shape of the rule option varies depending on the rule, so please check the contents by tracing the predefined rules each time and extract it.
|
|
393
445
|
|
|
@@ -647,8 +699,3 @@ Contributions are welcome! Please check our [GitHub repository](https://github.c
|
|
|
647
699
|
## License
|
|
648
700
|
|
|
649
701
|
This project is licensed under the [Apache License 2.0](./LICENSE).
|
|
650
|
-
|
|
651
|
-
## Future Updates
|
|
652
|
-
|
|
653
|
-
- Enhanced support for `eslint-plugin-functional`
|
|
654
|
-
- Migration from `functional/prefer-readonly-type` to `functional/prefer-immutable-types` and `functional/type-declaration-immutability`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest.d.mts","sourceRoot":"","sources":["../../src/configs/jest.mts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvE,eAAO,MAAM,mBAAmB,GAAI,QAAQ,SAAS,MAAM,EAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"jest.d.mts","sourceRoot":"","sources":["../../src/configs/jest.mts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvE,eAAO,MAAM,mBAAmB,GAAI,QAAQ,SAAS,MAAM,EAAE,KAAG,UAgBnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preact.d.mts","sourceRoot":"","sources":["../../src/configs/preact.mts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGvE,eAAO,MAAM,qBAAqB,GAChC,QAAQ,SAAS,MAAM,EAAE,KACxB,SAAS,UAAU,
|
|
1
|
+
{"version":3,"file":"preact.d.mts","sourceRoot":"","sources":["../../src/configs/preact.mts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGvE,eAAO,MAAM,qBAAqB,GAChC,QAAQ,SAAS,MAAM,EAAE,KACxB,SAAS,UAAU,EAqCV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preact.mjs","sources":["../../src/configs/preact.mts"],"sourcesContent":[null],"names":[],"mappings":";;;MAGa,qBAAqB,GAAG,CACnC,KAAyB,
|
|
1
|
+
{"version":3,"file":"preact.mjs","sources":["../../src/configs/preact.mts"],"sourcesContent":[null],"names":[],"mappings":";;;MAGa,qBAAqB,GAAG,CACnC,KAAyB,KAEzB;IACE,GAAG,wBAAwB,CAAC,KAAK,CAAC;AAClC,IAAA;AACE,QAAA,IAAI,KAAK,KAAK,SAAS,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;AACzC,QAAA,QAAQ,EAAE;AACR,YAAA,KAAK,EAAE;AACL,gBAAA,MAAM,EAAE,GAAG;AACX,gBAAA,OAAO,EAAE,QAAQ;AAClB,aAAA;AACF,SAAA;QACD,KAAK,EAAE,gBAAgB,CAAC;AACtB,YAAA,0CAA0C,EAAE;gBAC1C,OAAO;AACP,gBAAA;AACE,oBAAA,KAAK,EAAE;AACL,wBAAA;AACE,4BAAA,IAAI,EAAE,eAAe;AACrB,4BAAA,WAAW,EAAE;gCACX,MAAM;gCACN,UAAU;gCACV,YAAY;gCACZ,SAAS;gCACT,aAAa;gCACb,QAAQ;gCACR,YAAY;gCACZ,WAAW;gCACX,iBAAiB;gCACjB,kBAAkB;AACnB,6BAAA;AACD,4BAAA,OAAO,EAAE,yCAAyC;AACnD,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;SACF,CAAC;AACH,KAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.mjs","sources":["../../src/configs/react.mts"],"sourcesContent":[null],"names":[],"mappings":";;MAGa,oBAAoB,GAAG,CAClC,KAAyB,KAEzB;IACE,GAAG,wBAAwB,CAAC,KAAK,CAAC;AAClC,IAAA;AACE,QAAA,IAAI,KAAK,KAAK,SAAS,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;AACzC,QAAA,QAAQ,EAAE;AACR,YAAA,KAAK,EAAE;AACL,gBAAA,OAAO,EAAE,QAAQ;AAClB,aAAA;AACF,SAAA;
|
|
1
|
+
{"version":3,"file":"react.mjs","sources":["../../src/configs/react.mts"],"sourcesContent":[null],"names":[],"mappings":";;MAGa,oBAAoB,GAAG,CAClC,KAAyB,KAEzB;IACE,GAAG,wBAAwB,CAAC,KAAK,CAAC;AAClC,IAAA;AACE,QAAA,IAAI,KAAK,KAAK,SAAS,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;AACzC,QAAA,QAAQ,EAAE;AACR,YAAA,KAAK,EAAE;AACL,gBAAA,OAAO,EAAE,QAAQ;AAClB,aAAA;AACF,SAAA;AACF,KAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing-library.d.mts","sourceRoot":"","sources":["../../src/configs/testing-library.mts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvE,eAAO,MAAM,6BAA6B,GACxC,QAAQ,SAAS,MAAM,EAAE,KACxB,
|
|
1
|
+
{"version":3,"file":"testing-library.d.mts","sourceRoot":"","sources":["../../src/configs/testing-library.mts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvE,eAAO,MAAM,6BAA6B,GACxC,QAAQ,SAAS,MAAM,EAAE,KACxB,UAcU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-without-rules.d.mts","sourceRoot":"","sources":["../../src/configs/typescript-without-rules.mts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,eAAO,MAAM,qCAAqC,GAAI,wCAGnD,QAAQ,CAAC;IACV,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC,KAAG,SAAS,UAAU,
|
|
1
|
+
{"version":3,"file":"typescript-without-rules.d.mts","sourceRoot":"","sources":["../../src/configs/typescript-without-rules.mts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,eAAO,MAAM,qCAAqC,GAAI,wCAGnD,QAAQ,CAAC;IACV,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC,KAAG,SAAS,UAAU,EA2FZ,CAAC"}
|
|
@@ -4,7 +4,16 @@ import { plugins } from './plugins.mjs';
|
|
|
4
4
|
|
|
5
5
|
const eslintConfigForTypeScriptWithoutRules = ({ tsconfigFileName, tsconfigRootDir, }) => [
|
|
6
6
|
{
|
|
7
|
-
ignores: [
|
|
7
|
+
ignores: [
|
|
8
|
+
'eslint.config.{js,ts,mjs,mts,cjs,cts}',
|
|
9
|
+
'eslint.config.*.{js,ts,mjs,mts,cjs,cts}',
|
|
10
|
+
'eslint.*.config.{js,ts,mjs,mts,cjs,cts}',
|
|
11
|
+
'node_modules',
|
|
12
|
+
'**/node_modules/**',
|
|
13
|
+
'dist',
|
|
14
|
+
'build',
|
|
15
|
+
'coverage',
|
|
16
|
+
],
|
|
8
17
|
},
|
|
9
18
|
{
|
|
10
19
|
languageOptions: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-without-rules.mjs","sources":["../../src/configs/typescript-without-rules.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKO,MAAM,qCAAqC,GAAG,CAAC,EACpD,gBAAgB,EAChB,eAAe,GAIf,KACA;AACE,IAAA;AACE,QAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"typescript-without-rules.mjs","sources":["../../src/configs/typescript-without-rules.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKO,MAAM,qCAAqC,GAAG,CAAC,EACpD,gBAAgB,EAChB,eAAe,GAIf,KACA;AACE,IAAA;AACE,QAAA,OAAO,EAAE;YACP,uCAAuC;YACvC,yCAAyC;YACzC,yCAAyC;YACzC,cAAc;YACd,oBAAoB;YACpB,MAAM;YACN,OAAO;YACP,UAAU;AACX,SAAA;AACF,KAAA;AACD,IAAA;AACE,QAAA,eAAe,EAAE;AACf,YAAA,WAAW,EAAE,QAAQ;AACrB,YAAA,MAAM,EAAE,sBAAsB;AAC9B,YAAA,aAAa,EAAE;AACb,gBAAA,OAAO,EAAE,gBAAgB;gBACzB,eAAe;AACf,gBAAA,WAAW,EAAE,QAAQ;AACrB,gBAAA,YAAY,EAAE;AACZ,oBAAA,OAAO,EAAE,IAAI;AACb,oBAAA,aAAa,EAAE,IAAI;AACnB,oBAAA,GAAG,EAAE,IAAI;AACV,iBAAA;gBACD,SAAS,EAAE,IAAI;AACf,gBAAA,UAAU,EAAE,QAAQ;AACrB,aAAA;AACD,YAAA,OAAO,EAAE;gBACP,GAAG,OAAO,CAAC,MAAM;AAClB,aAAA;AACF,SAAA;AACD,QAAA,aAAa,EAAE;AACb,YAAA,cAAc,EAAE,KAAK;AACrB,YAAA,6BAA6B,EAAE,IAAI;AACpC,SAAA;QACD,OAAO;AACP,QAAA,QAAQ,EAAE;AACR,YAAA,gBAAgB,EAAE;AAChB,gBAAA,2BAA2B,EAAE;oBAC3B,UAAU;oBACV,KAAK;oBACL,KAAK;oBACL,MAAM;oBACN,MAAM;oBACN,MAAM;oBACN,MAAM;oBACN,MAAM;oBACN,MAAM;AACP,iBAAA;AACF,aAAA;AACD,YAAA,iBAAiB,EAAE;AACjB,gBAAA,UAAU,EAAE;oBACV,cAAc,EAAE,IAAI;;oBAEpB,OAAO,EAAE,CAAC,2BAA2B,CAAC;AACvC,iBAAA;;AAED,gBAAA,IAAI,EAAE;AACJ,oBAAA,UAAU,EAAE;wBACV,UAAU;wBACV,KAAK;wBACL,KAAK;wBACL,MAAM;wBACN,MAAM;wBACN,MAAM;wBACN,MAAM;wBACN,MAAM;wBACN,MAAM;AACP,qBAAA;AACF,iBAAA;AACF,aAAA;;AAED,YAAA,mBAAmB,EAAE;gBACnB,KAAK;gBACL,KAAK;gBACL,MAAM;gBACN,MAAM;gBACN,MAAM;gBACN,MAAM;gBACN,MAAM;gBACN,MAAM;AACP,aAAA;AACD,YAAA,gCAAgC,EAAE;gBAChC,cAAc;gBACd,qBAAqB;AACtB,aAAA;AACF,SAAA;AACF,KAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.mts","sourceRoot":"","sources":["../../src/configs/typescript.mts"],"names":[],"mappings":"AAcA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGvE,eAAO,MAAM,yBAAyB,GAAI,8EAMvC,QAAQ,CAAC;IACV,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC,KAAG,SAAS,UAAU,
|
|
1
|
+
{"version":3,"file":"typescript.d.mts","sourceRoot":"","sources":["../../src/configs/typescript.mts"],"names":[],"mappings":"AAcA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGvE,eAAO,MAAM,yBAAyB,GAAI,8EAMvC,QAAQ,CAAC;IACV,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC,KAAG,SAAS,UAAU,EA6EZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.mjs","sources":["../../src/configs/typescript.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;AAiBO,MAAM,yBAAyB,GAAG,CAAC,EACxC,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GAOhB,
|
|
1
|
+
{"version":3,"file":"typescript.mjs","sources":["../../src/configs/typescript.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;AAiBO,MAAM,yBAAyB,GAAG,CAAC,EACxC,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GAOhB,KACA;AACE,IAAA,GAAG,qCAAqC,CAAC;QACvC,gBAAgB;QAChB,eAAe;KAChB,CAAC;AACF,IAAA;AACE,QAAA,KAAK,EAAE,KAAK,IAAI,CAAC,uBAAuB,CAAC;QACzC,KAAK,EAAE,gBAAgB,CAAC;AACtB,YAAA,GAAG,oBAAoB;AACvB,YAAA,GAAG,8BAA8B;AACjC,YAAA,GAAG,qBAAqB;AACxB,YAAA,GAAG,yBAAyB;AAC5B,YAAA,GAAG,kBAAkB;AACrB,YAAA,GAAG,kBAAkB;AACrB,YAAA,GAAG,WAAW;AACd,YAAA,GAAG,mBAAmB;AACtB,YAAA,GAAG,kBAAkB;AACrB,YAAA,GAAG,qBAAqB;AACxB,YAAA,GAAG,uBAAuB;AAC1B,YAAA,GAAG,oCAAoC;AAEvC,YAAA,mCAAmC,EAAE;gBACnC,OAAO;AACP,gBAAA;AACE,oBAAA,UAAU,EAAE,WAAW;AACxB,iBAAA;AACF,aAAA;YACD,IAAI,gBAAgB,KAAK;AACvB,kBAAE;AACE,oBAAA,iDAAiD,EAAE,KAAK;AACxD,oBAAA,2DAA2D,EACzD,KAAK;AACR;kBACD,EAAE,CAAC;SACR,CAAC;AACH,KAAA;AACD,IAAA;QACE,KAAK,EAAE,CAAC,uBAAuB,CAAC;QAChC,KAAK,EAAE,gBAAgB,CAAC;AACtB,YAAA,kDAAkD,EAAE,KAAK;AACzD,YAAA,4BAA4B,EAAE,KAAK;SACpC,CAAC;AACH,KAAA;AACD,IAAA;QACE,KAAK,EAAE,CAAC,qBAAqB,CAAC;QAC9B,KAAK,EAAE,gBAAgB,CAAC;AACtB,YAAA,2CAA2C,EAAE,KAAK;AAClD,YAAA,oBAAoB,EAAE,KAAK;SAC5B,CAAC;AACH,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE;;;;;;;;YASL,qCAAqC;YAErC,uCAAuC;YAEvC,4CAA4C;YAC5C,gDAAgD;AACjD,SAAA;QACD,KAAK,EAAE,gBAAgB,CAAC;AACtB,YAAA,0CAA0C,EAAE,KAAK;AACjD,YAAA,0BAA0B,EAAE,KAAK;AACjC,YAAA,oCAAoC,EAAE,KAAK;AAC3C,YAAA,4BAA4B,EAAE,KAAK;AACnC,YAAA,4BAA4B,EAAE,KAAK;AACnC,YAAA,kBAAkB,EAAE,KAAK;SAC1B,CAAC;AACH,KAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.d.mts","sourceRoot":"","sources":["../../src/configs/vitest.mts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvE,eAAO,MAAM,qBAAqB,GAAI,QAAQ,SAAS,MAAM,EAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"vitest.d.mts","sourceRoot":"","sources":["../../src/configs/vitest.mts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvE,eAAO,MAAM,qBAAqB,GAAI,QAAQ,SAAS,MAAM,EAAE,KAAG,UAYrD,CAAC"}
|
package/dist/entry-point.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { eslintConfigForTypeScriptWithoutRules, eslintConfigForTypeScript, eslintConfigForBrowser, eslintConfigForNodeJs, eslintConfigForReact, eslintConfigForPreact, eslintConfigForVitest, eslintConfigForJest, eslintConfigForPlaywright, eslintConfigForCypress, eslintConfigForTestingLibrary, eslintRules, typescriptEslintRules, eslintFunctionalRules, eslintTotalFunctionsRules, eslintUnicornRules, eslintArrayFuncRules, eslintPreferArrowFunctionRules, eslintPluginSortDestructureKeysRules, eslintImportsRules, eslintPromiseRules, eslintSecurityRules, eslintTreeShakableRules, eslintReactRules, eslintReactHooksRules, eslintReactPerfRules, eslintReactRefreshRules, eslintVitestRules, eslintJestRules, eslintJsxA11yRules, eslintTestingLibraryRules, eslintCypressRules, eslintPlaywrightRules, eslintPluginRules, restrictedGlobals, restrictedGlobalsForBrowser, eslintPluginCustom, eslintPluginTotalFunctions, eslintPluginTreeShakable, defineConfig, defineKnownRules, withDefaultOption, plugins, type EslintRules, type EslintRulesOption, type TypeScriptEslintRules, type TypeScriptEslintRulesOption, type EslintFunctionalRules, type EslintFunctionalRulesOption, type EslintTotalFunctionsRules, type EslintUnicornRules, type EslintUnicornRulesOption, type EslintArrayFuncRules, type EslintPreferArrowFunctionRules, type EslintPreferArrowFunctionRulesOption, type EslintPluginSortDestructureKeysRules, type EslintPluginSortDestructureKeysRulesOption, type EslintPromiseRules, type EslintPromiseRulesOption, type EslintImportsRules, type EslintImportsRulesOption, type EslintStrictDependenciesRules, type EslintStrictDependenciesRulesOption, type EslintSecurityRules, type EslintTreeShakableRules, type EslintReactRules, type EslintReactRulesOption, type EslintReactHooksRules, type EslintReactHooksRulesOption, type EslintReactPerfRules, type EslintReactPerfRulesOption, type EslintReactRefreshRules, type EslintReactRefreshRulesOption, type EslintJsxA11yRules, type EslintJsxA11yRulesOption, type EslintVitestRules, type EslintVitestRulesOption, type EslintJestRules, type EslintJestRulesOption, type EslintPlaywrightRules, type EslintPlaywrightRulesOption, type EslintCypressRules, type EslintCypressRulesOption, type EslintTestingLibraryRules, type EslintTestingLibraryRulesOption, type EslintPluginRules, type EslintPluginRulesOption, type FlatConfig, type ESLintPlugin, type Rule, type Rules, } from './index.mjs';
|
|
1
|
+
export { eslintConfigForTypeScriptWithoutRules, eslintConfigForTypeScript, eslintConfigForBrowser, eslintConfigForNodeJs, eslintConfigForReact, eslintConfigForPreact, eslintConfigForVitest, eslintConfigForJest, eslintConfigForPlaywright, eslintConfigForCypress, eslintConfigForTestingLibrary, eslintRules, typescriptEslintRules, eslintFunctionalRules, eslintTotalFunctionsRules, eslintUnicornRules, eslintArrayFuncRules, eslintPreferArrowFunctionRules, eslintPluginSortDestructureKeysRules, eslintImportsRules, eslintPromiseRules, eslintSecurityRules, eslintTreeShakableRules, eslintReactRules, eslintReactHooksRules, eslintReactPerfRules, eslintReactRefreshRules, eslintVitestRules, eslintJestRules, eslintJsxA11yRules, eslintTestingLibraryRules, eslintCypressRules, eslintPlaywrightRules, eslintPluginRules, restrictedGlobals, restrictedGlobalsForBrowser, restrictedSyntax, restrictedSyntaxForReact, eslintPluginCustom, eslintPluginTotalFunctions, eslintPluginTreeShakable, defineConfig, defineKnownRules, withDefaultOption, plugins, type EslintRules, type EslintRulesOption, type TypeScriptEslintRules, type TypeScriptEslintRulesOption, type EslintFunctionalRules, type EslintFunctionalRulesOption, type EslintTotalFunctionsRules, type EslintUnicornRules, type EslintUnicornRulesOption, type EslintArrayFuncRules, type EslintPreferArrowFunctionRules, type EslintPreferArrowFunctionRulesOption, type EslintPluginSortDestructureKeysRules, type EslintPluginSortDestructureKeysRulesOption, type EslintPromiseRules, type EslintPromiseRulesOption, type EslintImportsRules, type EslintImportsRulesOption, type EslintStrictDependenciesRules, type EslintStrictDependenciesRulesOption, type EslintSecurityRules, type EslintTreeShakableRules, type EslintReactRules, type EslintReactRulesOption, type EslintReactHooksRules, type EslintReactHooksRulesOption, type EslintReactPerfRules, type EslintReactPerfRulesOption, type EslintReactRefreshRules, type EslintReactRefreshRulesOption, type EslintJsxA11yRules, type EslintJsxA11yRulesOption, type EslintVitestRules, type EslintVitestRulesOption, type EslintJestRules, type EslintJestRulesOption, type EslintPlaywrightRules, type EslintPlaywrightRulesOption, type EslintCypressRules, type EslintCypressRulesOption, type EslintTestingLibraryRules, type EslintTestingLibraryRulesOption, type EslintPluginRules, type EslintPluginRulesOption, type FlatConfig, type ESLintPlugin, type Rule, type Rules, } from './index.mjs';
|
|
2
2
|
//# sourceMappingURL=entry-point.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-point.d.mts","sourceRoot":"","sources":["../src/entry-point.mts"],"names":[],"mappings":"AACA,OAAO,EAEL,qCAAqC,EACrC,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAG7B,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,kBAAkB,EAClB,oBAAoB,EACpB,8BAA8B,EAC9B,oCAAoC,EACpC,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EAGjB,iBAAiB,EACjB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"entry-point.d.mts","sourceRoot":"","sources":["../src/entry-point.mts"],"names":[],"mappings":"AACA,OAAO,EAEL,qCAAqC,EACrC,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AC5B,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAG5B,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,IAAI,EACT,KAAK,KAAK,GACX,MAAM,aAAa,CAAC"}
|
package/dist/entry-point.mjs
CHANGED
|
@@ -20,7 +20,7 @@ export { eslintReactHooksRules } from './rules/eslint-react-hooks-rules.mjs';
|
|
|
20
20
|
export { eslintReactPerfRules } from './rules/eslint-react-perf-rules.mjs';
|
|
21
21
|
export { eslintReactRefreshRules } from './rules/eslint-react-refresh-rules.mjs';
|
|
22
22
|
export { eslintReactRules } from './rules/eslint-react-rules.mjs';
|
|
23
|
-
export { eslintRules, restrictedGlobals, restrictedGlobalsForBrowser } from './rules/eslint-rules.mjs';
|
|
23
|
+
export { eslintRules, restrictedGlobals, restrictedGlobalsForBrowser, restrictedSyntax, restrictedSyntaxForReact } from './rules/eslint-rules.mjs';
|
|
24
24
|
export { eslintSecurityRules } from './rules/eslint-security-rules.mjs';
|
|
25
25
|
export { eslintTestingLibraryRules } from './rules/eslint-testing-library-rules.mjs';
|
|
26
26
|
export { eslintTotalFunctionsRules } from './rules/eslint-total-functions-rules.mjs';
|
package/dist/index.mjs
CHANGED
|
@@ -29,7 +29,7 @@ export { eslintReactHooksRules } from './rules/eslint-react-hooks-rules.mjs';
|
|
|
29
29
|
export { eslintReactPerfRules } from './rules/eslint-react-perf-rules.mjs';
|
|
30
30
|
export { eslintReactRefreshRules } from './rules/eslint-react-refresh-rules.mjs';
|
|
31
31
|
export { eslintReactRules } from './rules/eslint-react-rules.mjs';
|
|
32
|
-
export { eslintRules, restrictedGlobals, restrictedGlobalsForBrowser } from './rules/eslint-rules.mjs';
|
|
32
|
+
export { eslintRules, restrictedGlobals, restrictedGlobalsForBrowser, restrictedSyntax, restrictedSyntaxForReact } from './rules/eslint-rules.mjs';
|
|
33
33
|
export { eslintSecurityRules } from './rules/eslint-security-rules.mjs';
|
|
34
34
|
export { eslintTestingLibraryRules } from './rules/eslint-testing-library-rules.mjs';
|
|
35
35
|
export { eslintTotalFunctionsRules } from './rules/eslint-total-functions-rules.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-import-rules.d.mts","sourceRoot":"","sources":["../../src/rules/eslint-import-rules.mts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"eslint-import-rules.d.mts","sourceRoot":"","sources":["../../src/rules/eslint-import-rules.mts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgH7B;;;OAGG;;;;;;;;;CAYkC,CAAC"}
|
|
@@ -50,6 +50,7 @@ const eslintImportsRules = {
|
|
|
50
50
|
'import/no-deprecated': 'off',
|
|
51
51
|
'import/no-extraneous-dependencies': 'off',
|
|
52
52
|
'import/no-mutable-exports': 'error',
|
|
53
|
+
// TODO: https://github.com/noshiro-pf/eslint-config-typed/issues/98
|
|
53
54
|
// 'import/no-unused-modules': ['error', { unusedExports: true }],
|
|
54
55
|
'import/no-unused-modules': 'off',
|
|
55
56
|
// moduleSystems
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-import-rules.mjs","sources":["../../src/rules/eslint-import-rules.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAEO,MAAM,kBAAkB,GAAG;;AAEhC,IAAA,sBAAsB,EAAE,KAAK;AAE7B,IAAA,cAAc,EAAE,KAAK;AACrB,IAAA,gBAAgB,EAAE,OAAO;AACzB,IAAA,kBAAkB,EAAE,iBAAiB,CAAC,OAAO,CAAC;IAC9C,4BAA4B,EAAE,KAAK;AACnC,IAAA,yBAAyB,EAAE,iBAAiB,CAAC,OAAO,CAAC;AACrD,IAAA,2BAA2B,EAAE,iBAAiB,CAAC,OAAO,CAAC;AACvD,IAAA,4BAA4B,EAAE;QAC5B,OAAO;AACP,QAAA;AACE,YAAA,KAAK,EAAE;gBACL,gBAAgB;gBAChB,cAAc;gBACd,8BAA8B;gBAC9B,kBAAkB;gBAClB,WAAW;gBACX,UAAU;gBACV,YAAY;gBACZ,uBAAuB;gBACvB,gBAAgB;gBAChB,iBAAiB;gBACjB,kBAAkB;gBAClB,gBAAgB;gBAChB,yCAAyC;gBACzC,eAAe;gBACf,aAAa;gBACb,YAAY;gBACZ,YAAY;AACb,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,iCAAiC,EAAE,OAAO;AAC1C,IAAA,uBAAuB,EAAE,OAAO;AAChC,IAAA,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,CAAC;AAC7C,IAAA,iCAAiC,EAAE,iBAAiB,CAAC,OAAO,CAAC;AAC7D,IAAA,mCAAmC,EAAE,KAAK;;AAG1C,IAAA,wCAAwC,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;AAEpE,IAAA,6BAA6B,EAAE,iBAAiB,CAAC,OAAO,CAAC;;AAGzD,IAAA,eAAe,EAAE,OAAO;AACxB,IAAA,4BAA4B,EAAE,OAAO;AACrC,IAAA,mCAAmC,EAAE,OAAO;;;AAI5C,IAAA,sBAAsB,EAAE,KAAK;AAE7B,IAAA,mCAAmC,EAAE,KAAK;AAC1C,IAAA,2BAA2B,EAAE,OAAO
|
|
1
|
+
{"version":3,"file":"eslint-import-rules.mjs","sources":["../../src/rules/eslint-import-rules.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAEO,MAAM,kBAA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E,CAAC;;;;;"}
|
|
@@ -32,5 +32,6 @@ export declare const eslintPluginRules: {
|
|
|
32
32
|
readonly 'eslint-plugin/require-meta-default-options': "error";
|
|
33
33
|
readonly 'eslint-plugin/no-meta-replaced-by': "error";
|
|
34
34
|
readonly 'eslint-plugin/require-test-case-name': 2 | 1;
|
|
35
|
+
readonly 'eslint-plugin/unique-test-case-names': "error";
|
|
35
36
|
};
|
|
36
37
|
//# sourceMappingURL=eslint-plugin-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-plugin-rules.d.mts","sourceRoot":"","sources":["../../src/rules/eslint-plugin-rules.mts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"eslint-plugin-rules.d.mts","sourceRoot":"","sources":["../../src/rules/eslint-plugin-rules.mts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCQ,CAAC"}
|
|
@@ -34,6 +34,7 @@ const eslintPluginRules = {
|
|
|
34
34
|
'eslint-plugin/require-meta-default-options': 'error',
|
|
35
35
|
'eslint-plugin/no-meta-replaced-by': 'error',
|
|
36
36
|
'eslint-plugin/require-test-case-name': withDefaultOption('error'),
|
|
37
|
+
'eslint-plugin/unique-test-case-names': 'error',
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
export { eslintPluginRules };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-plugin-rules.mjs","sources":["../../src/rules/eslint-plugin-rules.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAEO,MAAM,iBAAiB,GAAG;AAC/B,IAAA,iCAAiC,EAAE,iBAAiB,CAAC,OAAO,CAAC;AAC7D,IAAA,4BAA4B,EAAE,OAAO;AACrC,IAAA,sCAAsC,EAAE,iBAAiB,CAAC,OAAO,CAAC;AAClE,IAAA,6CAA6C,EAAE,OAAO;AACtD,IAAA,wCA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CAAC;AACvE,IAAA,sCAAsC,EAAE,OAAO;AAC/C,IAAA,4CAA4C,EAAE,OAAO;AACrD,IAAA,mCAAmC,EAAE,OAAO;AAC5C,IAAA,sCAAsC,EAAE,iBAAiB,CAAC,OAAO,CAAC;AAClE,IAAA,sCAAsC,EAAE,OAAO;;;;;"}
|
|
@@ -39,7 +39,7 @@ const eslintReactRules = {
|
|
|
39
39
|
'react/hook-use-state': 'off',
|
|
40
40
|
'react/iframe-missing-sandbox': 'error',
|
|
41
41
|
'react/jsx-boolean-value': ['error', 'never'],
|
|
42
|
-
//
|
|
42
|
+
// Even if props is a string, it is necessary because the display will change, such as whether "\n" will cause a line break.
|
|
43
43
|
'react/jsx-curly-brace-presence': ['error', 'always'],
|
|
44
44
|
/** Enforce consistent file naming */
|
|
45
45
|
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
|
|
@@ -69,6 +69,73 @@ export declare const restrictedGlobalsForBrowser: readonly [{
|
|
|
69
69
|
readonly name: "open";
|
|
70
70
|
readonly message: "Don't use confusing globals declared in lib.dom";
|
|
71
71
|
}];
|
|
72
|
+
export declare const restrictedSyntax: readonly [{
|
|
73
|
+
readonly selector: "BinaryExpression[operator='in']";
|
|
74
|
+
readonly message: "use \"Object.hasOwn\" instead.";
|
|
75
|
+
}, {
|
|
76
|
+
readonly selector: "MemberExpression[object.object.object.name='Object'][object.object.property.name='prototype'][object.property.name='hasOwnProperty'][property.name='call']";
|
|
77
|
+
readonly message: "use \"Object.hasOwn\" instead.";
|
|
78
|
+
}, {
|
|
79
|
+
readonly selector: "NewExpression[callee.name='Array']";
|
|
80
|
+
readonly message: "use Array.from instead.";
|
|
81
|
+
}];
|
|
82
|
+
export declare const restrictedSyntaxForReact: {
|
|
83
|
+
readonly importStyle: readonly [{
|
|
84
|
+
readonly selector: "ImportDeclaration[source.value='react'][specifiers.0.type!='ImportNamespaceSpecifier']";
|
|
85
|
+
readonly message: "React should be imported as `import * as React from 'react'`.";
|
|
86
|
+
}, {
|
|
87
|
+
readonly selector: "Identifier[name!='React'][parent.type='ImportNamespaceSpecifier'][parent.parent.type='ImportDeclaration'][parent.parent.source.value='react']";
|
|
88
|
+
readonly message: "The namespace name imported from 'react' must be 'React'.";
|
|
89
|
+
}];
|
|
90
|
+
readonly componentVarTypeAnnotation: readonly [{
|
|
91
|
+
readonly selector: "TSQualifiedName[left.name='React'][right.name='FC']";
|
|
92
|
+
readonly message: "Use React.memo<Props>((props) => { ... }) instead.";
|
|
93
|
+
}, {
|
|
94
|
+
readonly selector: "TSQualifiedName[left.name='React'][right.name='FunctionComponent']";
|
|
95
|
+
readonly message: "Use React.memo<Props>((props) => { ... }) instead.";
|
|
96
|
+
}];
|
|
97
|
+
readonly reactMemoTypeParam: readonly [{
|
|
98
|
+
readonly selector: "MemberExpression[object.name='React'][property.name='memo'][parent.typeArguments=undefined]";
|
|
99
|
+
readonly message: "React.memo should have type parameter `'Props'`.";
|
|
100
|
+
}, {
|
|
101
|
+
readonly selector: "MemberExpression[object.name='React'][property.name='memo'][parent.typeArguments!=undefined][parent.typeArguments.type!='TSTypeParameterInstantiation']";
|
|
102
|
+
readonly message: "React.memo should have type parameter `'Props'`.";
|
|
103
|
+
}, {
|
|
104
|
+
readonly selector: "MemberExpression[object.name='React'][property.name='memo'][parent.typeArguments!=undefined][parent.typeArguments.type='TSTypeParameterInstantiation'][parent.typeArguments.params.0.type!='TSTypeReference']";
|
|
105
|
+
readonly message: "React.memo should have type parameter `'Props'`.";
|
|
106
|
+
}, {
|
|
107
|
+
readonly selector: "MemberExpression[object.name='React'][property.name='memo'][parent.typeArguments!=undefined][parent.typeArguments.type='TSTypeParameterInstantiation'][parent.typeArguments.params.0.type='TSTypeReference'][parent.typeArguments.params.0.typeName.name!='Props']";
|
|
108
|
+
readonly message: "React.memo should have type parameter `'Props'`.";
|
|
109
|
+
}];
|
|
110
|
+
readonly propsTypeAnnotationStyle: readonly [{
|
|
111
|
+
readonly selector: "TSTypeAnnotation[parent.type='Identifier'][parent.parent.type='ArrowFunctionExpression'][parent.parent.parent.type='CallExpression'][parent.parent.parent.callee.object.name='React'][parent.parent.parent.callee.property.name='memo']";
|
|
112
|
+
readonly message: "Replace `React.memo((props: Props) => { ... })` with `React.memo<Props>((props) => { ... })`.";
|
|
113
|
+
}];
|
|
114
|
+
readonly reactMemoPropsArgumentName: readonly [{
|
|
115
|
+
readonly selector: "Identifier[name!='props'][parent.type='ArrowFunctionExpression'][parent.expression!=true][parent.parent.callee.object.name='React'][parent.parent.callee.property.name='memo']";
|
|
116
|
+
readonly message: "The argument name of arrow function passed to React.memo should be 'props'.";
|
|
117
|
+
}, {
|
|
118
|
+
readonly selector: "ObjectPattern[parent.type='ArrowFunctionExpression'][parent.expression!=true][parent.parent.callee.object.name='React'][parent.parent.callee.property.name='memo']";
|
|
119
|
+
readonly message: "The props of a component containing a return statement are limited to a variable named `'props'`.";
|
|
120
|
+
}];
|
|
121
|
+
readonly componentName: {
|
|
122
|
+
readonly maxLength: (maxLength?: number) => {
|
|
123
|
+
selector: string;
|
|
124
|
+
message: string;
|
|
125
|
+
}[];
|
|
126
|
+
readonly regexp: (pattern: string) => {
|
|
127
|
+
selector: string;
|
|
128
|
+
message: string;
|
|
129
|
+
}[];
|
|
130
|
+
};
|
|
131
|
+
readonly reactHooksDefinitionStyle: readonly [{
|
|
132
|
+
readonly selector: "MemberExpression[object.name='React'][property.name='useImperativeHandle']";
|
|
133
|
+
readonly message: "Move logic to parent component instead of using React.useImperativeHandle.";
|
|
134
|
+
}, {
|
|
135
|
+
readonly selector: "TSTypeAnnotation[parent.parent.type='CallExpression'][parent.parent.callee.object.name='React'][parent.parent.callee.property.name='useMemo']";
|
|
136
|
+
readonly message: "The variable type T should be annotated as `React.useMemo<T>` or `const v: T = React.useMemo(...)`.";
|
|
137
|
+
}];
|
|
138
|
+
};
|
|
72
139
|
/** @link https://github.com/eslint/eslint/blob/main/conf/eslint-all.js */
|
|
73
140
|
export declare const eslintRules: {
|
|
74
141
|
/**
|
|
@@ -276,9 +343,6 @@ export declare const eslintRules: {
|
|
|
276
343
|
}, {
|
|
277
344
|
readonly selector: "NewExpression[callee.name='Array']";
|
|
278
345
|
readonly message: "use Array.from instead.";
|
|
279
|
-
}, {
|
|
280
|
-
readonly selector: "MemberExpression[object.name='React'][property.name='useImperativeHandle']";
|
|
281
|
-
readonly message: "pass Observable via props instead.";
|
|
282
346
|
}];
|
|
283
347
|
readonly 'no-return-assign': 2 | 1;
|
|
284
348
|
readonly 'no-self-assign': 2 | 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-rules.d.mts","sourceRoot":"","sources":["../../src/rules/eslint-rules.mts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EA2BiC,CAAC;AAEhE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDuB,CAAC;AAEhE,0EAA0E;AAC1E,eAAO,MAAM,WAAW;IACtB;;;;;OAKG;;;;IAYH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmKH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBH;;;;;OAKG
|
|
1
|
+
{"version":3,"file":"eslint-rules.d.mts","sourceRoot":"","sources":["../../src/rules/eslint-rules.mts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EA2BiC,CAAC;AAEhE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDuB,CAAC;AAEhE,eAAO,MAAM,gBAAgB;;;;;;;;;EAgCiC,CAAC;AAE/D,eAAO,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