@boehringer-ingelheim/eslint-config 3.0.0 → 3.1.0-next.2

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 CHANGED
@@ -1,3 +1,5 @@
1
+ const { SORT_IMPORTS_GROUPS } = require("../lib/eslint-plugin-perfectionist");
2
+
1
3
  /**
2
4
  * Workaround to allow ESLint to resolve plugins that were installed
3
5
  * by an external config, see https://github.com/eslint/eslint/issues/3458.
@@ -94,18 +96,30 @@ module.exports = {
94
96
  "import/prefer-default-export": "off",
95
97
 
96
98
  // eslint-plugin-perfectionist: https://github.com/azat-io/eslint-plugin-perfectionist
99
+ "perfectionist/sort-array-includes": ["error", { "ignore-case": true, type: "natural" }],
100
+ "perfectionist/sort-astro-attributes": ["error", { "ignore-case": true, type: "natural" }],
101
+ "perfectionist/sort-classes": ["error", { "ignore-case": true, type: "natural" }],
102
+ "perfectionist/sort-enums": ["error", { "ignore-case": true, type: "natural" }],
103
+ "perfectionist/sort-exports": ["error", { "ignore-case": true, type: "natural" }],
97
104
  "perfectionist/sort-imports": [
98
105
  "error",
99
106
  {
107
+ groups: SORT_IMPORTS_GROUPS,
108
+ "ignore-case": true,
100
109
  "newlines-between": "ignore",
110
+ type: "natural",
101
111
  },
102
112
  ],
103
- "perfectionist/sort-objects": [
104
- "error",
105
- {
106
- "partition-by-comment": true,
107
- },
108
- ],
113
+ "perfectionist/sort-interfaces": ["error", { "ignore-case": true, type: "natural" }],
114
+ "perfectionist/sort-jsx-props": ["error", { "ignore-case": true, type: "natural" }],
115
+ "perfectionist/sort-maps": ["error", { "ignore-case": true, type: "natural" }],
116
+ "perfectionist/sort-named-exports": ["error", { "ignore-case": true, type: "natural" }],
117
+ "perfectionist/sort-named-imports": ["error", { "ignore-alias": true, "ignore-case": true, type: "natural" }],
118
+ "perfectionist/sort-object-types": ["error", { "ignore-case": true, type: "natural" }],
119
+ "perfectionist/sort-objects": ["error", { "ignore-case": true, "partition-by-comment": true, type: "natural" }],
120
+ "perfectionist/sort-svelte-attributes": ["error", { "ignore-case": true, type: "natural" }],
121
+ "perfectionist/sort-union-types": ["error", { "ignore-case": true, type: "natural" }],
122
+ "perfectionist/sort-vue-attributes": ["error", { "ignore-case": true, type: "natural" }],
109
123
  },
110
124
  settings: {
111
125
  "import/resolver": {
@@ -0,0 +1,19 @@
1
+ /**
2
+ * While the sorting of imports is done by `eslint-plugin-perfectionist/sort-imports`,
3
+ * the order and grouping of imports is still taken from the previous configuration of `eslint-plugin-import/order`,
4
+ * as it feels more natural.
5
+ * The following group names are available for configuration: https://eslint-plugin-perfectionist.azat.io/rules/sort-imports#groups
6
+ */
7
+ const SORT_IMPORTS_GROUPS = [
8
+ ["builtin", "builtin-type"],
9
+ ["external", "external-type"],
10
+ ["internal", "internal-type"],
11
+ ["parent", "parent-type", "sibling", "sibling-type", "index", "index-type"],
12
+ ["style", "side-effect"],
13
+ "object",
14
+ "unknown",
15
+ ];
16
+
17
+ module.exports = {
18
+ SORT_IMPORTS_GROUPS,
19
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boehringer-ingelheim/eslint-config",
3
- "version": "3.0.0",
3
+ "version": "3.1.0-next.2",
4
4
  "description": "Shared eslint configuration used at Boehringer Ingelheim for code styling",
5
5
  "keywords": [
6
6
  "boehringer",
@@ -15,6 +15,7 @@
15
15
  "license": "MIT",
16
16
  "files": [
17
17
  "base",
18
+ "lib",
18
19
  "react",
19
20
  "playwright"
20
21
  ],
@@ -29,29 +30,29 @@
29
30
  "eslint": "^8.34.0"
30
31
  },
31
32
  "dependencies": {
32
- "@rushstack/eslint-patch": "^1.3.3",
33
- "@typescript-eslint/eslint-plugin": "^6.3.0",
34
- "@typescript-eslint/parser": "^6.3.0",
35
- "eslint-import-resolver-typescript": "^3.6.0",
36
- "eslint-plugin-import": "^2.28.0",
33
+ "@rushstack/eslint-patch": "^1.5.1",
34
+ "@typescript-eslint/eslint-plugin": "^6.7.5",
35
+ "@typescript-eslint/parser": "^6.7.5",
36
+ "eslint-import-resolver-typescript": "^3.6.1",
37
+ "eslint-plugin-import": "^2.28.1",
37
38
  "eslint-plugin-jsx-a11y": "^6.7.1",
38
- "eslint-plugin-perfectionist": "^2.1.0",
39
- "eslint-plugin-playwright": "^0.15.3",
40
- "eslint-plugin-react": "^7.33.1",
39
+ "eslint-plugin-perfectionist": "^2.2.0",
40
+ "eslint-plugin-playwright": "^0.16.0",
41
+ "eslint-plugin-react": "^7.33.2",
41
42
  "eslint-plugin-react-hooks": "^4.6.0",
42
- "eslint-plugin-sonarjs": "^0.20.0",
43
+ "eslint-plugin-sonarjs": "^0.21.0",
43
44
  "eslint-plugin-typescript-enum": "^2.1.0"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@boehringer-ingelheim/prettier-config": "1.0.0",
47
- "@commitlint/cli": "17.7.1",
48
- "@commitlint/config-conventional": "17.7.0",
48
+ "@commitlint/cli": "17.8.0",
49
+ "@commitlint/config-conventional": "17.8.0",
49
50
  "@commitlint/types": "17.4.4",
50
51
  "@semantic-release/changelog": "6.0.3",
51
52
  "@semantic-release/git": "10.0.1",
52
- "dotenv-cli": "7.2.1",
53
+ "dotenv-cli": "7.3.0",
53
54
  "husky": "8.0.3",
54
- "prettier": "3.0.1",
55
- "semantic-release": "21.0.7"
55
+ "prettier": "3.0.3",
56
+ "semantic-release": "22.0.5"
56
57
  }
57
58
  }
