@boehringer-ingelheim/eslint-config 7.0.0-next.4 → 7.0.0-shared-configuration-nextjs.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/README.md +13 -0
- package/configs/nextjs.js +14 -0
- package/index.js +2 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -146,6 +146,19 @@ This shared ESLint configuration is specifically tailored for [React](https://re
|
|
|
146
146
|
The configuration sets several custom rules, including [`@typescript-eslint/no-restricted-types`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-restricted-types.mdx) and [`@typescript-eslint/consistent-type-definitions`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-definitions.mdx), as well as rules for organizing and formatting import statements.
|
|
147
147
|
Additionally in restricts the usage of enums using [`no-restricted-syntax`](https://github.com/eslint/eslint/blob/main/docs/src/rules/no-restricted-syntax.md).
|
|
148
148
|
|
|
149
|
+
### Next.js
|
|
150
|
+
|
|
151
|
+
```js
|
|
152
|
+
import boehringer from '@boehringer-ingelheim/eslint-config';
|
|
153
|
+
|
|
154
|
+
export default boehringer.config(
|
|
155
|
+
boehringer.configs.strict,
|
|
156
|
+
boehringer.configs.nextjs
|
|
157
|
+
);
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
This shared ESLint configuration is specifically tailored for [Next.js](https://nextjs.org/) projects. It extends the [react configuration](#react) and includes the [`@next/eslint-plugin-next`](https://nextjs.org/docs/app/api-reference/config/eslint) plugin with the recommended and [`core-web-vital`](https://nextjs.org/docs/app/api-reference/config/eslint#with-core-web-vitals) rule set.
|
|
161
|
+
|
|
149
162
|
### Playwright
|
|
150
163
|
|
|
151
164
|
```js
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const nextPlugin = require('@next/eslint-plugin-next');
|
|
2
|
+
const tseslint = require('typescript-eslint');
|
|
3
|
+
|
|
4
|
+
const react = require('./react.js');
|
|
5
|
+
|
|
6
|
+
module.exports = tseslint.config(...react, {
|
|
7
|
+
plugins: {
|
|
8
|
+
'@next/next': nextPlugin,
|
|
9
|
+
},
|
|
10
|
+
rules: {
|
|
11
|
+
...nextPlugin.configs.recommended.rules,
|
|
12
|
+
...nextPlugin.configs['core-web-vitals'].rules,
|
|
13
|
+
},
|
|
14
|
+
});
|
package/index.js
CHANGED
|
@@ -2,6 +2,7 @@ const tseslint = require('typescript-eslint');
|
|
|
2
2
|
|
|
3
3
|
const base = require('./configs/base.js');
|
|
4
4
|
const local = require('./configs/local.js');
|
|
5
|
+
const nextjs = require('./configs/nextjs.js');
|
|
5
6
|
const playwright = require('./configs/playwright.js');
|
|
6
7
|
const prettierDisable = require('./configs/prettier-disable.js');
|
|
7
8
|
const react = require('./configs/react.js');
|
|
@@ -12,6 +13,7 @@ module.exports = {
|
|
|
12
13
|
configs: {
|
|
13
14
|
base,
|
|
14
15
|
local,
|
|
16
|
+
nextjs,
|
|
15
17
|
playwright,
|
|
16
18
|
prettierDisable,
|
|
17
19
|
react,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boehringer-ingelheim/eslint-config",
|
|
3
|
-
"version": "7.0.0-
|
|
3
|
+
"version": "7.0.0-shared-configuration-nextjs.2",
|
|
4
4
|
"description": "Shared eslint configuration used at Boehringer Ingelheim for code styling",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"boehringer",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@eslint/js": "^9.17.0",
|
|
33
|
+
"@next/eslint-plugin-next": "^15.1.4",
|
|
33
34
|
"eslint-config-prettier": "^9.1.0",
|
|
34
35
|
"eslint-import-resolver-typescript": "^3.7.0",
|
|
35
36
|
"eslint-plugin-import": "^2.31.0",
|