@component-hook/eslint-plugin 1.0.2 → 1.0.4
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/LICENSE +21 -21
- package/README.md +127 -127
- package/dist/index.js +2 -367
- package/package.json +3 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Tzuyi
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Tzuyi
|
|
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
CHANGED
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
# @component-hook/eslint-plugin
|
|
2
|
-
|
|
3
|
-
A opinionated ESLint config preset for `JavaScript`, `TypeScript`, `Vue3`, `React` and `Prettier`.
|
|
4
|
-
|
|
5
|
-
<p>
|
|
6
|
-
<a href="https://npm-stat.com/charts.html?package=@component-hook/eslint-plugin">
|
|
7
|
-
<img src="https://img.shields.io/npm/dm/@component-hook/eslint-plugin.svg" alt="npm"/>
|
|
8
|
-
</a>
|
|
9
|
-
<a href="https://www.npmjs.com/package/@component-hook/eslint-plugin">
|
|
10
|
-
<img src="https://img.shields.io/npm/v/@component-hook/eslint-plugin.svg" alt="npm"/>
|
|
11
|
-
</a>
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
## Features
|
|
15
|
-
|
|
16
|
-
- Support `TypeScript`, `Vue3` and `React` out-of-box.
|
|
17
|
-
- Format with `Prettier`.
|
|
18
|
-
- Ignores common files like `dist`, `node_modules`, `coverage`, and files in `.gitignore`.
|
|
19
|
-
- Various built-in configurations can be referenced according to respective needs.
|
|
20
|
-
- Reasonable defaults, best practices, and just a few lines of configuration.
|
|
21
|
-
|
|
22
|
-
## Documentation
|
|
23
|
-
|
|
24
|
-
For detailed documentation and usage examples, please visit: [Official Docs](https://tzuyi0817.github.io/component-hook/#/eslint/plugin).
|
|
25
|
-
|
|
26
|
-
## Installation
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
# Using npm
|
|
30
|
-
$ npm install @component-hook/eslint-plugin --save-dev
|
|
31
|
-
|
|
32
|
-
# Using yarn
|
|
33
|
-
$ yarn add @component-hook/eslint-plugin --dev
|
|
34
|
-
|
|
35
|
-
# Using pnpm
|
|
36
|
-
$ pnpm install @component-hook/eslint-plugin --save-dev
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Require ESLint >= 9.0.0
|
|
40
|
-
|
|
41
|
-
## Basic Usage
|
|
42
|
-
|
|
43
|
-
```js
|
|
44
|
-
import componentHookPlugin from '@component-hook/eslint-plugin';
|
|
45
|
-
|
|
46
|
-
export default [
|
|
47
|
-
...componentHookPlugin.configs.basic,
|
|
48
|
-
...componentHookPlugin.configs.vue,
|
|
49
|
-
componentHookPlugin.configs.prettier,
|
|
50
|
-
...componentHookPlugin.configs.sonarjs,
|
|
51
|
-
componentHookPlugin.configs.security,
|
|
52
|
-
...componentHookPlugin.configs.markdown,
|
|
53
|
-
{
|
|
54
|
-
files: ['**/__tests__/unit/**/*.test.[jt]s?(x)'],
|
|
55
|
-
...componentHookPlugin.configs['testing-library/vue'],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
files: ['**/__tests__/e2e/**/*.spec.[jt]s?(x)'],
|
|
59
|
-
...componentHookPlugin.configs.playwright,
|
|
60
|
-
},
|
|
61
|
-
// your custom config
|
|
62
|
-
];
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
See [basic](./index.ts) and [ignores](./configs/ignores.ts) for more details.
|
|
66
|
-
|
|
67
|
-
## React Presets Usage
|
|
68
|
-
|
|
69
|
-
Includes `basic`, `react`, `markdown`, `prettier`, `sonarjs`, `security` configs.
|
|
70
|
-
|
|
71
|
-
```js
|
|
72
|
-
import { reactPreset } from '@component-hook/eslint-plugin';
|
|
73
|
-
|
|
74
|
-
export default reactPreset;
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## Vue Presets Usage
|
|
78
|
-
|
|
79
|
-
Includes `basic`, `vue`, `markdown`, `prettier`, `sonarjs`, `security` configs.
|
|
80
|
-
|
|
81
|
-
```js
|
|
82
|
-
import { vuePreset } from '@component-hook/eslint-plugin';
|
|
83
|
-
|
|
84
|
-
export default vuePreset;
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Configs
|
|
88
|
-
|
|
89
|
-
| Name | Type | Reference |
|
|
90
|
-
| ----------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
91
|
-
| basic | `Linter.Config[]` | `eslint-recommended`, `typescript-eslint`, `eslint-plugin-eslint-comments`, `eslint-plugin-import`, `eslint-plugin-unicorn`, `eslint-plugin-regexp`, `eslint-plugin-de-morgan` |
|
|
92
|
-
| vue | `Linter.Config[]` | `eslint-plugin-vue`, `typescript-eslint` |
|
|
93
|
-
| react | `Linter.Config[]` | `eslint-plugin-react/recommended`, `eslint-plugin-react-hooks/recommended`, `eslint-plugin-jsx-a11y/recommended` |
|
|
94
|
-
| markdown | `Linter.Config[]` | `eslint-plugin-markdown/recommended` |
|
|
95
|
-
| prettier | `Linter.Config` | `eslint-plugin-prettier/recommended` |
|
|
96
|
-
| sonarjs | `Linter.Config[]` | `eslint-plugin-sonarjs/recommended` |
|
|
97
|
-
| security | `Linter.Config` | `eslint-plugin-security/recommended` |
|
|
98
|
-
| playwright | `Linter.Config` | `eslint-plugin-playwright/flat/recommended` |
|
|
99
|
-
| testing-library/dom | `Linter.Config` | `eslint-plugin-testing-library/dom` |
|
|
100
|
-
| testing-library/vue | `Linter.Config` | `eslint-plugin-testing-library/vue` |
|
|
101
|
-
| testing-library/react | `Linter.Config` | `eslint-plugin-testing-library/react` |
|
|
102
|
-
| testing-library/angular | `Linter.Config` | `eslint-plugin-testing-library/angular` |
|
|
103
|
-
| testing-library/marko | `Linter.Config` | `eslint-plugin-testing-library/marko` |
|
|
104
|
-
|
|
105
|
-
## Reference eslint plugin
|
|
106
|
-
|
|
107
|
-
- [eslint-recommended](https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js)
|
|
108
|
-
- [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint)
|
|
109
|
-
- [eslint-plugin-eslint-comments](https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/lib/configs/recommended.js)
|
|
110
|
-
- [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import)
|
|
111
|
-
- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
|
|
112
|
-
- [eslint-plugin-regexp/flat/recommended](https://github.com/ota-meshi/eslint-plugin-regexp/blob/master/lib/configs/flat/recommended.ts)
|
|
113
|
-
- [eslint-plugin-de-morgan](https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/index.ts)
|
|
114
|
-
- [eslint-plugin-prettier/recommended](https://github.com/prettier/eslint-plugin-prettier/blob/master/recommended.js)
|
|
115
|
-
- [eslint-plugin-react/recommended](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/configs/recommended.js)
|
|
116
|
-
- [eslint-plugin-react-hooks/recommended](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/src/index.js)
|
|
117
|
-
- [eslint-plugin-jsx-a11y/recommended](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/index.js)
|
|
118
|
-
- [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue)
|
|
119
|
-
- [eslint-plugin-markdown/recommended](https://github.com/eslint/markdown/blob/main/src/index.js)
|
|
120
|
-
- [eslint-plugin-sonarjs/recommended](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/src/index.ts)
|
|
121
|
-
- [eslint-plugin-security/recommended](https://github.com/eslint-community/eslint-plugin-security/blob/main/index.js)
|
|
122
|
-
- [eslint-plugin-testing-library/dom](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/dom.ts)
|
|
123
|
-
- [eslint-plugin-testing-library/vue](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/vue.ts)
|
|
124
|
-
- [eslint-plugin-testing-library/react](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/react.ts)
|
|
125
|
-
- [eslint-plugin-testing-library/angular](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/angular.ts)
|
|
126
|
-
- [eslint-plugin-testing-library/marko](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/marko.ts)
|
|
127
|
-
- [eslint-plugin-playwright/flat/recommended](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/src/index.ts)
|
|
1
|
+
# @component-hook/eslint-plugin
|
|
2
|
+
|
|
3
|
+
A opinionated ESLint config preset for `JavaScript`, `TypeScript`, `Vue3`, `React` and `Prettier`.
|
|
4
|
+
|
|
5
|
+
<p>
|
|
6
|
+
<a href="https://npm-stat.com/charts.html?package=@component-hook/eslint-plugin">
|
|
7
|
+
<img src="https://img.shields.io/npm/dm/@component-hook/eslint-plugin.svg" alt="npm"/>
|
|
8
|
+
</a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/@component-hook/eslint-plugin">
|
|
10
|
+
<img src="https://img.shields.io/npm/v/@component-hook/eslint-plugin.svg" alt="npm"/>
|
|
11
|
+
</a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- Support `TypeScript`, `Vue3` and `React` out-of-box.
|
|
17
|
+
- Format with `Prettier`.
|
|
18
|
+
- Ignores common files like `dist`, `node_modules`, `coverage`, and files in `.gitignore`.
|
|
19
|
+
- Various built-in configurations can be referenced according to respective needs.
|
|
20
|
+
- Reasonable defaults, best practices, and just a few lines of configuration.
|
|
21
|
+
|
|
22
|
+
## Documentation
|
|
23
|
+
|
|
24
|
+
For detailed documentation and usage examples, please visit: [Official Docs](https://tzuyi0817.github.io/component-hook/#/eslint/plugin).
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Using npm
|
|
30
|
+
$ npm install @component-hook/eslint-plugin --save-dev
|
|
31
|
+
|
|
32
|
+
# Using yarn
|
|
33
|
+
$ yarn add @component-hook/eslint-plugin --dev
|
|
34
|
+
|
|
35
|
+
# Using pnpm
|
|
36
|
+
$ pnpm install @component-hook/eslint-plugin --save-dev
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Require ESLint >= 9.0.0
|
|
40
|
+
|
|
41
|
+
## Basic Usage
|
|
42
|
+
|
|
43
|
+
```js
|
|
44
|
+
import componentHookPlugin from '@component-hook/eslint-plugin';
|
|
45
|
+
|
|
46
|
+
export default [
|
|
47
|
+
...componentHookPlugin.configs.basic,
|
|
48
|
+
...componentHookPlugin.configs.vue,
|
|
49
|
+
componentHookPlugin.configs.prettier,
|
|
50
|
+
...componentHookPlugin.configs.sonarjs,
|
|
51
|
+
componentHookPlugin.configs.security,
|
|
52
|
+
...componentHookPlugin.configs.markdown,
|
|
53
|
+
{
|
|
54
|
+
files: ['**/__tests__/unit/**/*.test.[jt]s?(x)'],
|
|
55
|
+
...componentHookPlugin.configs['testing-library/vue'],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
files: ['**/__tests__/e2e/**/*.spec.[jt]s?(x)'],
|
|
59
|
+
...componentHookPlugin.configs.playwright,
|
|
60
|
+
},
|
|
61
|
+
// your custom config
|
|
62
|
+
];
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
See [basic](./index.ts) and [ignores](./configs/ignores.ts) for more details.
|
|
66
|
+
|
|
67
|
+
## React Presets Usage
|
|
68
|
+
|
|
69
|
+
Includes `basic`, `react`, `markdown`, `prettier`, `sonarjs`, `security` configs.
|
|
70
|
+
|
|
71
|
+
```js
|
|
72
|
+
import { reactPreset } from '@component-hook/eslint-plugin';
|
|
73
|
+
|
|
74
|
+
export default reactPreset;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Vue Presets Usage
|
|
78
|
+
|
|
79
|
+
Includes `basic`, `vue`, `markdown`, `prettier`, `sonarjs`, `security` configs.
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
import { vuePreset } from '@component-hook/eslint-plugin';
|
|
83
|
+
|
|
84
|
+
export default vuePreset;
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Configs
|
|
88
|
+
|
|
89
|
+
| Name | Type | Reference |
|
|
90
|
+
| ----------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
91
|
+
| basic | `Linter.Config[]` | `eslint-recommended`, `typescript-eslint`, `eslint-plugin-eslint-comments`, `eslint-plugin-import`, `eslint-plugin-unicorn`, `eslint-plugin-regexp`, `eslint-plugin-de-morgan` |
|
|
92
|
+
| vue | `Linter.Config[]` | `eslint-plugin-vue`, `typescript-eslint` |
|
|
93
|
+
| react | `Linter.Config[]` | `eslint-plugin-react/recommended`, `eslint-plugin-react-hooks/recommended`, `eslint-plugin-jsx-a11y/recommended` |
|
|
94
|
+
| markdown | `Linter.Config[]` | `eslint-plugin-markdown/recommended` |
|
|
95
|
+
| prettier | `Linter.Config` | `eslint-plugin-prettier/recommended` |
|
|
96
|
+
| sonarjs | `Linter.Config[]` | `eslint-plugin-sonarjs/recommended` |
|
|
97
|
+
| security | `Linter.Config` | `eslint-plugin-security/recommended` |
|
|
98
|
+
| playwright | `Linter.Config` | `eslint-plugin-playwright/flat/recommended` |
|
|
99
|
+
| testing-library/dom | `Linter.Config` | `eslint-plugin-testing-library/dom` |
|
|
100
|
+
| testing-library/vue | `Linter.Config` | `eslint-plugin-testing-library/vue` |
|
|
101
|
+
| testing-library/react | `Linter.Config` | `eslint-plugin-testing-library/react` |
|
|
102
|
+
| testing-library/angular | `Linter.Config` | `eslint-plugin-testing-library/angular` |
|
|
103
|
+
| testing-library/marko | `Linter.Config` | `eslint-plugin-testing-library/marko` |
|
|
104
|
+
|
|
105
|
+
## Reference eslint plugin
|
|
106
|
+
|
|
107
|
+
- [eslint-recommended](https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js)
|
|
108
|
+
- [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint)
|
|
109
|
+
- [eslint-plugin-eslint-comments](https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/lib/configs/recommended.js)
|
|
110
|
+
- [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import)
|
|
111
|
+
- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
|
|
112
|
+
- [eslint-plugin-regexp/flat/recommended](https://github.com/ota-meshi/eslint-plugin-regexp/blob/master/lib/configs/flat/recommended.ts)
|
|
113
|
+
- [eslint-plugin-de-morgan](https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/index.ts)
|
|
114
|
+
- [eslint-plugin-prettier/recommended](https://github.com/prettier/eslint-plugin-prettier/blob/master/recommended.js)
|
|
115
|
+
- [eslint-plugin-react/recommended](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/configs/recommended.js)
|
|
116
|
+
- [eslint-plugin-react-hooks/recommended](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/src/index.js)
|
|
117
|
+
- [eslint-plugin-jsx-a11y/recommended](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/index.js)
|
|
118
|
+
- [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue)
|
|
119
|
+
- [eslint-plugin-markdown/recommended](https://github.com/eslint/markdown/blob/main/src/index.js)
|
|
120
|
+
- [eslint-plugin-sonarjs/recommended](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/src/index.ts)
|
|
121
|
+
- [eslint-plugin-security/recommended](https://github.com/eslint-community/eslint-plugin-security/blob/main/index.js)
|
|
122
|
+
- [eslint-plugin-testing-library/dom](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/dom.ts)
|
|
123
|
+
- [eslint-plugin-testing-library/vue](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/vue.ts)
|
|
124
|
+
- [eslint-plugin-testing-library/react](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/react.ts)
|
|
125
|
+
- [eslint-plugin-testing-library/angular](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/angular.ts)
|
|
126
|
+
- [eslint-plugin-testing-library/marko](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/marko.ts)
|
|
127
|
+
- [eslint-plugin-playwright/flat/recommended](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/src/index.ts)
|
package/dist/index.js
CHANGED
|
@@ -1,371 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
-
mod
|
|
25
|
-
));
|
|
26
|
-
|
|
27
|
-
// ../../node_modules/.pnpm/@eslint+js@9.21.0/node_modules/@eslint/js/package.json
|
|
28
|
-
var require_package = __commonJS({
|
|
29
|
-
"../../node_modules/.pnpm/@eslint+js@9.21.0/node_modules/@eslint/js/package.json"(exports, module) {
|
|
30
|
-
module.exports = {
|
|
31
|
-
name: "@eslint/js",
|
|
32
|
-
version: "9.21.0",
|
|
33
|
-
description: "ESLint JavaScript language implementation",
|
|
34
|
-
main: "./src/index.js",
|
|
35
|
-
types: "./types/index.d.ts",
|
|
36
|
-
scripts: {
|
|
37
|
-
"test:types": "tsc -p tests/types/tsconfig.json"
|
|
38
|
-
},
|
|
39
|
-
files: [
|
|
40
|
-
"LICENSE",
|
|
41
|
-
"README.md",
|
|
42
|
-
"src",
|
|
43
|
-
"types"
|
|
44
|
-
],
|
|
45
|
-
publishConfig: {
|
|
46
|
-
access: "public"
|
|
47
|
-
},
|
|
48
|
-
repository: {
|
|
49
|
-
type: "git",
|
|
50
|
-
url: "https://github.com/eslint/eslint.git",
|
|
51
|
-
directory: "packages/js"
|
|
52
|
-
},
|
|
53
|
-
homepage: "https://eslint.org",
|
|
54
|
-
bugs: "https://github.com/eslint/eslint/issues/",
|
|
55
|
-
keywords: [
|
|
56
|
-
"javascript",
|
|
57
|
-
"eslint-plugin",
|
|
58
|
-
"eslint"
|
|
59
|
-
],
|
|
60
|
-
license: "MIT",
|
|
61
|
-
engines: {
|
|
62
|
-
node: "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// ../../node_modules/.pnpm/@eslint+js@9.21.0/node_modules/@eslint/js/src/configs/eslint-all.js
|
|
69
|
-
var require_eslint_all = __commonJS({
|
|
70
|
-
"../../node_modules/.pnpm/@eslint+js@9.21.0/node_modules/@eslint/js/src/configs/eslint-all.js"(exports, module) {
|
|
71
|
-
"use strict";
|
|
72
|
-
module.exports = Object.freeze({
|
|
73
|
-
"rules": {
|
|
74
|
-
"accessor-pairs": "error",
|
|
75
|
-
"array-callback-return": "error",
|
|
76
|
-
"arrow-body-style": "error",
|
|
77
|
-
"block-scoped-var": "error",
|
|
78
|
-
"camelcase": "error",
|
|
79
|
-
"capitalized-comments": "error",
|
|
80
|
-
"class-methods-use-this": "error",
|
|
81
|
-
"complexity": "error",
|
|
82
|
-
"consistent-return": "error",
|
|
83
|
-
"consistent-this": "error",
|
|
84
|
-
"constructor-super": "error",
|
|
85
|
-
"curly": "error",
|
|
86
|
-
"default-case": "error",
|
|
87
|
-
"default-case-last": "error",
|
|
88
|
-
"default-param-last": "error",
|
|
89
|
-
"dot-notation": "error",
|
|
90
|
-
"eqeqeq": "error",
|
|
91
|
-
"for-direction": "error",
|
|
92
|
-
"func-name-matching": "error",
|
|
93
|
-
"func-names": "error",
|
|
94
|
-
"func-style": "error",
|
|
95
|
-
"getter-return": "error",
|
|
96
|
-
"grouped-accessor-pairs": "error",
|
|
97
|
-
"guard-for-in": "error",
|
|
98
|
-
"id-denylist": "error",
|
|
99
|
-
"id-length": "error",
|
|
100
|
-
"id-match": "error",
|
|
101
|
-
"init-declarations": "error",
|
|
102
|
-
"logical-assignment-operators": "error",
|
|
103
|
-
"max-classes-per-file": "error",
|
|
104
|
-
"max-depth": "error",
|
|
105
|
-
"max-lines": "error",
|
|
106
|
-
"max-lines-per-function": "error",
|
|
107
|
-
"max-nested-callbacks": "error",
|
|
108
|
-
"max-params": "error",
|
|
109
|
-
"max-statements": "error",
|
|
110
|
-
"new-cap": "error",
|
|
111
|
-
"no-alert": "error",
|
|
112
|
-
"no-array-constructor": "error",
|
|
113
|
-
"no-async-promise-executor": "error",
|
|
114
|
-
"no-await-in-loop": "error",
|
|
115
|
-
"no-bitwise": "error",
|
|
116
|
-
"no-caller": "error",
|
|
117
|
-
"no-case-declarations": "error",
|
|
118
|
-
"no-class-assign": "error",
|
|
119
|
-
"no-compare-neg-zero": "error",
|
|
120
|
-
"no-cond-assign": "error",
|
|
121
|
-
"no-console": "error",
|
|
122
|
-
"no-const-assign": "error",
|
|
123
|
-
"no-constant-binary-expression": "error",
|
|
124
|
-
"no-constant-condition": "error",
|
|
125
|
-
"no-constructor-return": "error",
|
|
126
|
-
"no-continue": "error",
|
|
127
|
-
"no-control-regex": "error",
|
|
128
|
-
"no-debugger": "error",
|
|
129
|
-
"no-delete-var": "error",
|
|
130
|
-
"no-div-regex": "error",
|
|
131
|
-
"no-dupe-args": "error",
|
|
132
|
-
"no-dupe-class-members": "error",
|
|
133
|
-
"no-dupe-else-if": "error",
|
|
134
|
-
"no-dupe-keys": "error",
|
|
135
|
-
"no-duplicate-case": "error",
|
|
136
|
-
"no-duplicate-imports": "error",
|
|
137
|
-
"no-else-return": "error",
|
|
138
|
-
"no-empty": "error",
|
|
139
|
-
"no-empty-character-class": "error",
|
|
140
|
-
"no-empty-function": "error",
|
|
141
|
-
"no-empty-pattern": "error",
|
|
142
|
-
"no-empty-static-block": "error",
|
|
143
|
-
"no-eq-null": "error",
|
|
144
|
-
"no-eval": "error",
|
|
145
|
-
"no-ex-assign": "error",
|
|
146
|
-
"no-extend-native": "error",
|
|
147
|
-
"no-extra-bind": "error",
|
|
148
|
-
"no-extra-boolean-cast": "error",
|
|
149
|
-
"no-extra-label": "error",
|
|
150
|
-
"no-fallthrough": "error",
|
|
151
|
-
"no-func-assign": "error",
|
|
152
|
-
"no-global-assign": "error",
|
|
153
|
-
"no-implicit-coercion": "error",
|
|
154
|
-
"no-implicit-globals": "error",
|
|
155
|
-
"no-implied-eval": "error",
|
|
156
|
-
"no-import-assign": "error",
|
|
157
|
-
"no-inline-comments": "error",
|
|
158
|
-
"no-inner-declarations": "error",
|
|
159
|
-
"no-invalid-regexp": "error",
|
|
160
|
-
"no-invalid-this": "error",
|
|
161
|
-
"no-irregular-whitespace": "error",
|
|
162
|
-
"no-iterator": "error",
|
|
163
|
-
"no-label-var": "error",
|
|
164
|
-
"no-labels": "error",
|
|
165
|
-
"no-lone-blocks": "error",
|
|
166
|
-
"no-lonely-if": "error",
|
|
167
|
-
"no-loop-func": "error",
|
|
168
|
-
"no-loss-of-precision": "error",
|
|
169
|
-
"no-magic-numbers": "error",
|
|
170
|
-
"no-misleading-character-class": "error",
|
|
171
|
-
"no-multi-assign": "error",
|
|
172
|
-
"no-multi-str": "error",
|
|
173
|
-
"no-negated-condition": "error",
|
|
174
|
-
"no-nested-ternary": "error",
|
|
175
|
-
"no-new": "error",
|
|
176
|
-
"no-new-func": "error",
|
|
177
|
-
"no-new-native-nonconstructor": "error",
|
|
178
|
-
"no-new-wrappers": "error",
|
|
179
|
-
"no-nonoctal-decimal-escape": "error",
|
|
180
|
-
"no-obj-calls": "error",
|
|
181
|
-
"no-object-constructor": "error",
|
|
182
|
-
"no-octal": "error",
|
|
183
|
-
"no-octal-escape": "error",
|
|
184
|
-
"no-param-reassign": "error",
|
|
185
|
-
"no-plusplus": "error",
|
|
186
|
-
"no-promise-executor-return": "error",
|
|
187
|
-
"no-proto": "error",
|
|
188
|
-
"no-prototype-builtins": "error",
|
|
189
|
-
"no-redeclare": "error",
|
|
190
|
-
"no-regex-spaces": "error",
|
|
191
|
-
"no-restricted-exports": "error",
|
|
192
|
-
"no-restricted-globals": "error",
|
|
193
|
-
"no-restricted-imports": "error",
|
|
194
|
-
"no-restricted-properties": "error",
|
|
195
|
-
"no-restricted-syntax": "error",
|
|
196
|
-
"no-return-assign": "error",
|
|
197
|
-
"no-script-url": "error",
|
|
198
|
-
"no-self-assign": "error",
|
|
199
|
-
"no-self-compare": "error",
|
|
200
|
-
"no-sequences": "error",
|
|
201
|
-
"no-setter-return": "error",
|
|
202
|
-
"no-shadow": "error",
|
|
203
|
-
"no-shadow-restricted-names": "error",
|
|
204
|
-
"no-sparse-arrays": "error",
|
|
205
|
-
"no-template-curly-in-string": "error",
|
|
206
|
-
"no-ternary": "error",
|
|
207
|
-
"no-this-before-super": "error",
|
|
208
|
-
"no-throw-literal": "error",
|
|
209
|
-
"no-undef": "error",
|
|
210
|
-
"no-undef-init": "error",
|
|
211
|
-
"no-undefined": "error",
|
|
212
|
-
"no-underscore-dangle": "error",
|
|
213
|
-
"no-unexpected-multiline": "error",
|
|
214
|
-
"no-unmodified-loop-condition": "error",
|
|
215
|
-
"no-unneeded-ternary": "error",
|
|
216
|
-
"no-unreachable": "error",
|
|
217
|
-
"no-unreachable-loop": "error",
|
|
218
|
-
"no-unsafe-finally": "error",
|
|
219
|
-
"no-unsafe-negation": "error",
|
|
220
|
-
"no-unsafe-optional-chaining": "error",
|
|
221
|
-
"no-unused-expressions": "error",
|
|
222
|
-
"no-unused-labels": "error",
|
|
223
|
-
"no-unused-private-class-members": "error",
|
|
224
|
-
"no-unused-vars": "error",
|
|
225
|
-
"no-use-before-define": "error",
|
|
226
|
-
"no-useless-assignment": "error",
|
|
227
|
-
"no-useless-backreference": "error",
|
|
228
|
-
"no-useless-call": "error",
|
|
229
|
-
"no-useless-catch": "error",
|
|
230
|
-
"no-useless-computed-key": "error",
|
|
231
|
-
"no-useless-concat": "error",
|
|
232
|
-
"no-useless-constructor": "error",
|
|
233
|
-
"no-useless-escape": "error",
|
|
234
|
-
"no-useless-rename": "error",
|
|
235
|
-
"no-useless-return": "error",
|
|
236
|
-
"no-var": "error",
|
|
237
|
-
"no-void": "error",
|
|
238
|
-
"no-warning-comments": "error",
|
|
239
|
-
"no-with": "error",
|
|
240
|
-
"object-shorthand": "error",
|
|
241
|
-
"one-var": "error",
|
|
242
|
-
"operator-assignment": "error",
|
|
243
|
-
"prefer-arrow-callback": "error",
|
|
244
|
-
"prefer-const": "error",
|
|
245
|
-
"prefer-destructuring": "error",
|
|
246
|
-
"prefer-exponentiation-operator": "error",
|
|
247
|
-
"prefer-named-capture-group": "error",
|
|
248
|
-
"prefer-numeric-literals": "error",
|
|
249
|
-
"prefer-object-has-own": "error",
|
|
250
|
-
"prefer-object-spread": "error",
|
|
251
|
-
"prefer-promise-reject-errors": "error",
|
|
252
|
-
"prefer-regex-literals": "error",
|
|
253
|
-
"prefer-rest-params": "error",
|
|
254
|
-
"prefer-spread": "error",
|
|
255
|
-
"prefer-template": "error",
|
|
256
|
-
"radix": "error",
|
|
257
|
-
"require-atomic-updates": "error",
|
|
258
|
-
"require-await": "error",
|
|
259
|
-
"require-unicode-regexp": "error",
|
|
260
|
-
"require-yield": "error",
|
|
261
|
-
"sort-imports": "error",
|
|
262
|
-
"sort-keys": "error",
|
|
263
|
-
"sort-vars": "error",
|
|
264
|
-
"strict": "error",
|
|
265
|
-
"symbol-description": "error",
|
|
266
|
-
"unicode-bom": "error",
|
|
267
|
-
"use-isnan": "error",
|
|
268
|
-
"valid-typeof": "error",
|
|
269
|
-
"vars-on-top": "error",
|
|
270
|
-
"yoda": "error"
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
// ../../node_modules/.pnpm/@eslint+js@9.21.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
|
|
277
|
-
var require_eslint_recommended = __commonJS({
|
|
278
|
-
"../../node_modules/.pnpm/@eslint+js@9.21.0/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports, module) {
|
|
279
|
-
"use strict";
|
|
280
|
-
module.exports = Object.freeze({
|
|
281
|
-
rules: Object.freeze({
|
|
282
|
-
"constructor-super": "error",
|
|
283
|
-
"for-direction": "error",
|
|
284
|
-
"getter-return": "error",
|
|
285
|
-
"no-async-promise-executor": "error",
|
|
286
|
-
"no-case-declarations": "error",
|
|
287
|
-
"no-class-assign": "error",
|
|
288
|
-
"no-compare-neg-zero": "error",
|
|
289
|
-
"no-cond-assign": "error",
|
|
290
|
-
"no-const-assign": "error",
|
|
291
|
-
"no-constant-binary-expression": "error",
|
|
292
|
-
"no-constant-condition": "error",
|
|
293
|
-
"no-control-regex": "error",
|
|
294
|
-
"no-debugger": "error",
|
|
295
|
-
"no-delete-var": "error",
|
|
296
|
-
"no-dupe-args": "error",
|
|
297
|
-
"no-dupe-class-members": "error",
|
|
298
|
-
"no-dupe-else-if": "error",
|
|
299
|
-
"no-dupe-keys": "error",
|
|
300
|
-
"no-duplicate-case": "error",
|
|
301
|
-
"no-empty": "error",
|
|
302
|
-
"no-empty-character-class": "error",
|
|
303
|
-
"no-empty-pattern": "error",
|
|
304
|
-
"no-empty-static-block": "error",
|
|
305
|
-
"no-ex-assign": "error",
|
|
306
|
-
"no-extra-boolean-cast": "error",
|
|
307
|
-
"no-fallthrough": "error",
|
|
308
|
-
"no-func-assign": "error",
|
|
309
|
-
"no-global-assign": "error",
|
|
310
|
-
"no-import-assign": "error",
|
|
311
|
-
"no-invalid-regexp": "error",
|
|
312
|
-
"no-irregular-whitespace": "error",
|
|
313
|
-
"no-loss-of-precision": "error",
|
|
314
|
-
"no-misleading-character-class": "error",
|
|
315
|
-
"no-new-native-nonconstructor": "error",
|
|
316
|
-
"no-nonoctal-decimal-escape": "error",
|
|
317
|
-
"no-obj-calls": "error",
|
|
318
|
-
"no-octal": "error",
|
|
319
|
-
"no-prototype-builtins": "error",
|
|
320
|
-
"no-redeclare": "error",
|
|
321
|
-
"no-regex-spaces": "error",
|
|
322
|
-
"no-self-assign": "error",
|
|
323
|
-
"no-setter-return": "error",
|
|
324
|
-
"no-shadow-restricted-names": "error",
|
|
325
|
-
"no-sparse-arrays": "error",
|
|
326
|
-
"no-this-before-super": "error",
|
|
327
|
-
"no-undef": "error",
|
|
328
|
-
"no-unexpected-multiline": "error",
|
|
329
|
-
"no-unreachable": "error",
|
|
330
|
-
"no-unsafe-finally": "error",
|
|
331
|
-
"no-unsafe-negation": "error",
|
|
332
|
-
"no-unsafe-optional-chaining": "error",
|
|
333
|
-
"no-unused-labels": "error",
|
|
334
|
-
"no-unused-private-class-members": "error",
|
|
335
|
-
"no-unused-vars": "error",
|
|
336
|
-
"no-useless-backreference": "error",
|
|
337
|
-
"no-useless-catch": "error",
|
|
338
|
-
"no-useless-escape": "error",
|
|
339
|
-
"no-with": "error",
|
|
340
|
-
"require-yield": "error",
|
|
341
|
-
"use-isnan": "error",
|
|
342
|
-
"valid-typeof": "error"
|
|
343
|
-
})
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
// ../../node_modules/.pnpm/@eslint+js@9.21.0/node_modules/@eslint/js/src/index.js
|
|
349
|
-
var require_src = __commonJS({
|
|
350
|
-
"../../node_modules/.pnpm/@eslint+js@9.21.0/node_modules/@eslint/js/src/index.js"(exports, module) {
|
|
351
|
-
"use strict";
|
|
352
|
-
var { name, version } = require_package();
|
|
353
|
-
module.exports = {
|
|
354
|
-
meta: {
|
|
355
|
-
name,
|
|
356
|
-
version
|
|
357
|
-
},
|
|
358
|
-
configs: {
|
|
359
|
-
all: require_eslint_all(),
|
|
360
|
-
recommended: require_eslint_recommended()
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
|
|
366
1
|
// plugins.ts
|
|
367
|
-
var import_js = __toESM(require_src(), 1);
|
|
368
2
|
import { default as default2 } from "globals";
|
|
3
|
+
import { default as default3 } from "@eslint/js";
|
|
369
4
|
import { fixupPluginRules } from "@eslint/compat";
|
|
370
5
|
import { default as default4 } from "typescript-eslint";
|
|
371
6
|
import { default as default5 } from "eslint-plugin-react";
|
|
@@ -405,7 +40,7 @@ var jsConfigs = [
|
|
|
405
40
|
{
|
|
406
41
|
name: "component-hook/javascript",
|
|
407
42
|
rules: {
|
|
408
|
-
...
|
|
43
|
+
...default3.configs.recommended.rules,
|
|
409
44
|
...rules
|
|
410
45
|
}
|
|
411
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@component-hook/eslint-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "ESLint config for component hook",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
37
37
|
"@eslint/compat": "^1.2.7",
|
|
38
|
+
"@eslint/js": "^9.23.0",
|
|
39
|
+
"eslint-config-prettier": "^10.1.1",
|
|
38
40
|
"eslint-plugin-de-morgan": "^1.2.1",
|
|
39
41
|
"eslint-plugin-import": "^2.31.0",
|
|
40
42
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|