@boehringer-ingelheim/eslint-config 4.0.0 → 4.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/base/index.js +4 -2
- package/lib/eslint-plugin-perfectionist.js +22 -0
- package/package.json +11 -11
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
|
|
@@ -38,6 +38,8 @@ module.exports = {
|
|
|
38
38
|
project: true,
|
|
39
39
|
},
|
|
40
40
|
plugins: ["@typescript-eslint", "sonarjs"],
|
|
41
|
+
// Warn about unused eslint-disable directives
|
|
42
|
+
reportUnusedDisableDirectives: true,
|
|
41
43
|
rules: {
|
|
42
44
|
// @typescript-eslint: https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules
|
|
43
45
|
"@typescript-eslint/adjacent-overload-signatures": "off", // disabled due to conflict with eslint-plugin-perfectionist
|
|
@@ -104,7 +106,7 @@ module.exports = {
|
|
|
104
106
|
// eslint-plugin-perfectionist: https://github.com/azat-io/eslint-plugin-perfectionist
|
|
105
107
|
"perfectionist/sort-array-includes": ["error", { "ignore-case": true, type: "natural" }],
|
|
106
108
|
"perfectionist/sort-astro-attributes": ["error", { "ignore-case": true, type: "natural" }],
|
|
107
|
-
"perfectionist/sort-classes": ["error", { "ignore-case": true, type: "natural" }],
|
|
109
|
+
"perfectionist/sort-classes": ["error", { groups: SORT_CLASSES_GROUPS, "ignore-case": true, type: "natural" }],
|
|
108
110
|
"perfectionist/sort-enums": ["error", { "ignore-case": true, type: "natural" }],
|
|
109
111
|
"perfectionist/sort-exports": ["error", { "ignore-case": true, type: "natural" }],
|
|
110
112
|
"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
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boehringer-ingelheim/eslint-config",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Shared eslint configuration used at Boehringer Ingelheim for code styling",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"boehringer",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"repair": "npx --no rimraf .git/hooks node_modules package-lock.json && npm install"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"eslint": "^8.
|
|
30
|
+
"eslint": "^8.54.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@rushstack/eslint-patch": "^1.
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
35
|
-
"@typescript-eslint/parser": "^6.
|
|
33
|
+
"@rushstack/eslint-patch": "^1.6.0",
|
|
34
|
+
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
35
|
+
"@typescript-eslint/parser": "^6.12.0",
|
|
36
36
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
37
37
|
"eslint-plugin-import": "^2.29.0",
|
|
38
38
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
39
|
-
"eslint-plugin-perfectionist": "^2.
|
|
39
|
+
"eslint-plugin-perfectionist": "^2.4.0",
|
|
40
40
|
"eslint-plugin-playwright": "^0.18.0",
|
|
41
41
|
"eslint-plugin-react": "^7.33.2",
|
|
42
42
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@boehringer-ingelheim/prettier-config": "1.0.0",
|
|
49
|
-
"@commitlint/cli": "18.
|
|
50
|
-
"@commitlint/config-conventional": "18.
|
|
51
|
-
"@commitlint/types": "18.
|
|
49
|
+
"@commitlint/cli": "18.4.3",
|
|
50
|
+
"@commitlint/config-conventional": "18.4.3",
|
|
51
|
+
"@commitlint/types": "18.4.3",
|
|
52
52
|
"@semantic-release/changelog": "6.0.3",
|
|
53
53
|
"@semantic-release/git": "10.0.1",
|
|
54
54
|
"dotenv-cli": "7.3.0",
|
|
55
55
|
"husky": "8.0.3",
|
|
56
|
-
"prettier": "3.0
|
|
57
|
-
"semantic-release": "22.0.
|
|
56
|
+
"prettier": "3.1.0",
|
|
57
|
+
"semantic-release": "22.0.8"
|
|
58
58
|
}
|
|
59
59
|
}
|