@component-hook/eslint-plugin 1.0.3 → 1.1.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 +16 -15
- package/dist/index.js +37 -6
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -86,21 +86,21 @@ export default vuePreset;
|
|
|
86
86
|
|
|
87
87
|
## Configs
|
|
88
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`
|
|
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`, `eslint-plugin-perfectionist` |
|
|
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
104
|
|
|
105
105
|
## Reference eslint plugin
|
|
106
106
|
|
|
@@ -111,6 +111,7 @@ export default vuePreset;
|
|
|
111
111
|
- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
|
|
112
112
|
- [eslint-plugin-regexp/flat/recommended](https://github.com/ota-meshi/eslint-plugin-regexp/blob/master/lib/configs/flat/recommended.ts)
|
|
113
113
|
- [eslint-plugin-de-morgan](https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/index.ts)
|
|
114
|
+
- [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist)
|
|
114
115
|
- [eslint-plugin-prettier/recommended](https://github.com/prettier/eslint-plugin-prettier/blob/master/recommended.js)
|
|
115
116
|
- [eslint-plugin-react/recommended](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/configs/recommended.js)
|
|
116
117
|
- [eslint-plugin-react-hooks/recommended](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/src/index.js)
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import { default as default18 } from "eslint-plugin-markdown";
|
|
|
20
20
|
import { default as default19 } from "@eslint-community/eslint-plugin-eslint-comments/configs";
|
|
21
21
|
import { default as default20 } from "eslint-plugin-unicorn";
|
|
22
22
|
import { default as default21 } from "eslint-plugin-de-morgan";
|
|
23
|
+
import { default as default22 } from "eslint-plugin-perfectionist";
|
|
23
24
|
|
|
24
25
|
// configs/javascript.ts
|
|
25
26
|
var isProduction = process.env.NODE_ENV === "production";
|
|
@@ -88,12 +89,6 @@ var importConfigs = [
|
|
|
88
89
|
plugins,
|
|
89
90
|
languageOptions,
|
|
90
91
|
rules: {
|
|
91
|
-
"import/order": [
|
|
92
|
-
"error",
|
|
93
|
-
{
|
|
94
|
-
groups: ["builtin", "external", "internal", "parent", "sibling", "index"]
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
92
|
"import/first": "error",
|
|
98
93
|
"import/no-default-export": "error",
|
|
99
94
|
"import/no-duplicates": "error",
|
|
@@ -240,6 +235,41 @@ var deMorganConfig = {
|
|
|
240
235
|
name: "component-hook/de-morgan"
|
|
241
236
|
};
|
|
242
237
|
|
|
238
|
+
// configs/perfectionist.ts
|
|
239
|
+
var perfectionistConfig = {
|
|
240
|
+
name: "component-hook/perfectionist/import",
|
|
241
|
+
plugins: {
|
|
242
|
+
perfectionist: default22
|
|
243
|
+
},
|
|
244
|
+
rules: {
|
|
245
|
+
"perfectionist/sort-imports": [
|
|
246
|
+
"error",
|
|
247
|
+
{
|
|
248
|
+
groups: [
|
|
249
|
+
"builtin",
|
|
250
|
+
"external",
|
|
251
|
+
"internal",
|
|
252
|
+
"internal-type",
|
|
253
|
+
"parent",
|
|
254
|
+
"parent-type",
|
|
255
|
+
"sibling",
|
|
256
|
+
"sibling-type",
|
|
257
|
+
"index",
|
|
258
|
+
"index-type",
|
|
259
|
+
"object",
|
|
260
|
+
"type",
|
|
261
|
+
"side-effect",
|
|
262
|
+
"side-effect-style"
|
|
263
|
+
],
|
|
264
|
+
internalPattern: ["^[~@#]/.*"],
|
|
265
|
+
newlinesBetween: "ignore"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"perfectionist/sort-named-exports": ["warn", { groupKind: "values-first" }],
|
|
269
|
+
"perfectionist/sort-named-imports": ["warn", { groupKind: "values-first" }]
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
|
|
243
273
|
// configs/prettier.ts
|
|
244
274
|
var rules3 = { ...default11.rules };
|
|
245
275
|
delete rules3["vue/html-self-closing"];
|
|
@@ -526,6 +556,7 @@ var basicConfigs = [
|
|
|
526
556
|
unicornConfig,
|
|
527
557
|
regexpConfig,
|
|
528
558
|
deMorganConfig,
|
|
559
|
+
perfectionistConfig,
|
|
529
560
|
{
|
|
530
561
|
name: "component-hook/globals",
|
|
531
562
|
languageOptions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@component-hook/eslint-plugin",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "ESLint config for component hook",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"eslint-plugin-import": "^2.31.0",
|
|
42
42
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
43
43
|
"eslint-plugin-markdown": "^5.1.0",
|
|
44
|
+
"eslint-plugin-perfectionist": "^4.11.0",
|
|
44
45
|
"eslint-plugin-playwright": "^2.2.0",
|
|
45
46
|
"eslint-plugin-prettier": "^5.2.3",
|
|
46
47
|
"eslint-plugin-react": "^7.37.4",
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
"eslint-plugin-security": "^3.0.1",
|
|
50
51
|
"eslint-plugin-sonarjs": "^3.0.2",
|
|
51
52
|
"eslint-plugin-testing-library": "^7.1.1",
|
|
52
|
-
"eslint-plugin-unicorn": "^
|
|
53
|
+
"eslint-plugin-unicorn": "^58.0.0",
|
|
53
54
|
"eslint-plugin-vue": "^10.0.0",
|
|
54
55
|
"globals": "^16.0.0",
|
|
55
56
|
"typescript-eslint": "^8.26.1",
|