@bfra.me/eslint-config 0.30.0 → 0.30.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/lib/index.d.ts +106 -106
- package/lib/index.js +4 -4
- package/package.json +3 -3
- package/src/configs/nextjs.ts +1 -1
- package/src/configs/sort.ts +2 -2
- package/src/rules.d.ts +106 -106
package/lib/index.d.ts
CHANGED
|
@@ -16,6 +16,110 @@ interface Rules {
|
|
|
16
16
|
* @see https://github.com/bfra-me/works
|
|
17
17
|
*/
|
|
18
18
|
'@bfra.me/missing-module-for-config'?: Linter.RuleEntry<BfraMeMissingModuleForConfig>
|
|
19
|
+
/**
|
|
20
|
+
* Enforce font-display behavior with Google Fonts.
|
|
21
|
+
* @see https://nextjs.org/docs/messages/google-font-display
|
|
22
|
+
*/
|
|
23
|
+
'@next/next/google-font-display'?: Linter.RuleEntry<[]>
|
|
24
|
+
/**
|
|
25
|
+
* Ensure `preconnect` is used with Google Fonts.
|
|
26
|
+
* @see https://nextjs.org/docs/messages/google-font-preconnect
|
|
27
|
+
*/
|
|
28
|
+
'@next/next/google-font-preconnect'?: Linter.RuleEntry<[]>
|
|
29
|
+
/**
|
|
30
|
+
* Enforce `id` attribute on `next/script` components with inline content.
|
|
31
|
+
* @see https://nextjs.org/docs/messages/inline-script-id
|
|
32
|
+
*/
|
|
33
|
+
'@next/next/inline-script-id'?: Linter.RuleEntry<[]>
|
|
34
|
+
/**
|
|
35
|
+
* Prefer `next/script` component when using the inline script for Google Analytics.
|
|
36
|
+
* @see https://nextjs.org/docs/messages/next-script-for-ga
|
|
37
|
+
*/
|
|
38
|
+
'@next/next/next-script-for-ga'?: Linter.RuleEntry<[]>
|
|
39
|
+
/**
|
|
40
|
+
* Prevent assignment to the `module` variable.
|
|
41
|
+
* @see https://nextjs.org/docs/messages/no-assign-module-variable
|
|
42
|
+
*/
|
|
43
|
+
'@next/next/no-assign-module-variable'?: Linter.RuleEntry<[]>
|
|
44
|
+
/**
|
|
45
|
+
* Prevent Client Components from being async functions.
|
|
46
|
+
* @see https://nextjs.org/docs/messages/no-async-client-component
|
|
47
|
+
*/
|
|
48
|
+
'@next/next/no-async-client-component'?: Linter.RuleEntry<[]>
|
|
49
|
+
/**
|
|
50
|
+
* Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js`.
|
|
51
|
+
* @see https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
|
|
52
|
+
*/
|
|
53
|
+
'@next/next/no-before-interactive-script-outside-document'?: Linter.RuleEntry<[]>
|
|
54
|
+
/**
|
|
55
|
+
* Prevent manual stylesheet tags.
|
|
56
|
+
* @see https://nextjs.org/docs/messages/no-css-tags
|
|
57
|
+
*/
|
|
58
|
+
'@next/next/no-css-tags'?: Linter.RuleEntry<[]>
|
|
59
|
+
/**
|
|
60
|
+
* Prevent importing `next/document` outside of `pages/_document.js`.
|
|
61
|
+
* @see https://nextjs.org/docs/messages/no-document-import-in-page
|
|
62
|
+
*/
|
|
63
|
+
'@next/next/no-document-import-in-page'?: Linter.RuleEntry<[]>
|
|
64
|
+
/**
|
|
65
|
+
* Prevent duplicate usage of `<Head>` in `pages/_document.js`.
|
|
66
|
+
* @see https://nextjs.org/docs/messages/no-duplicate-head
|
|
67
|
+
*/
|
|
68
|
+
'@next/next/no-duplicate-head'?: Linter.RuleEntry<[]>
|
|
69
|
+
/**
|
|
70
|
+
* Prevent usage of `<head>` element.
|
|
71
|
+
* @see https://nextjs.org/docs/messages/no-head-element
|
|
72
|
+
*/
|
|
73
|
+
'@next/next/no-head-element'?: Linter.RuleEntry<[]>
|
|
74
|
+
/**
|
|
75
|
+
* Prevent usage of `next/head` in `pages/_document.js`.
|
|
76
|
+
* @see https://nextjs.org/docs/messages/no-head-import-in-document
|
|
77
|
+
*/
|
|
78
|
+
'@next/next/no-head-import-in-document'?: Linter.RuleEntry<[]>
|
|
79
|
+
/**
|
|
80
|
+
* Prevent usage of `<a>` elements to navigate to internal Next.js pages.
|
|
81
|
+
* @see https://nextjs.org/docs/messages/no-html-link-for-pages
|
|
82
|
+
*/
|
|
83
|
+
'@next/next/no-html-link-for-pages'?: Linter.RuleEntry<NextNextNoHtmlLinkForPages>
|
|
84
|
+
/**
|
|
85
|
+
* Prevent usage of `<img>` element due to slower LCP and higher bandwidth.
|
|
86
|
+
* @see https://nextjs.org/docs/messages/no-img-element
|
|
87
|
+
*/
|
|
88
|
+
'@next/next/no-img-element'?: Linter.RuleEntry<[]>
|
|
89
|
+
/**
|
|
90
|
+
* Prevent page-only custom fonts.
|
|
91
|
+
* @see https://nextjs.org/docs/messages/no-page-custom-font
|
|
92
|
+
*/
|
|
93
|
+
'@next/next/no-page-custom-font'?: Linter.RuleEntry<[]>
|
|
94
|
+
/**
|
|
95
|
+
* Prevent usage of `next/script` in `next/head` component.
|
|
96
|
+
* @see https://nextjs.org/docs/messages/no-script-component-in-head
|
|
97
|
+
*/
|
|
98
|
+
'@next/next/no-script-component-in-head'?: Linter.RuleEntry<[]>
|
|
99
|
+
/**
|
|
100
|
+
* Prevent usage of `styled-jsx` in `pages/_document.js`.
|
|
101
|
+
* @see https://nextjs.org/docs/messages/no-styled-jsx-in-document
|
|
102
|
+
*/
|
|
103
|
+
'@next/next/no-styled-jsx-in-document'?: Linter.RuleEntry<[]>
|
|
104
|
+
/**
|
|
105
|
+
* Prevent synchronous scripts.
|
|
106
|
+
* @see https://nextjs.org/docs/messages/no-sync-scripts
|
|
107
|
+
*/
|
|
108
|
+
'@next/next/no-sync-scripts'?: Linter.RuleEntry<[]>
|
|
109
|
+
/**
|
|
110
|
+
* Prevent usage of `<title>` with `Head` component from `next/document`.
|
|
111
|
+
* @see https://nextjs.org/docs/messages/no-title-in-document-head
|
|
112
|
+
*/
|
|
113
|
+
'@next/next/no-title-in-document-head'?: Linter.RuleEntry<[]>
|
|
114
|
+
/**
|
|
115
|
+
* Prevent common typos in Next.js data fetching functions.
|
|
116
|
+
*/
|
|
117
|
+
'@next/next/no-typos'?: Linter.RuleEntry<[]>
|
|
118
|
+
/**
|
|
119
|
+
* Prevent duplicate polyfills from Polyfill.io.
|
|
120
|
+
* @see https://nextjs.org/docs/messages/no-unwanted-polyfillio
|
|
121
|
+
*/
|
|
122
|
+
'@next/next/no-unwanted-polyfillio'?: Linter.RuleEntry<[]>
|
|
19
123
|
/**
|
|
20
124
|
* Require that function overload signatures be consecutive
|
|
21
125
|
* @see https://typescript-eslint.io/rules/adjacent-overload-signatures
|
|
@@ -2264,110 +2368,6 @@ interface Rules {
|
|
|
2264
2368
|
* @deprecated
|
|
2265
2369
|
*/
|
|
2266
2370
|
'newline-per-chained-call'?: Linter.RuleEntry<NewlinePerChainedCall>
|
|
2267
|
-
/**
|
|
2268
|
-
* Enforce font-display behavior with Google Fonts.
|
|
2269
|
-
* @see https://nextjs.org/docs/messages/google-font-display
|
|
2270
|
-
*/
|
|
2271
|
-
'next/google-font-display'?: Linter.RuleEntry<[]>
|
|
2272
|
-
/**
|
|
2273
|
-
* Ensure `preconnect` is used with Google Fonts.
|
|
2274
|
-
* @see https://nextjs.org/docs/messages/google-font-preconnect
|
|
2275
|
-
*/
|
|
2276
|
-
'next/google-font-preconnect'?: Linter.RuleEntry<[]>
|
|
2277
|
-
/**
|
|
2278
|
-
* Enforce `id` attribute on `next/script` components with inline content.
|
|
2279
|
-
* @see https://nextjs.org/docs/messages/inline-script-id
|
|
2280
|
-
*/
|
|
2281
|
-
'next/inline-script-id'?: Linter.RuleEntry<[]>
|
|
2282
|
-
/**
|
|
2283
|
-
* Prefer `next/script` component when using the inline script for Google Analytics.
|
|
2284
|
-
* @see https://nextjs.org/docs/messages/next-script-for-ga
|
|
2285
|
-
*/
|
|
2286
|
-
'next/next-script-for-ga'?: Linter.RuleEntry<[]>
|
|
2287
|
-
/**
|
|
2288
|
-
* Prevent assignment to the `module` variable.
|
|
2289
|
-
* @see https://nextjs.org/docs/messages/no-assign-module-variable
|
|
2290
|
-
*/
|
|
2291
|
-
'next/no-assign-module-variable'?: Linter.RuleEntry<[]>
|
|
2292
|
-
/**
|
|
2293
|
-
* Prevent Client Components from being async functions.
|
|
2294
|
-
* @see https://nextjs.org/docs/messages/no-async-client-component
|
|
2295
|
-
*/
|
|
2296
|
-
'next/no-async-client-component'?: Linter.RuleEntry<[]>
|
|
2297
|
-
/**
|
|
2298
|
-
* Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js`.
|
|
2299
|
-
* @see https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
|
|
2300
|
-
*/
|
|
2301
|
-
'next/no-before-interactive-script-outside-document'?: Linter.RuleEntry<[]>
|
|
2302
|
-
/**
|
|
2303
|
-
* Prevent manual stylesheet tags.
|
|
2304
|
-
* @see https://nextjs.org/docs/messages/no-css-tags
|
|
2305
|
-
*/
|
|
2306
|
-
'next/no-css-tags'?: Linter.RuleEntry<[]>
|
|
2307
|
-
/**
|
|
2308
|
-
* Prevent importing `next/document` outside of `pages/_document.js`.
|
|
2309
|
-
* @see https://nextjs.org/docs/messages/no-document-import-in-page
|
|
2310
|
-
*/
|
|
2311
|
-
'next/no-document-import-in-page'?: Linter.RuleEntry<[]>
|
|
2312
|
-
/**
|
|
2313
|
-
* Prevent duplicate usage of `<Head>` in `pages/_document.js`.
|
|
2314
|
-
* @see https://nextjs.org/docs/messages/no-duplicate-head
|
|
2315
|
-
*/
|
|
2316
|
-
'next/no-duplicate-head'?: Linter.RuleEntry<[]>
|
|
2317
|
-
/**
|
|
2318
|
-
* Prevent usage of `<head>` element.
|
|
2319
|
-
* @see https://nextjs.org/docs/messages/no-head-element
|
|
2320
|
-
*/
|
|
2321
|
-
'next/no-head-element'?: Linter.RuleEntry<[]>
|
|
2322
|
-
/**
|
|
2323
|
-
* Prevent usage of `next/head` in `pages/_document.js`.
|
|
2324
|
-
* @see https://nextjs.org/docs/messages/no-head-import-in-document
|
|
2325
|
-
*/
|
|
2326
|
-
'next/no-head-import-in-document'?: Linter.RuleEntry<[]>
|
|
2327
|
-
/**
|
|
2328
|
-
* Prevent usage of `<a>` elements to navigate to internal Next.js pages.
|
|
2329
|
-
* @see https://nextjs.org/docs/messages/no-html-link-for-pages
|
|
2330
|
-
*/
|
|
2331
|
-
'next/no-html-link-for-pages'?: Linter.RuleEntry<NextNoHtmlLinkForPages>
|
|
2332
|
-
/**
|
|
2333
|
-
* Prevent usage of `<img>` element due to slower LCP and higher bandwidth.
|
|
2334
|
-
* @see https://nextjs.org/docs/messages/no-img-element
|
|
2335
|
-
*/
|
|
2336
|
-
'next/no-img-element'?: Linter.RuleEntry<[]>
|
|
2337
|
-
/**
|
|
2338
|
-
* Prevent page-only custom fonts.
|
|
2339
|
-
* @see https://nextjs.org/docs/messages/no-page-custom-font
|
|
2340
|
-
*/
|
|
2341
|
-
'next/no-page-custom-font'?: Linter.RuleEntry<[]>
|
|
2342
|
-
/**
|
|
2343
|
-
* Prevent usage of `next/script` in `next/head` component.
|
|
2344
|
-
* @see https://nextjs.org/docs/messages/no-script-component-in-head
|
|
2345
|
-
*/
|
|
2346
|
-
'next/no-script-component-in-head'?: Linter.RuleEntry<[]>
|
|
2347
|
-
/**
|
|
2348
|
-
* Prevent usage of `styled-jsx` in `pages/_document.js`.
|
|
2349
|
-
* @see https://nextjs.org/docs/messages/no-styled-jsx-in-document
|
|
2350
|
-
*/
|
|
2351
|
-
'next/no-styled-jsx-in-document'?: Linter.RuleEntry<[]>
|
|
2352
|
-
/**
|
|
2353
|
-
* Prevent synchronous scripts.
|
|
2354
|
-
* @see https://nextjs.org/docs/messages/no-sync-scripts
|
|
2355
|
-
*/
|
|
2356
|
-
'next/no-sync-scripts'?: Linter.RuleEntry<[]>
|
|
2357
|
-
/**
|
|
2358
|
-
* Prevent usage of `<title>` with `Head` component from `next/document`.
|
|
2359
|
-
* @see https://nextjs.org/docs/messages/no-title-in-document-head
|
|
2360
|
-
*/
|
|
2361
|
-
'next/no-title-in-document-head'?: Linter.RuleEntry<[]>
|
|
2362
|
-
/**
|
|
2363
|
-
* Prevent common typos in Next.js data fetching functions.
|
|
2364
|
-
*/
|
|
2365
|
-
'next/no-typos'?: Linter.RuleEntry<[]>
|
|
2366
|
-
/**
|
|
2367
|
-
* Prevent duplicate polyfills from Polyfill.io.
|
|
2368
|
-
* @see https://nextjs.org/docs/messages/no-unwanted-polyfillio
|
|
2369
|
-
*/
|
|
2370
|
-
'next/no-unwanted-polyfillio'?: Linter.RuleEntry<[]>
|
|
2371
2371
|
/**
|
|
2372
2372
|
* Disallow the use of `alert`, `confirm`, and `prompt`
|
|
2373
2373
|
* @see https://eslint.org/docs/latest/rules/no-alert
|
|
@@ -6139,6 +6139,8 @@ interface Rules {
|
|
|
6139
6139
|
/* ======= Declarations ======= */
|
|
6140
6140
|
// ----- @bfra.me/missing-module-for-config -----
|
|
6141
6141
|
type BfraMeMissingModuleForConfig = []|[string[]]
|
|
6142
|
+
// ----- @next/next/no-html-link-for-pages -----
|
|
6143
|
+
type NextNextNoHtmlLinkForPages = []|[(string | string[])]
|
|
6142
6144
|
// ----- @typescript-eslint/array-type -----
|
|
6143
6145
|
type TypescriptEslintArrayType = []|[{
|
|
6144
6146
|
|
|
@@ -9239,8 +9241,6 @@ type NewlineAfterVar = []|[("never" | "always")]
|
|
|
9239
9241
|
type NewlinePerChainedCall = []|[{
|
|
9240
9242
|
ignoreChainWithDepth?: number
|
|
9241
9243
|
}]
|
|
9242
|
-
// ----- next/no-html-link-for-pages -----
|
|
9243
|
-
type NextNoHtmlLinkForPages = []|[(string | string[])]
|
|
9244
9244
|
// ----- no-bitwise -----
|
|
9245
9245
|
type NoBitwise = []|[{
|
|
9246
9246
|
allow?: ("^" | "|" | "&" | "<<" | ">>" | ">>>" | "^=" | "|=" | "&=" | "<<=" | ">>=" | ">>>=" | "~")[]
|
package/lib/index.js
CHANGED
|
@@ -107,7 +107,7 @@ var GLOB_EXCLUDE = [
|
|
|
107
107
|
import { fileURLToPath } from "url";
|
|
108
108
|
|
|
109
109
|
// package.json
|
|
110
|
-
var version = "0.30.
|
|
110
|
+
var version = "0.30.2";
|
|
111
111
|
|
|
112
112
|
// src/parsers/any-parser.ts
|
|
113
113
|
var lineBreakPattern = /\r\n|[\n\r\u2028\u2029]/u;
|
|
@@ -851,7 +851,7 @@ async function nextjs(options = {}) {
|
|
|
851
851
|
return [
|
|
852
852
|
{
|
|
853
853
|
name: "@bfra.me/nextjs/setup",
|
|
854
|
-
plugins: { next: pluginNextJs }
|
|
854
|
+
plugins: { "@next/next": pluginNextJs }
|
|
855
855
|
},
|
|
856
856
|
{
|
|
857
857
|
name: "@bfra.me/nextjs/rules",
|
|
@@ -1396,9 +1396,9 @@ async function sortRenovateConfig() {
|
|
|
1396
1396
|
"jsonc/sort-array-values": [
|
|
1397
1397
|
"error",
|
|
1398
1398
|
{
|
|
1399
|
-
// Don't sort 'extends' arrays, as order matters
|
|
1399
|
+
// Don't sort 'extends' or 'postUpgradeTasks.commands' arrays, as order matters
|
|
1400
1400
|
order: { type: "asc" },
|
|
1401
|
-
pathPattern: "^(?!extends$).*"
|
|
1401
|
+
pathPattern: "^(?!extends$|postUpgradeTasks.commands$).*"
|
|
1402
1402
|
}
|
|
1403
1403
|
],
|
|
1404
1404
|
"jsonc/sort-keys": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bfra.me/eslint-config",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.2",
|
|
4
4
|
"description": "Shared ESLint configuration for bfra.me",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bfra.me",
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
"eslint-typegen": "2.3.0",
|
|
83
83
|
"tsup": "8.5.0",
|
|
84
84
|
"tsx": "4.20.5",
|
|
85
|
+
"@bfra.me/eslint-config": "0.30.2",
|
|
85
86
|
"@bfra.me/prettier-config": "0.16.1",
|
|
86
|
-
"@bfra.me/tsconfig": "0.12.0"
|
|
87
|
-
"@bfra.me/eslint-config": "0.30.0"
|
|
87
|
+
"@bfra.me/tsconfig": "0.12.0"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"@eslint-react/eslint-plugin": "^1.53.1",
|
package/src/configs/nextjs.ts
CHANGED
package/src/configs/sort.ts
CHANGED
|
@@ -100,9 +100,9 @@ export async function sortRenovateConfig(): Promise<Config[]> {
|
|
|
100
100
|
'jsonc/sort-array-values': [
|
|
101
101
|
'error',
|
|
102
102
|
{
|
|
103
|
-
// Don't sort 'extends' arrays, as order matters
|
|
103
|
+
// Don't sort 'extends' or 'postUpgradeTasks.commands' arrays, as order matters
|
|
104
104
|
order: {type: 'asc'},
|
|
105
|
-
pathPattern: '^(?!extends$).*',
|
|
105
|
+
pathPattern: '^(?!extends$|postUpgradeTasks\.commands$).*',
|
|
106
106
|
},
|
|
107
107
|
],
|
|
108
108
|
'jsonc/sort-keys': [
|
package/src/rules.d.ts
CHANGED
|
@@ -9,6 +9,110 @@ export interface Rules {
|
|
|
9
9
|
* @see https://github.com/bfra-me/works
|
|
10
10
|
*/
|
|
11
11
|
'@bfra.me/missing-module-for-config'?: Linter.RuleEntry<BfraMeMissingModuleForConfig>
|
|
12
|
+
/**
|
|
13
|
+
* Enforce font-display behavior with Google Fonts.
|
|
14
|
+
* @see https://nextjs.org/docs/messages/google-font-display
|
|
15
|
+
*/
|
|
16
|
+
'@next/next/google-font-display'?: Linter.RuleEntry<[]>
|
|
17
|
+
/**
|
|
18
|
+
* Ensure `preconnect` is used with Google Fonts.
|
|
19
|
+
* @see https://nextjs.org/docs/messages/google-font-preconnect
|
|
20
|
+
*/
|
|
21
|
+
'@next/next/google-font-preconnect'?: Linter.RuleEntry<[]>
|
|
22
|
+
/**
|
|
23
|
+
* Enforce `id` attribute on `next/script` components with inline content.
|
|
24
|
+
* @see https://nextjs.org/docs/messages/inline-script-id
|
|
25
|
+
*/
|
|
26
|
+
'@next/next/inline-script-id'?: Linter.RuleEntry<[]>
|
|
27
|
+
/**
|
|
28
|
+
* Prefer `next/script` component when using the inline script for Google Analytics.
|
|
29
|
+
* @see https://nextjs.org/docs/messages/next-script-for-ga
|
|
30
|
+
*/
|
|
31
|
+
'@next/next/next-script-for-ga'?: Linter.RuleEntry<[]>
|
|
32
|
+
/**
|
|
33
|
+
* Prevent assignment to the `module` variable.
|
|
34
|
+
* @see https://nextjs.org/docs/messages/no-assign-module-variable
|
|
35
|
+
*/
|
|
36
|
+
'@next/next/no-assign-module-variable'?: Linter.RuleEntry<[]>
|
|
37
|
+
/**
|
|
38
|
+
* Prevent Client Components from being async functions.
|
|
39
|
+
* @see https://nextjs.org/docs/messages/no-async-client-component
|
|
40
|
+
*/
|
|
41
|
+
'@next/next/no-async-client-component'?: Linter.RuleEntry<[]>
|
|
42
|
+
/**
|
|
43
|
+
* Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js`.
|
|
44
|
+
* @see https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
|
|
45
|
+
*/
|
|
46
|
+
'@next/next/no-before-interactive-script-outside-document'?: Linter.RuleEntry<[]>
|
|
47
|
+
/**
|
|
48
|
+
* Prevent manual stylesheet tags.
|
|
49
|
+
* @see https://nextjs.org/docs/messages/no-css-tags
|
|
50
|
+
*/
|
|
51
|
+
'@next/next/no-css-tags'?: Linter.RuleEntry<[]>
|
|
52
|
+
/**
|
|
53
|
+
* Prevent importing `next/document` outside of `pages/_document.js`.
|
|
54
|
+
* @see https://nextjs.org/docs/messages/no-document-import-in-page
|
|
55
|
+
*/
|
|
56
|
+
'@next/next/no-document-import-in-page'?: Linter.RuleEntry<[]>
|
|
57
|
+
/**
|
|
58
|
+
* Prevent duplicate usage of `<Head>` in `pages/_document.js`.
|
|
59
|
+
* @see https://nextjs.org/docs/messages/no-duplicate-head
|
|
60
|
+
*/
|
|
61
|
+
'@next/next/no-duplicate-head'?: Linter.RuleEntry<[]>
|
|
62
|
+
/**
|
|
63
|
+
* Prevent usage of `<head>` element.
|
|
64
|
+
* @see https://nextjs.org/docs/messages/no-head-element
|
|
65
|
+
*/
|
|
66
|
+
'@next/next/no-head-element'?: Linter.RuleEntry<[]>
|
|
67
|
+
/**
|
|
68
|
+
* Prevent usage of `next/head` in `pages/_document.js`.
|
|
69
|
+
* @see https://nextjs.org/docs/messages/no-head-import-in-document
|
|
70
|
+
*/
|
|
71
|
+
'@next/next/no-head-import-in-document'?: Linter.RuleEntry<[]>
|
|
72
|
+
/**
|
|
73
|
+
* Prevent usage of `<a>` elements to navigate to internal Next.js pages.
|
|
74
|
+
* @see https://nextjs.org/docs/messages/no-html-link-for-pages
|
|
75
|
+
*/
|
|
76
|
+
'@next/next/no-html-link-for-pages'?: Linter.RuleEntry<NextNextNoHtmlLinkForPages>
|
|
77
|
+
/**
|
|
78
|
+
* Prevent usage of `<img>` element due to slower LCP and higher bandwidth.
|
|
79
|
+
* @see https://nextjs.org/docs/messages/no-img-element
|
|
80
|
+
*/
|
|
81
|
+
'@next/next/no-img-element'?: Linter.RuleEntry<[]>
|
|
82
|
+
/**
|
|
83
|
+
* Prevent page-only custom fonts.
|
|
84
|
+
* @see https://nextjs.org/docs/messages/no-page-custom-font
|
|
85
|
+
*/
|
|
86
|
+
'@next/next/no-page-custom-font'?: Linter.RuleEntry<[]>
|
|
87
|
+
/**
|
|
88
|
+
* Prevent usage of `next/script` in `next/head` component.
|
|
89
|
+
* @see https://nextjs.org/docs/messages/no-script-component-in-head
|
|
90
|
+
*/
|
|
91
|
+
'@next/next/no-script-component-in-head'?: Linter.RuleEntry<[]>
|
|
92
|
+
/**
|
|
93
|
+
* Prevent usage of `styled-jsx` in `pages/_document.js`.
|
|
94
|
+
* @see https://nextjs.org/docs/messages/no-styled-jsx-in-document
|
|
95
|
+
*/
|
|
96
|
+
'@next/next/no-styled-jsx-in-document'?: Linter.RuleEntry<[]>
|
|
97
|
+
/**
|
|
98
|
+
* Prevent synchronous scripts.
|
|
99
|
+
* @see https://nextjs.org/docs/messages/no-sync-scripts
|
|
100
|
+
*/
|
|
101
|
+
'@next/next/no-sync-scripts'?: Linter.RuleEntry<[]>
|
|
102
|
+
/**
|
|
103
|
+
* Prevent usage of `<title>` with `Head` component from `next/document`.
|
|
104
|
+
* @see https://nextjs.org/docs/messages/no-title-in-document-head
|
|
105
|
+
*/
|
|
106
|
+
'@next/next/no-title-in-document-head'?: Linter.RuleEntry<[]>
|
|
107
|
+
/**
|
|
108
|
+
* Prevent common typos in Next.js data fetching functions.
|
|
109
|
+
*/
|
|
110
|
+
'@next/next/no-typos'?: Linter.RuleEntry<[]>
|
|
111
|
+
/**
|
|
112
|
+
* Prevent duplicate polyfills from Polyfill.io.
|
|
113
|
+
* @see https://nextjs.org/docs/messages/no-unwanted-polyfillio
|
|
114
|
+
*/
|
|
115
|
+
'@next/next/no-unwanted-polyfillio'?: Linter.RuleEntry<[]>
|
|
12
116
|
/**
|
|
13
117
|
* Require that function overload signatures be consecutive
|
|
14
118
|
* @see https://typescript-eslint.io/rules/adjacent-overload-signatures
|
|
@@ -2257,110 +2361,6 @@ export interface Rules {
|
|
|
2257
2361
|
* @deprecated
|
|
2258
2362
|
*/
|
|
2259
2363
|
'newline-per-chained-call'?: Linter.RuleEntry<NewlinePerChainedCall>
|
|
2260
|
-
/**
|
|
2261
|
-
* Enforce font-display behavior with Google Fonts.
|
|
2262
|
-
* @see https://nextjs.org/docs/messages/google-font-display
|
|
2263
|
-
*/
|
|
2264
|
-
'next/google-font-display'?: Linter.RuleEntry<[]>
|
|
2265
|
-
/**
|
|
2266
|
-
* Ensure `preconnect` is used with Google Fonts.
|
|
2267
|
-
* @see https://nextjs.org/docs/messages/google-font-preconnect
|
|
2268
|
-
*/
|
|
2269
|
-
'next/google-font-preconnect'?: Linter.RuleEntry<[]>
|
|
2270
|
-
/**
|
|
2271
|
-
* Enforce `id` attribute on `next/script` components with inline content.
|
|
2272
|
-
* @see https://nextjs.org/docs/messages/inline-script-id
|
|
2273
|
-
*/
|
|
2274
|
-
'next/inline-script-id'?: Linter.RuleEntry<[]>
|
|
2275
|
-
/**
|
|
2276
|
-
* Prefer `next/script` component when using the inline script for Google Analytics.
|
|
2277
|
-
* @see https://nextjs.org/docs/messages/next-script-for-ga
|
|
2278
|
-
*/
|
|
2279
|
-
'next/next-script-for-ga'?: Linter.RuleEntry<[]>
|
|
2280
|
-
/**
|
|
2281
|
-
* Prevent assignment to the `module` variable.
|
|
2282
|
-
* @see https://nextjs.org/docs/messages/no-assign-module-variable
|
|
2283
|
-
*/
|
|
2284
|
-
'next/no-assign-module-variable'?: Linter.RuleEntry<[]>
|
|
2285
|
-
/**
|
|
2286
|
-
* Prevent Client Components from being async functions.
|
|
2287
|
-
* @see https://nextjs.org/docs/messages/no-async-client-component
|
|
2288
|
-
*/
|
|
2289
|
-
'next/no-async-client-component'?: Linter.RuleEntry<[]>
|
|
2290
|
-
/**
|
|
2291
|
-
* Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js`.
|
|
2292
|
-
* @see https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
|
|
2293
|
-
*/
|
|
2294
|
-
'next/no-before-interactive-script-outside-document'?: Linter.RuleEntry<[]>
|
|
2295
|
-
/**
|
|
2296
|
-
* Prevent manual stylesheet tags.
|
|
2297
|
-
* @see https://nextjs.org/docs/messages/no-css-tags
|
|
2298
|
-
*/
|
|
2299
|
-
'next/no-css-tags'?: Linter.RuleEntry<[]>
|
|
2300
|
-
/**
|
|
2301
|
-
* Prevent importing `next/document` outside of `pages/_document.js`.
|
|
2302
|
-
* @see https://nextjs.org/docs/messages/no-document-import-in-page
|
|
2303
|
-
*/
|
|
2304
|
-
'next/no-document-import-in-page'?: Linter.RuleEntry<[]>
|
|
2305
|
-
/**
|
|
2306
|
-
* Prevent duplicate usage of `<Head>` in `pages/_document.js`.
|
|
2307
|
-
* @see https://nextjs.org/docs/messages/no-duplicate-head
|
|
2308
|
-
*/
|
|
2309
|
-
'next/no-duplicate-head'?: Linter.RuleEntry<[]>
|
|
2310
|
-
/**
|
|
2311
|
-
* Prevent usage of `<head>` element.
|
|
2312
|
-
* @see https://nextjs.org/docs/messages/no-head-element
|
|
2313
|
-
*/
|
|
2314
|
-
'next/no-head-element'?: Linter.RuleEntry<[]>
|
|
2315
|
-
/**
|
|
2316
|
-
* Prevent usage of `next/head` in `pages/_document.js`.
|
|
2317
|
-
* @see https://nextjs.org/docs/messages/no-head-import-in-document
|
|
2318
|
-
*/
|
|
2319
|
-
'next/no-head-import-in-document'?: Linter.RuleEntry<[]>
|
|
2320
|
-
/**
|
|
2321
|
-
* Prevent usage of `<a>` elements to navigate to internal Next.js pages.
|
|
2322
|
-
* @see https://nextjs.org/docs/messages/no-html-link-for-pages
|
|
2323
|
-
*/
|
|
2324
|
-
'next/no-html-link-for-pages'?: Linter.RuleEntry<NextNoHtmlLinkForPages>
|
|
2325
|
-
/**
|
|
2326
|
-
* Prevent usage of `<img>` element due to slower LCP and higher bandwidth.
|
|
2327
|
-
* @see https://nextjs.org/docs/messages/no-img-element
|
|
2328
|
-
*/
|
|
2329
|
-
'next/no-img-element'?: Linter.RuleEntry<[]>
|
|
2330
|
-
/**
|
|
2331
|
-
* Prevent page-only custom fonts.
|
|
2332
|
-
* @see https://nextjs.org/docs/messages/no-page-custom-font
|
|
2333
|
-
*/
|
|
2334
|
-
'next/no-page-custom-font'?: Linter.RuleEntry<[]>
|
|
2335
|
-
/**
|
|
2336
|
-
* Prevent usage of `next/script` in `next/head` component.
|
|
2337
|
-
* @see https://nextjs.org/docs/messages/no-script-component-in-head
|
|
2338
|
-
*/
|
|
2339
|
-
'next/no-script-component-in-head'?: Linter.RuleEntry<[]>
|
|
2340
|
-
/**
|
|
2341
|
-
* Prevent usage of `styled-jsx` in `pages/_document.js`.
|
|
2342
|
-
* @see https://nextjs.org/docs/messages/no-styled-jsx-in-document
|
|
2343
|
-
*/
|
|
2344
|
-
'next/no-styled-jsx-in-document'?: Linter.RuleEntry<[]>
|
|
2345
|
-
/**
|
|
2346
|
-
* Prevent synchronous scripts.
|
|
2347
|
-
* @see https://nextjs.org/docs/messages/no-sync-scripts
|
|
2348
|
-
*/
|
|
2349
|
-
'next/no-sync-scripts'?: Linter.RuleEntry<[]>
|
|
2350
|
-
/**
|
|
2351
|
-
* Prevent usage of `<title>` with `Head` component from `next/document`.
|
|
2352
|
-
* @see https://nextjs.org/docs/messages/no-title-in-document-head
|
|
2353
|
-
*/
|
|
2354
|
-
'next/no-title-in-document-head'?: Linter.RuleEntry<[]>
|
|
2355
|
-
/**
|
|
2356
|
-
* Prevent common typos in Next.js data fetching functions.
|
|
2357
|
-
*/
|
|
2358
|
-
'next/no-typos'?: Linter.RuleEntry<[]>
|
|
2359
|
-
/**
|
|
2360
|
-
* Prevent duplicate polyfills from Polyfill.io.
|
|
2361
|
-
* @see https://nextjs.org/docs/messages/no-unwanted-polyfillio
|
|
2362
|
-
*/
|
|
2363
|
-
'next/no-unwanted-polyfillio'?: Linter.RuleEntry<[]>
|
|
2364
2364
|
/**
|
|
2365
2365
|
* Disallow the use of `alert`, `confirm`, and `prompt`
|
|
2366
2366
|
* @see https://eslint.org/docs/latest/rules/no-alert
|
|
@@ -6132,6 +6132,8 @@ export interface Rules {
|
|
|
6132
6132
|
/* ======= Declarations ======= */
|
|
6133
6133
|
// ----- @bfra.me/missing-module-for-config -----
|
|
6134
6134
|
type BfraMeMissingModuleForConfig = []|[string[]]
|
|
6135
|
+
// ----- @next/next/no-html-link-for-pages -----
|
|
6136
|
+
type NextNextNoHtmlLinkForPages = []|[(string | string[])]
|
|
6135
6137
|
// ----- @typescript-eslint/array-type -----
|
|
6136
6138
|
type TypescriptEslintArrayType = []|[{
|
|
6137
6139
|
|
|
@@ -9232,8 +9234,6 @@ type NewlineAfterVar = []|[("never" | "always")]
|
|
|
9232
9234
|
type NewlinePerChainedCall = []|[{
|
|
9233
9235
|
ignoreChainWithDepth?: number
|
|
9234
9236
|
}]
|
|
9235
|
-
// ----- next/no-html-link-for-pages -----
|
|
9236
|
-
type NextNoHtmlLinkForPages = []|[(string | string[])]
|
|
9237
9237
|
// ----- no-bitwise -----
|
|
9238
9238
|
type NoBitwise = []|[{
|
|
9239
9239
|
allow?: ("^" | "|" | "&" | "<<" | ">>" | ">>>" | "^=" | "|=" | "&=" | "<<=" | ">>=" | ">>>=" | "~")[]
|