@boehringer-ingelheim/eslint-config 9.3.0-perfectionist-v5.2 → 9.4.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 +5 -13
- package/configs/base.js +5 -6
- package/configs/react.js +5 -7
- package/lib/eslint-plugin-perfectionist.js +10 -0
- package/package.json +8 -9
package/README.md
CHANGED
|
@@ -326,19 +326,11 @@ npm run repair
|
|
|
326
326
|
|
|
327
327
|
### Release
|
|
328
328
|
|
|
329
|
-
|
|
329
|
+
> [!IMPORTANT]
|
|
330
|
+
> Manual releases are not supported to ensure consistency and security, see: <https://docs.npmjs.com/trusted-publishers>
|
|
330
331
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
Make sure that the secrets `GITHUB_TOKEN` and `NPM_TOKEN` are available in GitHub repository.
|
|
334
|
-
|
|
335
|
-
```sh
|
|
336
|
-
npm run release:ci
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
#### Manual Release
|
|
340
|
-
|
|
341
|
-
Make sure that the environment variables `GITHUB_TOKEN` and `NPM_TOKEN` are set or declared in `.env` and a productive build was previously created via `npm run build`.
|
|
332
|
+
Releases are automated through GitHub Actions using [semantic-release](https://github.com/semantic-release).
|
|
333
|
+
It bumps the version according to conventional commits, publishes the package to npm and release a new version to GitHub.
|
|
342
334
|
|
|
343
335
|
```sh
|
|
344
336
|
npm run release
|
|
@@ -357,7 +349,7 @@ Give a ⭐️ if this project helped you!
|
|
|
357
349
|
|
|
358
350
|
## License
|
|
359
351
|
|
|
360
|
-
Copyright ©
|
|
352
|
+
Copyright © 2026 [Boehringer Ingelheim](https://github.com/boehringer-ingelheim).
|
|
361
353
|
This project is [MIT](https://github.com/boehringer-ingelheim/eslint-config/blob/master/LICENSE) licensed.
|
|
362
354
|
|
|
363
355
|
## Resources
|
package/configs/base.js
CHANGED
|
@@ -6,6 +6,7 @@ const { defineConfig } = require('eslint/config');
|
|
|
6
6
|
const tseslint = require('typescript-eslint');
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
|
+
PERFECTIONIST_SETTINGS,
|
|
9
10
|
SORT_CLASSES_GROUPS,
|
|
10
11
|
SORT_IMPORTS_GROUPS,
|
|
11
12
|
SORT_INTERSECTION_TYPES_GROUPS,
|
|
@@ -93,36 +94,31 @@ module.exports = defineConfig(
|
|
|
93
94
|
'perfectionist/sort-classes': [
|
|
94
95
|
'error',
|
|
95
96
|
{
|
|
96
|
-
...perfectionist.configs['recommended-natural'].rules['perfectionist/sort-classes'][1],
|
|
97
97
|
groups: SORT_CLASSES_GROUPS,
|
|
98
98
|
},
|
|
99
99
|
],
|
|
100
100
|
'perfectionist/sort-imports': [
|
|
101
101
|
'error',
|
|
102
102
|
{
|
|
103
|
-
...perfectionist.configs['recommended-natural'].rules['perfectionist/sort-imports'][1],
|
|
104
103
|
groups: SORT_IMPORTS_GROUPS,
|
|
105
|
-
newlinesBetween: 0,
|
|
104
|
+
newlinesBetween: 0, // No newlines are allowed between groups
|
|
106
105
|
},
|
|
107
106
|
],
|
|
108
107
|
'perfectionist/sort-intersection-types': [
|
|
109
108
|
'error',
|
|
110
109
|
{
|
|
111
|
-
...perfectionist.configs['recommended-natural'].rules['perfectionist/sort-intersection-types'][1],
|
|
112
110
|
groups: SORT_INTERSECTION_TYPES_GROUPS,
|
|
113
111
|
},
|
|
114
112
|
],
|
|
115
113
|
'perfectionist/sort-named-imports': [
|
|
116
114
|
'error',
|
|
117
115
|
{
|
|
118
|
-
...perfectionist.configs['recommended-natural'].rules['perfectionist/sort-named-imports'][1],
|
|
119
116
|
ignoreAlias: true,
|
|
120
117
|
},
|
|
121
118
|
],
|
|
122
119
|
'perfectionist/sort-objects': [
|
|
123
120
|
'error',
|
|
124
121
|
{
|
|
125
|
-
...perfectionist.configs['recommended-natural'].rules['perfectionist/sort-objects'][1],
|
|
126
122
|
partitionByComment: true,
|
|
127
123
|
},
|
|
128
124
|
],
|
|
@@ -131,6 +127,9 @@ module.exports = defineConfig(
|
|
|
131
127
|
'import/resolver': {
|
|
132
128
|
typescript: true,
|
|
133
129
|
},
|
|
130
|
+
perfectionist: {
|
|
131
|
+
...PERFECTIONIST_SETTINGS,
|
|
132
|
+
},
|
|
134
133
|
},
|
|
135
134
|
},
|
|
136
135
|
{
|
package/configs/react.js
CHANGED
|
@@ -4,8 +4,7 @@ const reactHooks = require('eslint-plugin-react-hooks');
|
|
|
4
4
|
const reactRefresh = require('eslint-plugin-react-refresh');
|
|
5
5
|
const { defineConfig } = require('eslint/config');
|
|
6
6
|
const globals = require('globals');
|
|
7
|
-
|
|
8
|
-
const { SORT_IMPORTS_GROUPS } = require('../lib/eslint-plugin-perfectionist.js');
|
|
7
|
+
const { PERFECTIONIST_SETTINGS, SORT_IMPORTS_GROUPS } = require('../lib/eslint-plugin-perfectionist.js');
|
|
9
8
|
const base = require('./base.js');
|
|
10
9
|
|
|
11
10
|
module.exports = defineConfig(
|
|
@@ -67,9 +66,7 @@ module.exports = defineConfig(
|
|
|
67
66
|
},
|
|
68
67
|
],
|
|
69
68
|
groups: ['react', ...SORT_IMPORTS_GROUPS],
|
|
70
|
-
|
|
71
|
-
newlinesBetween: 0,
|
|
72
|
-
type: 'natural',
|
|
69
|
+
newlinesBetween: 0, // No newlines are allowed between groups
|
|
73
70
|
},
|
|
74
71
|
],
|
|
75
72
|
'perfectionist/sort-jsx-props': [
|
|
@@ -86,8 +83,6 @@ module.exports = defineConfig(
|
|
|
86
83
|
},
|
|
87
84
|
],
|
|
88
85
|
groups: ['reservedProps', 'unknown', 'callback'],
|
|
89
|
-
ignoreCase: true,
|
|
90
|
-
type: 'natural',
|
|
91
86
|
},
|
|
92
87
|
],
|
|
93
88
|
|
|
@@ -104,6 +99,9 @@ module.exports = defineConfig(
|
|
|
104
99
|
],
|
|
105
100
|
},
|
|
106
101
|
settings: {
|
|
102
|
+
perfectionist: {
|
|
103
|
+
...PERFECTIONIST_SETTINGS,
|
|
104
|
+
},
|
|
107
105
|
react: {
|
|
108
106
|
version: 'detect',
|
|
109
107
|
},
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opinionated 'default' settings for eslint-plugin-perfectionist.
|
|
3
|
+
* @see https://perfectionist.dev/guide/getting-started#settings
|
|
4
|
+
*/
|
|
5
|
+
const PERFECTIONIST_SETTINGS = {
|
|
6
|
+
ignoreCase: true, // Ignore case when sorting
|
|
7
|
+
type: 'natural',
|
|
8
|
+
};
|
|
9
|
+
|
|
1
10
|
/**
|
|
2
11
|
* While the sorting of imports is done by `eslint-plugin-perfectionist/sort-imports`,
|
|
3
12
|
* the order and grouping of imports is still taken from the previous configuration of `eslint-plugin-import/order`,
|
|
@@ -71,6 +80,7 @@ const SORT_INTERSECTION_TYPES_GROUPS = [
|
|
|
71
80
|
];
|
|
72
81
|
|
|
73
82
|
module.exports = {
|
|
83
|
+
PERFECTIONIST_SETTINGS,
|
|
74
84
|
SORT_CLASSES_GROUPS,
|
|
75
85
|
SORT_IMPORTS_GROUPS,
|
|
76
86
|
SORT_INTERSECTION_TYPES_GROUPS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boehringer-ingelheim/eslint-config",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"description": "Shared eslint configuration used at Boehringer Ingelheim for code styling",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"boehringer",
|
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
"types": "index.d.ts",
|
|
32
32
|
"scripts": {
|
|
33
33
|
"prepare": "husky",
|
|
34
|
-
"release": "
|
|
35
|
-
"release:ci": "semantic-release",
|
|
34
|
+
"release": "semantic-release",
|
|
36
35
|
"repair": "npx --yes rimraf@6 .git/hooks node_modules package-lock.json && npm install",
|
|
37
36
|
"lint": "eslint ."
|
|
38
37
|
},
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
"eslint": ">= 9.34.0"
|
|
41
40
|
},
|
|
42
41
|
"dependencies": {
|
|
43
|
-
"@eslint/compat": "^2.0.
|
|
42
|
+
"@eslint/compat": "^2.0.1",
|
|
44
43
|
"@eslint/js": "^9.39.2",
|
|
45
44
|
"@next/eslint-plugin-next": "^16.1.1",
|
|
46
45
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -48,20 +47,20 @@
|
|
|
48
47
|
"eslint-plugin-import": "^2.32.0",
|
|
49
48
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
50
49
|
"eslint-plugin-perfectionist": "^5.3.1",
|
|
51
|
-
"eslint-plugin-playwright": "^2.
|
|
50
|
+
"eslint-plugin-playwright": "^2.5.0",
|
|
52
51
|
"eslint-plugin-react": "^7.37.5",
|
|
53
52
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
54
53
|
"eslint-plugin-react-refresh": "^0.4.26",
|
|
55
54
|
"eslint-plugin-sonarjs": "^3.0.5",
|
|
56
55
|
"globals": "^17.0.0",
|
|
57
56
|
"is-ci": "^4.1.0",
|
|
58
|
-
"typescript-eslint": "^8.
|
|
57
|
+
"typescript-eslint": "^8.53.0"
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
60
|
"@boehringer-ingelheim/prettier-config": "2.0.0",
|
|
62
|
-
"@commitlint/cli": "20.3.
|
|
63
|
-
"@commitlint/config-conventional": "20.3.
|
|
64
|
-
"@commitlint/types": "20.
|
|
61
|
+
"@commitlint/cli": "20.3.1",
|
|
62
|
+
"@commitlint/config-conventional": "20.3.1",
|
|
63
|
+
"@commitlint/types": "20.3.1",
|
|
65
64
|
"dotenv-cli": "11.0.0",
|
|
66
65
|
"husky": "9.1.7",
|
|
67
66
|
"prettier": "3.7.4",
|