package/react/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ const { SORT_IMPORTS_GROUPS } = require("../lib/eslint-plugin-perfectionist");
2
+
1
3
  /**
2
4
  * Workaround to allow ESLint to resolve plugins that were installed
3
5
  * by an external config, see https://github.com/eslint/eslint/issues/3458.
@@ -64,19 +66,10 @@ module.exports = {
64
66
  react: ["react"],
65
67
  },
66
68
  },
67
- groups: [
68
- "react",
69
- // Groups from shared config: https://eslint-plugin-perfectionist.azat.io/rules/sort-imports#groups
70
- "type",
71
- ["builtin", "external"],
72
- "internal-type",
73
- "internal",
74
- ["parent-type", "sibling-type", "index-type"],
75
- ["parent", "sibling", "index"],
76
- "object",
77
- "unknown",
78
- ],
69
+ groups: ["react", ...SORT_IMPORTS_GROUPS],
70
+ "ignore-case": true,
79
71
  "newlines-between": "ignore",
72
+ type: "natural",
80
73
  },
81
74
  ],
82
75
  "perfectionist/sort-jsx-props": [
@@ -87,6 +80,8 @@ module.exports = {
87
80
  reservedProps: ["children", "dangerouslySetInnerHTML", "key", "ref"], // Reserved props from: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/jsx-sort-props.js#L40C12-L40C12
88
81
  },
89
82
  groups: ["reservedProps", "unknown", "callback"],
83
+ "ignore-case": true,
84
+ type: "natural",
90
85
  },
91
86
  ],
92
87
  },