@boehringer-ingelheim/eslint-config 4.0.0 → 4.0.1
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/base/index.js +2 -2
- package/lib/eslint-plugin-perfectionist.js +22 -0
- package/package.json +1 -1
package/base/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { SORT_IMPORTS_GROUPS } = require("../lib/eslint-plugin-perfectionist");
|
|
1
|
+
const { SORT_CLASSES_GROUPS, SORT_IMPORTS_GROUPS } = require("../lib/eslint-plugin-perfectionist");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Workaround to allow ESLint to resolve plugins that were installed
|
|
@@ -104,7 +104,7 @@ module.exports = {
|
|
|
104
104
|
// eslint-plugin-perfectionist: https://github.com/azat-io/eslint-plugin-perfectionist
|
|
105
105
|
"perfectionist/sort-array-includes": ["error", { "ignore-case": true, type: "natural" }],
|
|
106
106
|
"perfectionist/sort-astro-attributes": ["error", { "ignore-case": true, type: "natural" }],
|
|
107
|
-
"perfectionist/sort-classes": ["error", { "ignore-case": true, type: "natural" }],
|
|
107
|
+
"perfectionist/sort-classes": ["error", { groups: SORT_CLASSES_GROUPS, "ignore-case": true, type: "natural" }],
|
|
108
108
|
"perfectionist/sort-enums": ["error", { "ignore-case": true, type: "natural" }],
|
|
109
109
|
"perfectionist/sort-exports": ["error", { "ignore-case": true, type: "natural" }],
|
|
110
110
|
"perfectionist/sort-imports": [
|
|
@@ -14,6 +14,28 @@ const SORT_IMPORTS_GROUPS = [
|
|
|
14
14
|
"unknown",
|
|
15
15
|
];
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* This is the the groups configuration of all the recommended configs by eslint-plugin-perfectionist.
|
|
19
|
+
* This array can be used to reconfigure some options of the perfectionist/sort-classes rule without
|
|
20
|
+
* overwriting the groups configuration of this rule.
|
|
21
|
+
* This config can be found here:
|
|
22
|
+
* - https://eslint-plugin-perfectionist.azat.io/rules/sort-classes#groups
|
|
23
|
+
* - https://github.com/azat-io/eslint-plugin-perfectionist/blob/main/index.ts#L61
|
|
24
|
+
*/
|
|
25
|
+
const SORT_CLASSES_GROUPS = [
|
|
26
|
+
"index-signature",
|
|
27
|
+
"static-property",
|
|
28
|
+
"private-property",
|
|
29
|
+
"property",
|
|
30
|
+
"constructor",
|
|
31
|
+
"static-method",
|
|
32
|
+
"private-method",
|
|
33
|
+
"method",
|
|
34
|
+
["get-method", "set-method"],
|
|
35
|
+
"unknown",
|
|
36
|
+
];
|
|
37
|
+
|
|
17
38
|
module.exports = {
|
|
39
|
+
SORT_CLASSES_GROUPS,
|
|
18
40
|
SORT_IMPORTS_GROUPS,
|
|
19
41
|
};
|