@newsteam/eslint-config 1.2.13 → 1.2.15

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 (40) hide show
  1. package/dist/index.d.ts +0 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +11 -24
  4. package/dist/plugins/array-function.js +5 -5
  5. package/dist/plugins/css-modules.js +2 -2
  6. package/dist/plugins/destructuring.js +2 -2
  7. package/dist/plugins/eslint-comments.js +19 -19
  8. package/dist/plugins/import-newlines.js +1 -1
  9. package/dist/plugins/import-x.js +19 -19
  10. package/dist/plugins/newline-destructuring.js +1 -1
  11. package/dist/plugins/next.js +21 -21
  12. package/dist/plugins/no-unsanitized.js +2 -2
  13. package/dist/plugins/no-useless-assign.js +1 -1
  14. package/dist/plugins/node.js +31 -31
  15. package/dist/plugins/perfectionist.d.ts.map +1 -1
  16. package/dist/plugins/perfectionist.js +21 -20
  17. package/dist/plugins/promise.js +13 -13
  18. package/dist/plugins/react-19-upgrade.js +7 -7
  19. package/dist/plugins/react-compiler.js +1 -1
  20. package/dist/plugins/react-hooks.js +22 -22
  21. package/dist/plugins/react-perf.js +1 -1
  22. package/dist/plugins/react-refresh.js +1 -1
  23. package/dist/plugins/react.js +69 -69
  24. package/dist/plugins/security.js +13 -13
  25. package/dist/plugins/sort-react-dependency-arrays.js +1 -1
  26. package/dist/plugins/stylistic.d.ts.map +1 -1
  27. package/dist/plugins/stylistic.js +102 -88
  28. package/dist/plugins/typescript.d.ts.map +1 -1
  29. package/dist/plugins/typescript.js +172 -126
  30. package/dist/plugins/unicorn.js +127 -127
  31. package/dist/rules.js +186 -186
  32. package/dist/settings.d.ts.map +1 -1
  33. package/dist/settings.js +0 -1
  34. package/package.json +38 -44
  35. package/dist/plugins/const-case.d.ts +0 -3
  36. package/dist/plugins/const-case.d.ts.map +0 -1
  37. package/dist/plugins/const-case.js +0 -16
  38. package/dist/plugins/more.d.ts +0 -3
  39. package/dist/plugins/more.d.ts.map +0 -1
  40. package/dist/plugins/more.js +0 -101
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { Linter } from "eslint";
2
- import "eslint-plugin-only-warn";
3
2
  declare const config: Linter.Config[];
4
3
  export default config;
5
4
  export { nextPlugin } from "./plugins/next.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGrC,OAAO,yBAAyB,CAAC;AAqDjC,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EA8H1B,CAAC;AAIF,eAAe,MAAM,CAAC;AAGtB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AA6CrC,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EA8HzB,CAAC;AAGH,eAAe,MAAM,CAAC;AAGtB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -10,19 +10,18 @@
10
10
  makes sense in this case
11
11
 
12
12
  */
13
- import babelParser from "@babel/eslint-parser";
14
- import eslintParser from "@typescript-eslint/parser";
13
+ import eslint from "@eslint/js";
15
14
  import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
16
15
  import { createNodeResolver } from "eslint-plugin-import-x";
16
+ import { defineConfig } from "eslint/config";
17
17
  import global from "globals";
18
+ import tseslint from "typescript-eslint";
18
19
  import { arrayFuncPlugin } from "./plugins/array-function.js";
19
- import { constCasePlugin } from "./plugins/const-case.js";
20
20
  import { cssModulesPlugin } from "./plugins/css-modules.js";
21
21
  import { destructuringPlugin } from "./plugins/destructuring.js";
22
22
  import { eslintCommentsPlugin } from "./plugins/eslint-comments.js";
23
23
  import { importNewlinesPlugin } from "./plugins/import-newlines.js";
24
24
  import { importXPlugin } from "./plugins/import-x.js";
