@boehringer-ingelheim/eslint-config 7.0.0-shared-configuration-nextjs.3 → 7.0.0-shared-configuration-nextjs.4

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.
Files changed (2) hide show
  1. package/configs/nextjs.js +39 -33
  2. package/package.json +1 -1
package/configs/nextjs.js CHANGED
@@ -3,38 +3,44 @@ const tseslint = require('typescript-eslint');
3
3
 
4
4
  const react = require('./react.js');
5
5
 
6
- module.exports = tseslint.config(...react, {
7
- plugins: {
8
- '@next/next': nextPlugin,
6
+ module.exports = tseslint.config(
7
+ ...react,
8
+ {
9
+ plugins: {
10
+ '@next/next': nextPlugin,
11
+ },
12
+ rules: {
13
+ // eslint-plugin-react-refresh: https://github.com/ArnaudBarre/eslint-plugin-react-refresh
14
+ 'react-refresh/only-export-components': [
15
+ 'warn',
16
+ {
17
+ /**
18
+ * Next.js allows exporting the following options in pages, layouts and route handlers
19
+ *
20
+ * @see https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config
21
+ */
22
+ allowExportNames: [
23
+ 'config',
24
+ 'dynamic',
25
+ 'dynamicParams',
26
+ 'fetchCache',
27
+ 'generateMetadata',
28
+ 'generateStaticParams',
29
+ 'generateViewport',
30
+ 'maxDuration',
31
+ 'metadata',
32
+ 'preferredRegion',
33
+ 'revalidate',
34
+ 'runtime',
35
+ 'viewport',
36
+ ],
37
+ },
38
+ ],
39
+ ...nextPlugin.configs.recommended.rules,
40
+ ...nextPlugin.configs['core-web-vitals'].rules,
41
+ },
9
42
  },
10
- rules: {
11
- // eslint-plugin-react-refresh: https://github.com/ArnaudBarre/eslint-plugin-react-refresh
12
- 'react-refresh/only-export-components': [
13
- 'warn',
14
- {
15
- /**
16
- * Next.js allows exporting the following options in pages, layouts and route handlers
17
- *
18
- * @see https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config
19
- */
20
- allowExportNames: [
21
- 'config',
22
- 'dynamic',
23
- 'dynamicParams',
24
- 'fetchCache',
25
- 'generateMetadata',
26
- 'generateStaticParams',
27
- 'generateViewport',
28
- 'maxDuration',
29
- 'metadata',
30
- 'preferredRegion',
31
- 'revalidate',
32
- 'runtime',
33
- 'viewport',
34
- ],
35
- },
36
- ],
37
- ...nextPlugin.configs.recommended.rules,
38
- ...nextPlugin.configs['core-web-vitals'].rules,
43
+ {
44
+ ignores: ['.next/*'],
39
45
  },
40
- });
46
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boehringer-ingelheim/eslint-config",
3
- "version": "7.0.0-shared-configuration-nextjs.3",
3
+ "version": "7.0.0-shared-configuration-nextjs.4",
4
4
  "description": "Shared eslint configuration used at Boehringer Ingelheim for code styling",
5
5
  "keywords": [
6
6
  "boehringer",