@@ -25,24 +25,22 @@ Create or update the `eslint.config.mjs` (`eslint.config.cjs` is also possible i
2525
2626``` js
2727import boehringer from ' @boehringer-ingelheim/eslint-config' ;
28+ import { defineConfig } from ' eslint/config' ;
2829
29- export default boehringer . config (
30+ export default defineConfig (
3031 boehringer .configs .strict
3132)
3233```
3334
34- #### ` boehringer.config(...) `
35-
36- This function is a re-export for the config-helper of typescript eslint (See [ docs] ( https://github.com/typescript-eslint/typescript-eslint/blob/a383d5022b81eaf65ce7b0946491444c6eaa28e3/docs/packages/TypeScript_ESLint.mdx#config ) ).
37-
38- ##### Extend or Override configuration
35+ #### Extend or Override configuration
3936
4037This is not recommended as the goal is to have similar code stylings in all projects, but if for some reason you need to add or change the configuration, it is possible in the following way:
4138
4239``` js
4340import boehringer from ' @boehringer-ingelheim/eslint-config' ;
41+ import { defineConfig } from ' eslint/config' ;
4442
45- export default boehringer . config (
43+ export default defineConfig (
4644 boehringer .configs .strict ,
4745 {
4846 rules: {
@@ -60,8 +58,9 @@ It is recommended to use this function to ensure that your `.gitignore` file is
6058
6159``` js
6260import boehringer from ' @boehringer-ingelheim/eslint-config' ;
61+ import { defineConfig } from ' eslint/config' ;
6362
64- export default boehringer . config (
63+ export default defineConfig (
6564 boehringer .includeIgnoreFile (), // default value '.gitignore'
6665 boehringer .configs .strict ,
6766);
@@ -71,8 +70,9 @@ or in case you have a different paths to your `.gitignore` file(s):
7170
7271``` js
7372import boehringer from ' @boehringer-ingelheim/eslint-config' ;
73+ import { defineConfig } from ' eslint/config' ;
7474
75- export default boehringer . config (
75+ export default defineConfig (
7676 boehringer .includeIgnoreFile (' ./backend/.gitignore' ),
7777 boehringer .includeIgnoreFile (' ./frontend/.gitignore' ),
7878 boehringer .configs .strict ,
@@ -95,8 +95,9 @@ Opinionated Options that differ from the standard/recommended ESLint configurati
9595
9696``` js
9797import boehringer from ' @boehringer-ingelheim/eslint-config' ;
98+ import { defineConfig } from ' eslint/config' ;
9899
99- export default boehringer . config (
100+ export default defineConfig (
100101 boehringer .configs .base
101102)
102103```
@@ -117,8 +118,9 @@ This configuration also sets up the TypeScript parser [`@typescript-eslint/parse
117118
118119``` js
119120import boehringer from ' @boehringer-ingelheim/eslint-config' ;
121+ import { defineConfig } from ' eslint/config' ;
120122
121- export default boehringer . config (
123+ export default defineConfig (
122124 boehringer .configs .base ,
123125 boehringer .configs .local
124126);
@@ -130,8 +132,9 @@ This shared ESLint configuration configures or disables some rules for a better
130132
131133``` js
132134import boehringer from ' @boehringer-ingelheim/eslint-config' ;
135+ import { defineConfig } from ' eslint/config' ;
133136
134- export default boehringer . config (
137+ export default defineConfig (
135138 boehringer .configs .strict
136139);
137140```
@@ -142,8 +145,9 @@ This shared ESLint configuration extends the [base configuration](#base) and add
142145
143146``` js
144147import boehringer from ' @boehringer-ingelheim/eslint-config' ;
148+ import { defineConfig } from ' eslint/config' ;
145149
146- export default boehringer . config (
150+ export default defineConfig (
147151 boehringer .configs .strict ,
148152 boehringer .configs .react
149153);
@@ -163,8 +167,9 @@ Additionally in restricts the usage of enums using [`no-restricted-syntax`](http
163167
164168``` js
165169import boehringer from ' @boehringer-ingelheim/eslint-config' ;
170+ import { defineConfig } from ' eslint/config' ;
166171
167- export default boehringer . config (
172+ export default defineConfig (
168173 boehringer .configs .strict ,
169174 boehringer .configs .nextjs
170175);
@@ -176,8 +181,9 @@ This shared ESLint configuration is specifically tailored for [Next.js](https://
176181
177182``` js
178183import boehringer from ' @boehringer-ingelheim/eslint-config' ;
184+ import { defineConfig } from ' eslint/config' ;
179185
180- export default boehringer . config (
186+ export default defineConfig (
181187 boehringer .configs .strict ,
182188 boehringer .configs .playwright
183189);
@@ -187,12 +193,13 @@ or for specific files only:
187193
188194``` js
189195import boehringer from ' @boehringer-ingelheim/eslint-config' ;
196+ import { defineConfig } from ' eslint/config' ;
190197
191- export default boehringer . config (
198+ export default defineConfig (
192199 boehringer .configs .strict ,
193200 {
194201 files: [' src/**/*.test.{ts,tsx}' ],
195- ... ( await boehringer .configs .playwright ) [0 ],
202+ ... boehringer .configs .playwright [0 ],
196203 },
197204);
198205```
@@ -207,8 +214,9 @@ This shared ESLint configuration is designed to enforce best practices and recom
207214
208215``` js
209216import boehringer from ' @boehringer-ingelheim/eslint-config' ;
217+ import { defineConfig } from ' eslint/config' ;
210218
211- export default boehringer . config (
219+ export default defineConfig (
212220 boehringer .configs .strict ,
213221 // possibly other configs,
214222 boehringer .configs .experimentalNamingConvention
@@ -222,8 +230,9 @@ This shared ESLint configuration is designed to enforce some naming conventions.
222230``` js
223231import boehringer from ' @boehringer-ingelheim/eslint-config' ;
224232import prettier from ' eslint-plugin-prettier/recommended' ;
233+ import { defineConfig } from ' eslint/config' ;
225234
226- export default boehringer . config (
235+ export default defineConfig (
227236 boehringer .configs .strict ,
228237 // Following needs eslint-plugin-prettier to be installed as described by https://github.com/prettier/eslint-plugin-prettier
229238 // Should be second to last
@@ -272,8 +281,9 @@ You can use the new [`allowDefaultProject`](https://typescript-eslint.io/package
272281
273282``` js
274283import boehringer from ' @boehringer-ingelheim/eslint-config' ;
284+ import { defineConfig } from ' eslint/config' ;
275285
276- export default boehringer . config (
286+ export default defineConfig (
277287 // other configs,
278288 {
279289 languageOptions: {
@@ -347,7 +357,7 @@ Give a ⭐️ if this project helped you!
347357
348358## License
349359
350- Copyright © 2023 [ Boehringer Ingelheim] ( https://github.com/boehringer-ingelheim ) .
360+ Copyright © 2025 [ Boehringer Ingelheim] ( https://github.com/boehringer-ingelheim ) .
351361This project is [ MIT] ( https://github.com/boehringer-ingelheim/eslint-config/blob/master/LICENSE ) licensed.
352362
353363## Resources
0 commit comments