@boehringer-ingelheim/eslint-config 7.0.0-next.1 → 7.0.0-next.3
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 +8 -9
- package/configs/base.js +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,21 +85,20 @@ The following plugins are used in this configuration:
|
|
|
85
85
|
|
|
86
86
|
Additionally, the [`eslint-plugin-perfectionist`](https://github.com/azat-io/eslint-plugin-perfectionist) is used to automatically fix sorting issues.
|
|
87
87
|
|
|
88
|
-
This configuration also sets up the TypeScript parser [`@typescript-eslint/parser`](https://typescript-eslint.io/
|
|
88
|
+
This configuration also sets up the TypeScript parser [`@typescript-eslint/parser`](https://typescript-eslint.io/packages/parser/) and [`eslint-import-resolver-typescript`](https://github.com/import-js/eslint-import-resolver-typescript). The TypeScript project configuration file `./tsconfig.json` is set as default value in the parser configuration. If this is not the case, this must be changed accordingly:
|
|
89
89
|
|
|
90
90
|
```js
|
|
91
91
|
import boehringer from '@boehringer-ingelheim/eslint-config';
|
|
92
92
|
|
|
93
|
-
export default boehringer.config(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
project: ['./tsconfig.dev.json'],
|
|
93
|
+
export default boehringer.config(boehringer.configs.base, {
|
|
94
|
+
languageOptions: {
|
|
95
|
+
parserOptions: {
|
|
96
|
+
projectService: {
|
|
97
|
+
defaultProject: ['./tsconfig.dev.json'],
|
|
99
98
|
},
|
|
100
99
|
},
|
|
101
|
-
}
|
|
102
|
-
);
|
|
100
|
+
},
|
|
101
|
+
});
|
|
103
102
|
```
|
|
104
103
|
|
|
105
104
|
### Local
|
package/configs/base.js
CHANGED
|
@@ -22,7 +22,7 @@ module.exports = tseslint.config(
|
|
|
22
22
|
languageOptions: {
|
|
23
23
|
parserOptions: {
|
|
24
24
|
// find the tsconfig.json nearest each source file
|
|
25
|
-
|
|
25
|
+
projectService: true,
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
linterOptions: {
|
|
@@ -95,14 +95,14 @@ module.exports = tseslint.config(
|
|
|
95
95
|
'perfectionist/sort-classes': [
|
|
96
96
|
'error',
|
|
97
97
|
{
|
|
98
|
-
...perfectionist.configs['recommended-natural
|
|
98
|
+
...perfectionist.configs['recommended-natural'].rules['perfectionist/sort-classes'][1],
|
|
99
99
|
groups: SORT_CLASSES_GROUPS,
|
|
100
100
|
},
|
|
101
101
|
],
|
|
102
102
|
'perfectionist/sort-imports': [
|
|
103
103
|
'error',
|
|
104
104
|
{
|
|
105
|
-
...perfectionist.configs['recommended-natural
|
|
105
|
+
...perfectionist.configs['recommended-natural'].rules['perfectionist/sort-imports'][1],
|
|
106
106
|
groups: SORT_IMPORTS_GROUPS,
|
|
107
107
|
newlinesBetween: 'ignore',
|
|
108
108
|
},
|
|
@@ -110,21 +110,21 @@ module.exports = tseslint.config(
|
|
|
110
110
|
'perfectionist/sort-intersection-types': [
|
|
111
111
|
'error',
|
|
112
112
|
{
|
|
113
|
-
...perfectionist.configs['recommended-natural
|
|
113
|
+
...perfectionist.configs['recommended-natural'].rules['perfectionist/sort-intersection-types'][1],
|
|
114
114
|
groups: SORT_INTERSECTION_TYPES_GROUPS,
|
|
115
115
|
},
|
|
116
116
|
],
|
|
117
117
|
'perfectionist/sort-named-imports': [
|
|
118
118
|
'error',
|
|
119
119
|
{
|
|
120
|
-
...perfectionist.configs['recommended-natural
|
|
120
|
+
...perfectionist.configs['recommended-natural'].rules['perfectionist/sort-named-imports'][1],
|
|
121
121
|
ignoreAlias: true,
|
|
122
122
|
},
|
|
123
123
|
],
|
|
124
124
|
'perfectionist/sort-objects': [
|
|
125
125
|
'error',
|
|
126
126
|
{
|
|
127
|
-
...perfectionist.configs['recommended-natural
|
|
127
|
+
...perfectionist.configs['recommended-natural'].rules['perfectionist/sort-objects'][1],
|
|
128
128
|
partitionByComment: true,
|
|
129
129
|
},
|
|
130
130
|
],
|