25
- import { morePlugin } from "./plugins/more.js";
26
25
  import { newlineDestructuringPlugin } from "./plugins/newline-destructuring.js";
27
26
  import { noUnsanitizedPlugin } from "./plugins/no-unsanitized.js";
28
27
  import { noUselessAssignPlugin } from "./plugins/no-useless-assign.js";
@@ -42,8 +41,6 @@ import { typescriptPlugin } from "./plugins/typescript.js";
42
41
  import { unicornPlugin } from "./plugins/unicorn.js";
43
42
  import { rules } from "./rules.js";
44
43
  import { REACT_VERSION } from "./settings.js";
45
- // eslint-disable-next-line import-x/no-unassigned-import -- the docs say this is how the plugin is registered
46
- import "eslint-plugin-only-warn";
47
44
  const globals = {
48
45
  ...global.browser,
49
46
  ...global.node,
@@ -63,28 +60,22 @@ const linterOptions = {
63
60
  };
64
61
  const jsLanguageOptions = {
65
62
  globals,
66
- parser: babelParser,
67
63
  parserOptions: {
68
- babelOptions: {
69
- babelrc: false,
70
- configFile: false,
71
- presets: ["@babel/preset-env"],
64
+ ecmaFeatures: {
65
+ jsx: true,
72
66
  },
73
- requireConfigFile: false,
74
- sourceType: "module",
75
67
  },
76
68
  };
77
69
  const tsLanguageOptions = {
78
70
  globals,
79
- parser: eslintParser,
71
+ parser: tseslint.parser,
80
72
  parserOptions: {
81
- ecmaVersion: 2022,
82
- jsx: true,
83
- project: true,
84
- sourceType: "module",
73
+ projectService: true,
85
74
  },
86
75
  };
87
- const config = [
76
+ const config = defineConfig([
77
+ eslint.configs.recommended,
78
+ tseslint.configs.strict,
88
79
  {
89
80
  files: ["**/*.{js,jsx,mjs,cjs}"],
90
81
  languageOptions: jsLanguageOptions,
@@ -100,13 +91,11 @@ const config = [
100
91
  ...rules,
101
92
  // Always place plugins after rules in case there are overrides (e.g. in the typescriptPlugin)
102
93
  ...arrayFuncPlugin,
103
- ...constCasePlugin,
104
94
  ...cssModulesPlugin,
105
95
  ...destructuringPlugin,
106
96
  ...eslintCommentsPlugin,
107
97
  ...importNewlinesPlugin,
108
98
  ...importXPlugin,
109
- ...morePlugin,
110
99
  ...newlineDestructuringPlugin,
111
100
  ...noUnsanitizedPlugin,
112
101
  ...noUselessAssignPlugin,
@@ -210,8 +199,6 @@ const config = [
210
199
  "*.gen.ts",
211
200
  ],
212
201
  },
213
- ];
214
- // ts-prune-ignore-next -- eslint config requirement
202
+ ]);
215
203
  export default config;
216
- // ts-prune-ignore-next -- separate export for enabling the nextPlugin
217
204
  export { nextPlugin } from "./plugins/next.js";
@@ -16,21 +16,21 @@ export const arrayFuncPlugin = [
16
16
  *
17
17
  * https://www.npmjs.com/package/eslint-plugin-array-func#avoid-reverse
18
18
  */
19
- "array-func/avoid-reverse": "error",
19
+ "array-func/avoid-reverse": "warn",
20
20
  /*
21
21
  * Prefer using the mapFn callback of Array.from over an immediate
22
22
  * .map() call on the Array.from result.
23
23
  *
24
24
  * https://www.npmjs.com/package/eslint-plugin-array-func#from-map
25
25
  */
26
- "array-func/from-map": "error",
26
+ "array-func/from-map": "warn",
27
27
  /*
28
28
  * Avoid the this parameter when providing arrow function as callback
29
29
  * in array functions.
30
30
  *
31
31
  * https://www.npmjs.com/package/eslint-plugin-array-func#no-unnecessary-this-arg
32
32
  */
33
- "array-func/no-unnecessary-this-arg": "error",
33
+ "array-func/no-unnecessary-this-arg": "warn",
34
34
  /*
35
35
  * Use Array.from instead of [...iterable] for performance benefits.
36
36
  *
@@ -45,14 +45,14 @@ export const arrayFuncPlugin = [
45
45
  *
46
46
  * https://www.npmjs.com/package/eslint-plugin-array-func#prefer-flat
47
47
  */
48
- "array-func/prefer-flat": "error",
48
+ "array-func/prefer-flat": "warn",
49
49
  /*
50
50
  * Use .flatMap() to flatten an array and map the values instead of
51
51
  * using .flat().map().
52
52
  *
53
53
  * https://www.npmjs.com/package/eslint-plugin-array-func#prefer-flat-map
54
54
  */
55
- "array-func/prefer-flat-map": "error",
55
+ "array-func/prefer-flat-map": "warn",
56
56
  },
57
57
  },
58
58
  ];
@@ -12,8 +12,8 @@ export const cssModulesPlugin = [
12
12
  "css-modules": cssModules,
13
13
  },
14
14
  rules: {
15
- "css-modules/no-undef-class": ["error"],
16
- "css-modules/no-unused-class": ["error"],
15
+ "css-modules/no-undef-class": ["warn"],
16
+ "css-modules/no-unused-class": ["warn"],
17
17
  },
18
18
  },
19
19
  ];
@@ -17,14 +17,14 @@ export const destructuringPlugin = [
17
17
  *
18
18
  * https://github.com/lukeapage/eslint-plugin-destructuring/blob/HEAD/docs/rules/in-methods-params.md
19
19
  */
20
- "destructuring/in-methods-params": "error",
20
+ "destructuring/in-methods-params": "warn",
21
21
  /*
22
22
  * Destructuring within params can be messy, particularly if you have more than one parameter.
23
23
  * This rule allows you to configure the maximum parameters allowed when one or more is destructuring.
24
24
  *
25
25
  * https://github.com/lukeapage/eslint-plugin-destructuring/blob/HEAD/docs/rules/in-params.md
26
26
  */
27
- "destructuring/in-params": ["error", { "max-params": 0 }],
27
+ "destructuring/in-params": ["warn", { "max-params": 0 }],
28
28
  /*
29
29
  * When destructuring an object, you can provide the variable name in order to have
30
30
  * the variable name differ from the object property. This can produce confusing code
@@ -1,9 +1,9 @@
1
- import eslintComments from "eslint-plugin-eslint-comments";
1
+ import eslintComments from "@eslint-community/eslint-plugin-eslint-comments";
2
2
  /*
3
3
  * Additional ESLint rules for ESLint directive comments
4
4
  * (e.g. //eslint-disable-line).
5
5
  *
6
- * https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/
6
+ * https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/
7
7
  */
8
8
  export const eslintCommentsPlugin = [
9
9
  {
@@ -14,60 +14,60 @@ export const eslintCommentsPlugin = [
14
14
  /*
15
15
  * Require a eslint-enable comment for every eslint-disable comment
16
16
  *
17
- * https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html
17
+ * https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html
18
18
  */
19
- "eslint-comments/disable-enable-pair": "error",
19
+ "eslint-comments/disable-enable-pair": "warn",
20
20
  /*
21
21
  * Disallow a eslint-enable comment for multiple eslint-disable comments
22
22
  *
23
- * https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html
23
+ * https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html
24
24
  */
25
- "eslint-comments/no-aggregating-enable": "error",
25
+ "eslint-comments/no-aggregating-enable": "warn",
26
26
  /*
27
27
  * Disallow duplicate eslint-disable comments
28
28
  *
29
- * https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html
29
+ * https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html
30
30
  */
31
- "eslint-comments/no-duplicate-disable": "error",
31
+ "eslint-comments/no-duplicate-disable": "warn",
32
32
  /*
33
33
  * Disallow eslint-disable comments without rule names
34
34
  *
35
- * https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html
35
+ * https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html
36
36
  */
37
- "eslint-comments/no-restricted-disable": "error",
37
+ "eslint-comments/no-restricted-disable": "warn",
38
38
  /*
39
39
  * Disallow eslint-disable comments about specific rules
40
40
  *
41
- * https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html
41
+ * https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html
42
42
  */
43
- "eslint-comments/no-unlimited-disable": "error",
43
+ "eslint-comments/no-unlimited-disable": "warn",
44
44
  /*
45
45
  * Disallow unused eslint-disable comments
46
46
  *
47
- * https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html
47
+ * https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html
48
48
  */
49
- "eslint-comments/no-unused-disable": "error",
49
+ "eslint-comments/no-unused-disable": "warn",
50
50
  /*
51
51
  * Disallow unused eslint-enable comments
52
52
  *
53
- * https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html
53
+ * https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html
54
54
  */
55
- "eslint-comments/no-unused-enable": "error",
55
+ "eslint-comments/no-unused-enable": "warn",
56
56
  /*
57
57
  * Disallow ESLint directive-comments
58
58
  *
59
59
  * Off for now because sometimes we have a good reason to use these
60
60
  *
61
- * https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-use.html
61
+ * https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-use.html
62
62
  */
63
63
  "eslint-comments/no-use": "off",
64
64
  /*
65
65
  * This rule warns directive comments without description.
66
66
  *
67
- * https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/require-description.html
67
+ * https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/require-description.html
68
68
  */
69
69
  "eslint-comments/require-description": [
70
- "error",
70
+ "warn",
71
71
  {
72
72
  ignore: [
73
73
  "eslint-enable",
@@ -16,7 +16,7 @@ export const importNewlinesPlugin = [
16
16
  * https://www.npmjs.com/package/eslint-plugin-import-newlines
17
17
  */
18
18
  "import-newlines/enforce": [
19
- "error",
19
+ "warn",
20
20
  {
21
21
  items: 1,
22
22
  "max-len": Number.POSITIVE_INFINITY,
@@ -14,7 +14,7 @@ export const importXPlugin = [
14
14
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/consistent-type-specifier-style.md
15
15
  */
16
16
  "import-x/consistent-type-specifier-style": [
17
- "error",
17
+ "warn",
18
18
  "prefer-top-level",
19
19
  ],
20
20
  /*
@@ -47,7 +47,7 @@ export const importXPlugin = [
47
47
  *
48
48
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/exports-last.md
49
49
  */
50
- "import-x/exports-last": "error",
50
+ "import-x/exports-last": "warn",
51
51
  /*
52
52
  * Ensure consistent use of file extension within the import path
53
53
  *
@@ -61,7 +61,7 @@ export const importXPlugin = [
61
61
  *
62
62
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/first.md
63
63
  */
64
- "import-x/first": "error",
64
+ "import-x/first": "warn",
65
65
  /*
66
66
  * Prefer named exports to be grouped together in a single export declaration
67
67
  *
@@ -85,7 +85,7 @@ export const importXPlugin = [
85
85
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/max-dependencies.md
86
86
  */
87
87
  "import-x/max-dependencies": [
88
- "error",
88
+ "warn",
89
89
  {
90
90
  max: 25,
91
91
  },
@@ -112,7 +112,7 @@ export const importXPlugin = [
112
112
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/newline-after-import.md
113
113
  */
114
114
  "import-x/newline-after-import": [
115
- "error",
115
+ "warn",
116
116
  {
117
117
  count: 2,
118
118
  },
@@ -122,20 +122,20 @@ export const importXPlugin = [
122
122
  *
123
123
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-absolute-path.md
124
124
  */
125
- "import-x/no-absolute-path": "error",
125
+ "import-x/no-absolute-path": "warn",
126
126
  /*
127
127
  * Report AMD require and define calls.
128
128
  *
129
129
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-amd.md
130
130
  */
131
- "import-x/no-amd": "error",
131
+ "import-x/no-amd": "warn",
132
132
  /*
133
133
  * Forbid anonymous values as default exports
134
134
  *
135
135
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-anonymous-default-export.md
136
136
  */
137
137
  "import-x/no-anonymous-default-export": [
138
- "error",
138
+ "warn",
139
139
  {
140
140
  allowObject: true,
141
141
  },
@@ -145,7 +145,7 @@ export const importXPlugin = [
145
145
  *
146
146
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-commonjs.md
147
147
  */
148
- "import-x/no-commonjs": "error",
148
+ "import-x/no-commonjs": "warn",
149
149
  /*
150
150
  * Forbid a module from importing a module with a dependency path back to itself
151
151
  *
@@ -159,7 +159,7 @@ export const importXPlugin = [
159
159
  *
160
160
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-default-export.md
161
161
  */
162
- "import-x/no-default-export": "error",
162
+ "import-x/no-default-export": "warn",
163
163
  /*
164
164
  * Report imported names marked with @deprecated documentation tag
165
165
  *
@@ -175,19 +175,19 @@ export const importXPlugin = [
175
175
  *
176
176
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-duplicates.md
177
177
  */
178
- "import-x/no-duplicates": "error",
178
+ "import-x/no-duplicates": "warn",
179
179
  /*
180
180
  * Forbid require() calls with expressions
181
181
  *
182
182
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-dynamic-require.md
183
183
  */
184
- "import-x/no-dynamic-require": "error",
184
+ "import-x/no-dynamic-require": "warn",
185
185
  /*
186
186
  * Reports the use of empty named import blocks.
187
187
  *
188
188
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-empty-named-blocks.md
189
189
  */
190
- "import-x/no-empty-named-blocks": "error",
190
+ "import-x/no-empty-named-blocks": "warn",
191
191
  /*
192
192
  * Forbid the use of extraneous packages
193
193
  *
@@ -201,7 +201,7 @@ export const importXPlugin = [
201
201
  *
202
202
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-import-module-exports.md
203
203
  */
204
- "import-x/no-import-module-exports": "error",
204
+ "import-x/no-import-module-exports": "warn",
205
205
  /*
206
206
  * Prevent importing the submodules of other modules
207
207
  *
@@ -215,7 +215,7 @@ export const importXPlugin = [
215
215
  *
216
216
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-mutable-exports.md
217
217
  */
218
- "import-x/no-mutable-exports": "error",
218
+ "import-x/no-mutable-exports": "warn",
219
219
  /*
220
220
  * Report use of exported name as identifier of default export
221
221
  *
@@ -308,7 +308,7 @@ export const importXPlugin = [
308
308
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unassigned-import.md
309
309
  */
310
310
  "import-x/no-unassigned-import": [
311
- "error",
311
+ "warn",
312
312
  {
313
313
  allow: [
314
314
  "**/*.css",
@@ -354,7 +354,7 @@ export const importXPlugin = [
354
354
  *
355
355
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-webpack-loader-syntax.md
356
356
  */
357
- "import-x/no-webpack-loader-syntax": "error",
357
+ "import-x/no-webpack-loader-syntax": "warn",
358
358
  /*
359
359
  * Enforce a convention in module import order
360
360
  *
@@ -399,7 +399,7 @@ export const importXPlugin = [
399
399
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/prefer-namespace-import.md
400
400
  */
401
401
  "import-x/prefer-namespace-import": [
402
- "error",
402
+ "warn",
403
403
  {
404
404
  patterns: [
405
405
  "react",
@@ -412,7 +412,7 @@ export const importXPlugin = [
412
412
  *
413
413
  * https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/unambiguous.md
414
414
  */
415
- "import-x/unambiguous": "error",
415
+ "import-x/unambiguous": "warn",
416
416
  },
417
417
  },
418
418
  ];
@@ -16,7 +16,7 @@ export const newlineDestructuringPlugin = [
16
16
  * https://www.npmjs.com/package/eslint-plugin-newline-destructuring
17
17
  */
18
18
  "newline-destructuring/newline": [
19
- "error",
19
+ "warn",
20
20
  {
21
21
  items: 1,
22
22
  },
@@ -16,127 +16,127 @@ export const nextPlugin = [
16
16
  *
17
17
  * https://nextjs.org/docs/messages/google-font-display
18
18
  */
19
- "next/google-font-display": "error",
19
+ "next/google-font-display": "warn",
20
20
  /*
21
21
  * Ensure preconnect is used with Google Fonts.
22
22
  *
23
23
  * https://nextjs.org/docs/messages/google-font-preconnect
24
24
  */
25
- "next/google-font-preconnect": "error",
25
+ "next/google-font-preconnect": "warn",
26
26
  /*
27
27
  * Enforce id attribute on next/script components with inline content.
28
28
  *
29
29
  * https://nextjs.org/docs/messages/inline-script-id
30
30
  */
31
- "next/inline-script-id": "error",
31
+ "next/inline-script-id": "warn",
32
32
  /*
33
33
  * Prefer next/script component when using the inline script for Google Analytics.
34
34
  *
35
35
  * https://nextjs.org/docs/messages/next-script-for-ga
36
36
  */
37
- "next/next-script-for-ga": "error",
37
+ "next/next-script-for-ga": "warn",
38
38
  /*
39
39
  * Prevent assignment to the module variable.
40
40
  *
41
41
  * https://nextjs.org/docs/messages/no-assign-module-variable
42
42
  */
43
- "next/no-assign-module-variable": "error",
43
+ "next/no-assign-module-variable": "warn",
44
44
  /*
45
45
  * Prevent client components from being async functions.
46
46
  *
47
47
  * https://nextjs.org/docs/messages/no-async-client-component
48
48
  */
49
- "next/no-async-client-component": "error",
49
+ "next/no-async-client-component": "warn",
50
50
  /*
51
51
  * Prevent usage of next/script's beforeInteractive strategy outside of pages/_document.js.
52
52
  *
53
53
  * https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
54
54
  */
55
- "next/no-before-interactive-script-outside-document": "error",
55
+ "next/no-before-interactive-script-outside-document": "warn",
56
56
  /*
57
57
  * Prevent manual stylesheet tags.
58
58
  *
59
59
  * https://nextjs.org/docs/messages/no-css-tags
60
60
  */
61
- "next/no-css-tags": "error",
61
+ "next/no-css-tags": "warn",
62
62
  /*
63
63
  * Prevent importing next/document outside of pages/_document.js.
64
64
  *
65
65
  * https://nextjs.org/docs/messages/no-document-import-in-page
66
66
  */
67
- "next/no-document-import-in-page": "error",
67
+ "next/no-document-import-in-page": "warn",
68
68
  /*
69
69
  * Prevent duplicate usage of <Head> in pages/_document.js.
70
70
  *
71
71
  * https://nextjs.org/docs/messages/no-duplicate-head
72
72
  */
73
- "next/no-duplicate-head": "error",
73
+ "next/no-duplicate-head": "warn",
74
74
  /*
75
75
  * Prevent usage of <head> element.
76
76
  *
77
77
  * https://nextjs.org/docs/messages/no-head-element
78
78
  */
79
- "next/no-head-element": "error",
79
+ "next/no-head-element": "warn",
80
80
  /*
81
81
  * Prevent usage of next/head in pages/_document.js.
82
82
  *
83
83
  * https://nextjs.org/docs/messages/no-head-import-in-document
84
84
  */
85
- "next/no-head-import-in-document": "error",
85
+ "next/no-head-import-in-document": "warn",
86
86
  /*
87
87
  * Prevent usage of <a> elements to navigate to internal Next.js pages.
88
88
  *
89
89
  * https://nextjs.org/docs/messages/no-html-link-for-pages
90
90
  */
91
- "next/no-html-link-for-pages": "error",
91
+ "next/no-html-link-for-pages": "warn",
92
92
  /*
93
93
  * Prevent usage of <img> element due to slower LCP and higher bandwidth.
94
94
  *
95
95
  * https://nextjs.org/docs/messages/no-img-element
96
96
  */
97
- "next/no-img-element": "error",
97
+ "next/no-img-element": "warn",
98
98
  /*
99
99
  * Prevent page-only custom fonts.
100
100
  *
101
101
  * https://nextjs.org/docs/messages/no-page-custom-font
102
102
  */
103
- "next/no-page-custom-font": "error",
103
+ "next/no-page-custom-font": "warn",
104
104
  /*
105
105
  * Prevent usage of next/script in next/head component.
106
106
  *
107
107
  * https://nextjs.org/docs/messages/no-script-component-in-head
108
108
  */
109
- "next/no-script-component-in-head": "error",
109
+ "next/no-script-component-in-head": "warn",
110
110
  /*
111
111
  * Prevent usage of styled-jsx in pages/_document.js.
112
112
  *
113
113
  * https://nextjs.org/docs/messages/no-styled-jsx-in-document
114
114
  */
115
- "next/no-styled-jsx-in-document": "error",
115
+ "next/no-styled-jsx-in-document": "warn",
116
116
  /*
117
117
  * Prevent synchronous scripts.
118
118
  *
119
119
  * https://nextjs.org/docs/messages/no-sync-scripts
120
120
  */
121
- "next/no-sync-scripts": "error",
121
+ "next/no-sync-scripts": "warn",
122
122
  /*
123
123
  * Prevent usage of <title> with Head component from next/document.
124
124
  *
125
125
  * https://nextjs.org/docs/messages/no-title-in-document-head
126
126
  */
127
- "next/no-title-in-document-head": "error",
127
+ "next/no-title-in-document-head": "warn",
128
128
  /*
129
129
  * Prevent common typos in Next.js's data fetching functions
130
130
  *
131
131
  * https://nextjs.org/docs/messages/no-typos
132
132
  */
133
- "next/no-typos": "error",
133
+ "next/no-typos": "warn",
134
134
  /*
135
135
  * Prevent duplicate polyfills from Polyfill.io.
136
136
  *
137
137
  * https://nextjs.org/docs/messages/no-unwanted-polyfillio
138
138
  */
139
- "next/no-unwanted-polyfillio": "error",
139
+ "next/no-unwanted-polyfillio": "warn",
140
140
  },
141
141
  },
142
142
  ];
@@ -24,7 +24,7 @@ export const noUnsanitizedPlugin = [
24
24
  *
25
25
  * https://github.com/mozilla/eslint-plugin-no-unsanitized/blob/master/docs/rules/method.md
26
26
  */
27
- "no-unsanitized/method": "error",
27
+ "no-unsanitized/method": "warn",
28
28
  /*
29
29
  * The property rule in eslint-plugin-no-unsanitized perform basic security
30
30
  * checks for property assignments. The idea of these checks is to ensure
@@ -34,7 +34,7 @@ export const noUnsanitizedPlugin = [
34
34
  *
35
35
  * https://github.com/mozilla/eslint-plugin-no-unsanitized/blob/master/docs/rules/property.md
36
36
  */
37
- "no-unsanitized/property": "error",
37
+ "no-unsanitized/property": "warn",
38
38
  },
39
39
  },
40
40
  ];
@@ -16,7 +16,7 @@ export const noUselessAssignPlugin = [
16
16
  *
17
17
  * https://www.npmjs.com/package/eslint-plugin-no-useless-assign#usage
18
18
  */
19
- "no-useless-assign/no-useless-assign": "error",
19
+ "no-useless-assign/no-useless-assign": "warn",
20
20
  },
21
21
  },
22
22
  ];