Unverified Commit 6feaddf7 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

Remove unused `eslint-disable` directives (#84797)

Co-authored-by: 's avatarHendrik Liebau <mail@hendrik-liebau.de>
parent 91e660d2
/* eslint-disable import/no-extraneous-dependencies */
import { execSync } from 'node:child_process' import { execSync } from 'node:child_process'
import { join } from 'node:path' import { join } from 'node:path'
import { rmSync } from 'node:fs' import { rmSync } from 'node:fs'
......
...@@ -40,7 +40,6 @@ function minDistance(a, b) { ...@@ -40,7 +40,6 @@ function minDistance(a, b) {
return previousRow[previousRow.length - 1] return previousRow[previousRow.length - 1]
} }
/* eslint-disable eslint-plugin/require-meta-docs-url */
export default defineRule({ export default defineRule({
meta: { meta: {
docs: { docs: {
......
// eslint-disable-next-line import/no-extraneous-dependencies
// @ts-expect-error File exists // @ts-expect-error File exists
import asyncRetry from 'next/dist/compiled/async-retry' import asyncRetry from 'next/dist/compiled/async-retry'
......
// @ts-ignore // @ts-ignore
// eslint-disable-next-line import/no-extraneous-dependencies
let fontFromBuffer: any let fontFromBuffer: any
try { try {
// eslint-disable-next-line @next/internal/typechecked-require -- Module created during build. // eslint-disable-next-line @next/internal/typechecked-require -- Module created during build.
......
/* eslint-disable no-extend-native, no-sequences */ /* eslint-disable no-extend-native */
// Contains polyfills for methods missing after browser version(s): // Contains polyfills for methods missing after browser version(s):
// Edge 16, Firefox 60, Chrome 61, Safari 10.1 // Edge 16, Firefox 60, Chrome 61, Safari 10.1
......
...@@ -5,8 +5,6 @@ import type { NextBabelLoaderOptions } from './babel/loader/types' ...@@ -5,8 +5,6 @@ import type { NextBabelLoaderOptions } from './babel/loader/types'
function getReactCompiler() { function getReactCompiler() {
try { try {
// It's in peerDependencies, so it should be available
// eslint-disable-next-line import/no-extraneous-dependencies
return require.resolve('babel-plugin-react-compiler') return require.resolve('babel-plugin-react-compiler')
} catch { } catch {
throw new Error( throw new Error(
......
/* eslint-disable @typescript-eslint/no-use-before-define */
import path from 'path' import path from 'path'
import { pathToFileURL } from 'url' import { pathToFileURL } from 'url'
import { arch, platform } from 'os' import { arch, platform } from 'os'
......
...@@ -205,9 +205,7 @@ function getBaseSWCOptions({ ...@@ -205,9 +205,7 @@ function getBaseSWCOptions({
}, },
// Disable css-in-js libs (without client-only integration) transform on server layer for server components // Disable css-in-js libs (without client-only integration) transform on server layer for server components
...(!isReactServerLayer && { ...(!isReactServerLayer && {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
emotion: getEmotionOptions(compilerOptions?.emotion, development), emotion: getEmotionOptions(compilerOptions?.emotion, development),
// eslint-disable-next-line @typescript-eslint/no-use-before-define
styledComponents: getStyledComponentsOptions( styledComponents: getStyledComponentsOptions(
compilerOptions?.styledComponents, compilerOptions?.styledComponents,
development development
......
...@@ -32,7 +32,6 @@ function getModulesOptions(rawOptions: any, loaderContext: any) { ...@@ -32,7 +32,6 @@ function getModulesOptions(rawOptions: any, loaderContext: any) {
localIdentName: '[hash:base64]', localIdentName: '[hash:base64]',
localIdentContext: loaderContext.rootContext, localIdentContext: loaderContext.rootContext,
localIdentHashPrefix: '', localIdentHashPrefix: '',
// eslint-disable-next-line no-undefined
localIdentRegExp: undefined, localIdentRegExp: undefined,
namedExport: false, namedExport: false,
exportLocalsConvention: 'asIs', exportLocalsConvention: 'asIs',
...@@ -268,7 +267,6 @@ export default async function loader( ...@@ -268,7 +267,6 @@ export default async function loader(
const { ast } = meta const { ast } = meta
if (ast && ast.type === 'postcss') { if (ast && ast.type === 'postcss') {
// eslint-disable-next-line no-param-reassign
content = ast.root content = ast.root
loaderSpan.setAttribute('astUsed', 'true') loaderSpan.setAttribute('astUsed', 'true')
} }
......
...@@ -15,12 +15,10 @@ const plugin = (options: any = {}) => { ...@@ -15,12 +15,10 @@ const plugin = (options: any = {}) => {
const imports = new Map() const imports = new Map()
const tasks = [] const tasks = []
// eslint-disable-next-line guard-for-in
for (const url in icssImports) { for (const url in icssImports) {
const tokens = icssImports[url] const tokens = icssImports[url]
if (Object.keys(tokens).length === 0) { if (Object.keys(tokens).length === 0) {
// eslint-disable-next-line no-continue
continue continue
} }
...@@ -48,7 +46,6 @@ const plugin = (options: any = {}) => { ...@@ -48,7 +46,6 @@ const plugin = (options: any = {}) => {
return return
} }
// eslint-disable-next-line consistent-return
return { url: resolvedUrl, prefix, tokens } return { url: resolvedUrl, prefix, tokens }
} }
...@@ -61,7 +58,6 @@ const plugin = (options: any = {}) => { ...@@ -61,7 +58,6 @@ const plugin = (options: any = {}) => {
const item = results[index] const item = results[index]
if (!item) { if (!item) {
// eslint-disable-next-line no-continue
continue continue
} }
......
...@@ -122,7 +122,6 @@ function parseNode(atRule: any, key: any) { ...@@ -122,7 +122,6 @@ function parseNode(atRule: any, key: any) {
media = valueParser.stringify(mediaNodes).trim().toLowerCase() media = valueParser.stringify(mediaNodes).trim().toLowerCase()
} }
// eslint-disable-next-line consistent-return
return { atRule, prefix, url, media, isRequestable } return { atRule, prefix, url, media, isRequestable }
} }
...@@ -188,13 +187,11 @@ const plugin = (options: any = {}) => { ...@@ -188,13 +187,11 @@ const plugin = (options: any = {}) => {
atRule.remove() atRule.remove()
// eslint-disable-next-line consistent-return
return { url: resolvedUrl, media, prefix, isRequestable } return { url: resolvedUrl, media, prefix, isRequestable }
} }
atRule.remove() atRule.remove()
// eslint-disable-next-line consistent-return
return { url, media, prefix, isRequestable } return { url, media, prefix, isRequestable }
}) })
) )
...@@ -205,7 +202,6 @@ const plugin = (options: any = {}) => { ...@@ -205,7 +202,6 @@ const plugin = (options: any = {}) => {
const resolvedAtRule = resolvedAtRules[index] const resolvedAtRule = resolvedAtRules[index]
if (!resolvedAtRule) { if (!resolvedAtRule) {
// eslint-disable-next-line no-continue
continue continue
} }
...@@ -214,7 +210,6 @@ const plugin = (options: any = {}) => { ...@@ -214,7 +210,6 @@ const plugin = (options: any = {}) => {
if (!isRequestable) { if (!isRequestable) {
options.api.push({ url, media, index }) options.api.push({ url, media, index })
// eslint-disable-next-line no-continue
continue continue
} }
......
...@@ -26,13 +26,11 @@ function getWebpackIgnoreCommentValue(index: any, nodes: any, inBetween?: any) { ...@@ -26,13 +26,11 @@ function getWebpackIgnoreCommentValue(index: any, nodes: any, inBetween?: any) {
let prevValueNode = nodes[index - 1] let prevValueNode = nodes[index - 1]
if (!prevValueNode) { if (!prevValueNode) {
// eslint-disable-next-line consistent-return
return return
} }
if (prevValueNode.type === 'space') { if (prevValueNode.type === 'space') {
if (!nodes[index - 2]) { if (!nodes[index - 2]) {
// eslint-disable-next-line consistent-return
return return
} }
...@@ -40,7 +38,6 @@ function getWebpackIgnoreCommentValue(index: any, nodes: any, inBetween?: any) { ...@@ -40,7 +38,6 @@ function getWebpackIgnoreCommentValue(index: any, nodes: any, inBetween?: any) {
} }
if (prevValueNode.type !== 'comment') { if (prevValueNode.type !== 'comment') {
// eslint-disable-next-line consistent-return
return return
} }
...@@ -139,7 +136,6 @@ function parseDeclaration( ...@@ -139,7 +136,6 @@ function parseDeclaration(
needIgnore needIgnore
) { ) {
if (needIgnore) { if (needIgnore) {
// eslint-disable-next-line no-undefined
needIgnore = undefined needIgnore = undefined
} }
...@@ -155,7 +151,6 @@ function parseDeclaration( ...@@ -155,7 +151,6 @@ function parseDeclaration(
if ( if (
!shouldHandleURL(url, declaration, result, isSupportDataURLInNewURL) !shouldHandleURL(url, declaration, result, isSupportDataURLInNewURL)
) { ) {
// eslint-disable-next-line consistent-return
return false return false
} }
...@@ -176,7 +171,6 @@ function parseDeclaration( ...@@ -176,7 +171,6 @@ function parseDeclaration(
needQuotes: false, needQuotes: false,
}) })
// eslint-disable-next-line consistent-return
return false return false
} else if (isImageSetFunc.test(valueNode.value)) { } else if (isImageSetFunc.test(valueNode.value)) {
for (const [innerIndex, nNode] of valueNode.nodes.entries()) { for (const [innerIndex, nNode] of valueNode.nodes.entries()) {
...@@ -190,11 +184,9 @@ function parseDeclaration( ...@@ -190,11 +184,9 @@ function parseDeclaration(
needIgnore needIgnore
) { ) {
if (needIgnore) { if (needIgnore) {
// eslint-disable-next-line no-undefined
needIgnore = undefined needIgnore = undefined
} }
// eslint-disable-next-line no-continue
continue continue
} }
...@@ -209,7 +201,6 @@ function parseDeclaration( ...@@ -209,7 +201,6 @@ function parseDeclaration(
if ( if (
!shouldHandleURL(url, declaration, result, isSupportDataURLInNewURL) !shouldHandleURL(url, declaration, result, isSupportDataURLInNewURL)
) { ) {
// eslint-disable-next-line consistent-return
return false return false
} }
...@@ -237,11 +228,9 @@ function parseDeclaration( ...@@ -237,11 +228,9 @@ function parseDeclaration(
needIgnore needIgnore
) { ) {
if (needIgnore) { if (needIgnore) {
// eslint-disable-next-line no-undefined
needIgnore = undefined needIgnore = undefined
} }
// eslint-disable-next-line no-continue
continue continue
} }
...@@ -251,7 +240,6 @@ function parseDeclaration( ...@@ -251,7 +240,6 @@ function parseDeclaration(
if ( if (
!shouldHandleURL(url, declaration, result, isSupportDataURLInNewURL) !shouldHandleURL(url, declaration, result, isSupportDataURLInNewURL)
) { ) {
// eslint-disable-next-line consistent-return
return false return false
} }
...@@ -275,12 +263,10 @@ function parseDeclaration( ...@@ -275,12 +263,10 @@ function parseDeclaration(
} }
// Do not traverse inside `image-set` // Do not traverse inside `image-set`
// eslint-disable-next-line consistent-return
return false return false
} }
}) })
// eslint-disable-next-line consistent-return
return parsedURLs return parsedURLs
} }
...@@ -319,13 +305,11 @@ const plugin = (options: any = {}) => { ...@@ -319,13 +305,11 @@ const plugin = (options: any = {}) => {
const needKeep = await options.filter(url) const needKeep = await options.filter(url)
if (!needKeep) { if (!needKeep) {
// eslint-disable-next-line consistent-return
return return
} }
} }
if (isDataUrl(url)) { if (isDataUrl(url)) {
// eslint-disable-next-line consistent-return
return parsedDeclaration return parsedDeclaration
} }
...@@ -343,7 +327,6 @@ const plugin = (options: any = {}) => { ...@@ -343,7 +327,6 @@ const plugin = (options: any = {}) => {
) )
if (!needToResolveURL) { if (!needToResolveURL) {
// eslint-disable-next-line consistent-return
return { ...parsedDeclaration, url: request, hash } return { ...parsedDeclaration, url: request, hash }
} }
...@@ -353,11 +336,9 @@ const plugin = (options: any = {}) => { ...@@ -353,11 +336,9 @@ const plugin = (options: any = {}) => {
]) ])
if (!resolvedUrl) { if (!resolvedUrl) {
// eslint-disable-next-line consistent-return
return return
} }
// eslint-disable-next-line consistent-return
return { ...parsedDeclaration, url: resolvedUrl, hash } return { ...parsedDeclaration, url: resolvedUrl, hash }
}) })
) )
...@@ -375,7 +356,6 @@ const plugin = (options: any = {}) => { ...@@ -375,7 +356,6 @@ const plugin = (options: any = {}) => {
const item = resolvedDeclarations[index] const item = resolvedDeclarations[index]
if (!item) { if (!item) {
// eslint-disable-next-line no-continue
continue continue
} }
...@@ -426,11 +406,8 @@ const plugin = (options: any = {}) => { ...@@ -426,11 +406,8 @@ const plugin = (options: any = {}) => {
}) })
} }
// eslint-disable-next-line no-param-reassign
item.node.type = 'word' item.node.type = 'word'
// eslint-disable-next-line no-param-reassign
item.node.value = replacementName item.node.value = replacementName
// eslint-disable-next-line no-param-reassign
item.declaration.value = item.parsed.toString() item.declaration.value = item.parsed.toString()
} }
}, },
......
...@@ -3,13 +3,11 @@ ...@@ -3,13 +3,11 @@
Author Tobias Koppers @sokra Author Tobias Koppers @sokra
*/ */
// css base code, injected by the css-loader // css base code, injected by the css-loader
// eslint-disable-next-line func-names
module.exports = function (useSourceMap: any) { module.exports = function (useSourceMap: any) {
var list: any[] = [] // return the list of modules as css string var list: any[] = [] // return the list of modules as css string
list.toString = function toString() { list.toString = function toString() {
return this.map(function (item) { return this.map(function (item) {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
var content = cssWithMappingToString(item, useSourceMap) var content = cssWithMappingToString(item, useSourceMap)
if (item[2]) { if (item[2]) {
...@@ -19,12 +17,10 @@ module.exports = function (useSourceMap: any) { ...@@ -19,12 +17,10 @@ module.exports = function (useSourceMap: any) {
return content return content
}).join('') }).join('')
} // import a list of modules into the list } // import a list of modules into the list
// eslint-disable-next-line func-names
// @ts-expect-error TODO: fix type // @ts-expect-error TODO: fix type
list.i = function (modules: any, mediaQuery: any, dedupe: any) { list.i = function (modules: any, mediaQuery: any, dedupe: any) {
if (typeof modules === 'string') { if (typeof modules === 'string') {
// eslint-disable-next-line no-param-reassign
modules = [[null, modules, '']] modules = [[null, modules, '']]
} }
...@@ -32,7 +28,6 @@ module.exports = function (useSourceMap: any) { ...@@ -32,7 +28,6 @@ module.exports = function (useSourceMap: any) {
if (dedupe) { if (dedupe) {
for (var i = 0; i < this.length; i++) { for (var i = 0; i < this.length; i++) {
// eslint-disable-next-line prefer-destructuring
var id = this[i][0] var id = this[i][0]
if (id != null) { if (id != null) {
...@@ -45,7 +40,6 @@ module.exports = function (useSourceMap: any) { ...@@ -45,7 +40,6 @@ module.exports = function (useSourceMap: any) {
var item: any = [].concat(modules[_i]) var item: any = [].concat(modules[_i])
if (dedupe && alreadyImportedModules[item[0]]) { if (dedupe && alreadyImportedModules[item[0]]) {
// eslint-disable-next-line no-continue
continue continue
} }
...@@ -65,7 +59,7 @@ module.exports = function (useSourceMap: any) { ...@@ -65,7 +59,7 @@ module.exports = function (useSourceMap: any) {
} }
function cssWithMappingToString(item: any, useSourceMap: any) { function cssWithMappingToString(item: any, useSourceMap: any) {
var content = item[1] || '' // eslint-disable-next-line prefer-destructuring var content = item[1] || ''
var cssMapping = item[3] var cssMapping = item[3]
...@@ -74,7 +68,6 @@ function cssWithMappingToString(item: any, useSourceMap: any) { ...@@ -74,7 +68,6 @@ function cssWithMappingToString(item: any, useSourceMap: any) {
} }
if (useSourceMap && typeof btoa === 'function') { if (useSourceMap && typeof btoa === 'function') {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
var sourceMapping = toComment(cssMapping) var sourceMapping = toComment(cssMapping)
var sourceURLs = cssMapping.sources.map(function (source: string) { var sourceURLs = cssMapping.sources.map(function (source: string) {
return '/*# sourceURL=' return '/*# sourceURL='
...@@ -88,7 +81,6 @@ function cssWithMappingToString(item: any, useSourceMap: any) { ...@@ -88,7 +81,6 @@ function cssWithMappingToString(item: any, useSourceMap: any) {
} // Adapted from convert-source-map (MIT) } // Adapted from convert-source-map (MIT)
function toComment(sourceMap: any) { function toComment(sourceMap: any) {
// eslint-disable-next-line no-undef
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))))
var data = var data =
'sourceMappingURL=data:application/json;charset=utf-8;base64,'.concat( 'sourceMappingURL=data:application/json;charset=utf-8;base64,'.concat(
......
module.exports = function (url: any, options: any) { module.exports = function (url: any, options: any) {
if (!options) { if (!options) {
// eslint-disable-next-line no-param-reassign
options = {} options = {}
} // eslint-disable-next-line no-underscore-dangle, no-param-reassign }
url = url && url.__esModule ? url.default : url url = url && url.__esModule ? url.default : url
...@@ -11,12 +10,10 @@ module.exports = function (url: any, options: any) { ...@@ -11,12 +10,10 @@ module.exports = function (url: any, options: any) {
} // If url is already wrapped in quotes, remove them } // If url is already wrapped in quotes, remove them
if (/^['"].*['"]$/.test(url)) { if (/^['"].*['"]$/.test(url)) {
// eslint-disable-next-line no-param-reassign
url = url.slice(1, -1) url = url.slice(1, -1)
} }
if (options.hash) { if (options.hash) {
// eslint-disable-next-line no-param-reassign
url += options.hash url += options.hash
} // Should url be wrapped? } // Should url be wrapped?
// See https://drafts.csswg.org/css-values-3/#urls // See https://drafts.csswg.org/css-values-3/#urls
......
...@@ -24,7 +24,6 @@ function unescape(str: string) { ...@@ -24,7 +24,6 @@ function unescape(str: string) {
return str.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => { return str.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => {
const high = (`0x${escaped}` as any) - 0x10000 const high = (`0x${escaped}` as any) - 0x10000
/* eslint-disable line-comment-position */
// NaN means non-codepoint // NaN means non-codepoint
// Workaround erroneous numeric interpretation of +"0x" // Workaround erroneous numeric interpretation of +"0x"
// eslint-disable-next-line no-self-compare // eslint-disable-next-line no-self-compare
...@@ -34,9 +33,7 @@ function unescape(str: string) { ...@@ -34,9 +33,7 @@ function unescape(str: string) {
? // BMP codepoint ? // BMP codepoint
String.fromCharCode(high + 0x10000) String.fromCharCode(high + 0x10000)
: // Supplemental Plane codepoint (surrogate pair) : // Supplemental Plane codepoint (surrogate pair)
// eslint-disable-next-line no-bitwise
String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00) String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00)
/* eslint-enable line-comment-position */
}) })
} }
...@@ -63,7 +60,6 @@ function normalizeUrl(url: string, isStringValue: boolean) { ...@@ -63,7 +60,6 @@ function normalizeUrl(url: string, isStringValue: boolean) {
normalizedUrl = unescape(normalizedUrl) normalizedUrl = unescape(normalizedUrl)
// eslint-disable-next-line @typescript-eslint/no-use-before-define
if (isDataUrl(url)) { if (isDataUrl(url)) {
return fixedEncodeURIComponent(normalizedUrl) return fixedEncodeURIComponent(normalizedUrl)
} }
......
...@@ -36,7 +36,6 @@ module.exports = (url: any, options: any) => { ...@@ -36,7 +36,6 @@ module.exports = (url: any, options: any) => {
if (typeof options.attributes.nonce === 'undefined') { if (typeof options.attributes.nonce === 'undefined') {
const nonce = const nonce =
// eslint-disable-next-line no-undef
typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null
if (nonce) { if (nonce) {
......
...@@ -86,7 +86,6 @@ function modulesToDom(list: any, options: any) { ...@@ -86,7 +86,6 @@ function modulesToDom(list: any, options: any) {
} else { } else {
stylesInDom.push({ stylesInDom.push({
identifier: identifier, identifier: identifier,
// eslint-disable-next-line @typescript-eslint/no-use-before-define
updater: addStyle(obj, options), updater: addStyle(obj, options),
references: 1, references: 1,
}) })
...@@ -104,7 +103,6 @@ function insertStyleElement(options: any) { ...@@ -104,7 +103,6 @@ function insertStyleElement(options: any) {
if (typeof attributes.nonce === 'undefined') { if (typeof attributes.nonce === 'undefined') {
const nonce = const nonce =
// eslint-disable-next-line no-undef
typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null
if (nonce) { if (nonce) {
......
...@@ -7,7 +7,6 @@ function isEqualLocals(a: any, b: any, isNamedExport: any) { ...@@ -7,7 +7,6 @@ function isEqualLocals(a: any, b: any, isNamedExport: any) {
for (p in a) { for (p in a) {
if (isNamedExport && p === 'default') { if (isNamedExport && p === 'default') {
// eslint-disable-next-line no-continue
continue continue
} }
...@@ -18,7 +17,6 @@ function isEqualLocals(a: any, b: any, isNamedExport: any) { ...@@ -18,7 +17,6 @@ function isEqualLocals(a: any, b: any, isNamedExport: any) {
for (p in b) { for (p in b) {
if (isNamedExport && p === 'default') { if (isNamedExport && p === 'default') {
// eslint-disable-next-line no-continue
continue continue
} }
......
...@@ -112,7 +112,6 @@ export default async function loader( ...@@ -112,7 +112,6 @@ export default async function loader(
} }
} }
// eslint-disable-next-line no-undefined
let map = result.map ? result.map.toJSON() : undefined let map = result.map ? result.map.toJSON() : undefined
if (map && useSourceMap) { if (map && useSourceMap) {
......
...@@ -60,13 +60,10 @@ function normalizeSourceMapAfterPostcss(map: any, resourceContext: string) { ...@@ -60,13 +60,10 @@ function normalizeSourceMapAfterPostcss(map: any, resourceContext: string) {
// result.map.file is an optional property that provides the output filename. // result.map.file is an optional property that provides the output filename.
// Since we don't know the final filename in the webpack build chain yet, it makes no sense to have it. // Since we don't know the final filename in the webpack build chain yet, it makes no sense to have it.
// eslint-disable-next-line no-param-reassign
delete newMap.file delete newMap.file
// eslint-disable-next-line no-param-reassign
newMap.sourceRoot = '' newMap.sourceRoot = ''
// eslint-disable-next-line no-param-reassign
newMap.sources = newMap.sources.map((source: string) => { newMap.sources = newMap.sources.map((source: string) => {
if (source.startsWith('<')) { if (source.startsWith('<')) {
return source return source
......
...@@ -65,13 +65,10 @@ export default async function resolveUrlLoader( ...@@ -65,13 +65,10 @@ export default async function resolveUrlLoader(
inputSourceMap: sourceMap, inputSourceMap: sourceMap,
sourceMapConsumer: sourceMapConsumer, sourceMapConsumer: sourceMapConsumer,
}) })
// eslint-disable-next-line @typescript-eslint/no-use-before-define
.catch(onFailure) .catch(onFailure)
// eslint-disable-next-line @typescript-eslint/no-use-before-define
.then(onSuccess) .then(onSuccess)
function onFailure(error: Error) { function onFailure(error: Error) {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
callback(encodeError('CSS error', error)) callback(encodeError('CSS error', error))
} }
......
// TODO: Remove use of `any` type. Fix no-use-before-define violations. // TODO: Remove use of `any` type.
/* eslint-disable @typescript-eslint/no-use-before-define */
/* /*
The MIT License (MIT) The MIT License (MIT)
......
...@@ -38,7 +38,6 @@ export default function process( ...@@ -38,7 +38,6 @@ export default function process(
postcssPlugin.postcss = true postcssPlugin.postcss = true
// prepend file protocol to all sources to avoid problems with source map // prepend file protocol to all sources to avoid problems with source map
// eslint-disable-next-line @typescript-eslint/no-use-before-define
return postcss([postcssPlugin]) return postcss([postcssPlugin])
.process(sourceContent, { .process(sourceContent, {
from: prepend(sourceFile), from: prepend(sourceFile),
...@@ -61,7 +60,6 @@ export default function process( ...@@ -61,7 +60,6 @@ export default function process(
return { return {
postcssPlugin: 'postcss-resolve-url', postcssPlugin: 'postcss-resolve-url',
Once: function (root: any) { Once: function (root: any) {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
root.walkDecls(eachDeclaration) root.walkDecls(eachDeclaration)
}, },
} }
......
...@@ -66,9 +66,7 @@ function valueProcessor(filename: any, options: any) { ...@@ -66,9 +66,7 @@ function valueProcessor(filename: any, options: any) {
const split = unescaped.split(/([?#])/g), const split = unescaped.split(/([?#])/g),
uri = split[0], uri = split[0],
absolute = absolute =
// eslint-disable-next-line @typescript-eslint/no-use-before-define
(testIsRelative(uri) && join(uri, candidate)) || (testIsRelative(uri) && join(uri, candidate)) ||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
(testIsAbsolute(uri) && join(uri)), (testIsAbsolute(uri) && join(uri)),
query = options.keepQuery ? split.slice(1).join('') : '' query = options.keepQuery ? split.slice(1).join('') : ''
......
...@@ -75,11 +75,9 @@ export class MinifyPlugin { ...@@ -75,11 +75,9 @@ export class MinifyPlugin {
assetsList assetsList
.filter((name) => { .filter((name) => {
if ( if (
!ModuleFilenameHelpers.matchObject.bind( !ModuleFilenameHelpers.matchObject.bind(undefined, {
// eslint-disable-next-line no-undefined test: /\.[cm]?js(\?.*)?$/i,
undefined, })(name)
{ test: /\.[cm]?js(\?.*)?$/i }
)(name)
) { ) {
return false return false
} }
...@@ -123,7 +121,6 @@ export class MinifyPlugin { ...@@ -123,7 +121,6 @@ export class MinifyPlugin {
let initializedWorker: any let initializedWorker: any
// eslint-disable-next-line consistent-return
const getWorker = () => { const getWorker = () => {
return { return {
minify: async (options: { minify: async (options: {
...@@ -274,7 +271,6 @@ export class MinifyPlugin { ...@@ -274,7 +271,6 @@ export class MinifyPlugin {
.tap( .tap(
'minify-webpack-plugin', 'minify-webpack-plugin',
(minimized: any, { green, formatFlag }: any) => (minimized: any, { green, formatFlag }: any) =>
// eslint-disable-next-line no-undefined
minimized ? green(formatFlag('minimized')) : undefined minimized ? green(formatFlag('minimized')) : undefined
) )
}) })
......
/* eslint-disable import/no-extraneous-dependencies */
const loaderUtils = require('loader-utils') const loaderUtils = require('loader-utils')
loaderUtils.getOptions = function (context) { loaderUtils.getOptions = function (context) {
......
...@@ -3,10 +3,8 @@ exports.__esModule = true ...@@ -3,10 +3,8 @@ exports.__esModule = true
exports.default = undefined exports.default = undefined
if (process.env.NEXT_RSPACK) { if (process.env.NEXT_RSPACK) {
// eslint-disable-next-line
Object.assign(exports, getRspackCore()) Object.assign(exports, getRspackCore())
Object.assign(exports, { Object.assign(exports, {
// eslint-disable-next-line import/no-extraneous-dependencies
StringXor: require('./bundle5')().StringXor, StringXor: require('./bundle5')().StringXor,
}) })
} else if (process.env.NEXT_PRIVATE_LOCAL_WEBPACK) { } else if (process.env.NEXT_PRIVATE_LOCAL_WEBPACK) {
...@@ -40,7 +38,6 @@ if (process.env.NEXT_RSPACK) { ...@@ -40,7 +38,6 @@ if (process.env.NEXT_RSPACK) {
function getRspackCore() { function getRspackCore() {
try { try {
// eslint-disable-next-line import/no-extraneous-dependencies
return require('next-rspack/rspack-core') return require('next-rspack/rspack-core')
} catch (e) { } catch (e) {
if (e instanceof Error && 'code' in e && e.code === 'MODULE_NOT_FOUND') { if (e instanceof Error && 'code' in e && e.code === 'MODULE_NOT_FOUND') {
......
...@@ -403,7 +403,6 @@ export default function LinkComponent( ...@@ -403,7 +403,6 @@ export default function LinkComponent(
} }
} else { } else {
// TypeScript trick for type-guarding: // TypeScript trick for type-guarding:
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _: never = key const _: never = key
} }
}) })
...@@ -480,7 +479,6 @@ export default function LinkComponent( ...@@ -480,7 +479,6 @@ export default function LinkComponent(
} }
} else { } else {
// TypeScript trick for type-guarding: // TypeScript trick for type-guarding:
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _: never = key const _: never = key
} }
}) })
......
...@@ -10,29 +10,21 @@ declare const __webpack_require__: any ...@@ -10,29 +10,21 @@ declare const __webpack_require__: any
// I am keeping the process check explicit so this can be statically optimized // I am keeping the process check explicit so this can be statically optimized
if (process.env.NEXT_DEPLOYMENT_ID) { if (process.env.NEXT_DEPLOYMENT_ID) {
const suffix = getDeploymentIdQueryOrEmptyString() const suffix = getDeploymentIdQueryOrEmptyString()
// eslint-disable-next-line no-undef
const getChunkScriptFilename = __webpack_require__.u const getChunkScriptFilename = __webpack_require__.u
// eslint-disable-next-line no-undef
__webpack_require__.u = (...args: any[]) => __webpack_require__.u = (...args: any[]) =>
// We encode the chunk filename because our static server matches against and encoded // We encode the chunk filename because our static server matches against and encoded
// filename path. // filename path.
encodeURIPath(getChunkScriptFilename(...args)) + suffix encodeURIPath(getChunkScriptFilename(...args)) + suffix
// eslint-disable-next-line no-undef
const getChunkCssFilename = __webpack_require__.k const getChunkCssFilename = __webpack_require__.k
// eslint-disable-next-line no-undef
__webpack_require__.k = (...args: any[]) => __webpack_require__.k = (...args: any[]) =>
getChunkCssFilename(...args) + suffix getChunkCssFilename(...args) + suffix
// eslint-disable-next-line no-undef
const getMiniCssFilename = __webpack_require__.miniCssF const getMiniCssFilename = __webpack_require__.miniCssF
// eslint-disable-next-line no-undef
__webpack_require__.miniCssF = (...args: any[]) => __webpack_require__.miniCssF = (...args: any[]) =>
getMiniCssFilename(...args) + suffix getMiniCssFilename(...args) + suffix
} else { } else {
// eslint-disable-next-line no-undef
const getChunkScriptFilename = __webpack_require__.u const getChunkScriptFilename = __webpack_require__.u
// eslint-disable-next-line no-undef
__webpack_require__.u = (...args: any[]) => __webpack_require__.u = (...args: any[]) =>
// We encode the chunk filename because our static server matches against and encoded // We encode the chunk filename because our static server matches against and encoded
// filename path. // filename path.
......
...@@ -180,7 +180,6 @@ function Router({ ...@@ -180,7 +180,6 @@ function Router({
}, [canonicalUrl]) }, [canonicalUrl])
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line react-hooks/rules-of-hooks
const { cache, prefetchCache, tree } = state const { cache, prefetchCache, tree } = state
// This hook is in a conditional but that is ok because `process.env.NODE_ENV` never changes // This hook is in a conditional but that is ok because `process.env.NODE_ENV` never changes
......
...@@ -26,7 +26,6 @@ export function forbidden(): never { ...@@ -26,7 +26,6 @@ export function forbidden(): never {
) )
} }
// eslint-disable-next-line no-throw-literal
const error = new Error(DIGEST) as HTTPAccessFallbackError const error = new Error(DIGEST) as HTTPAccessFallbackError
;(error as HTTPAccessFallbackError).digest = DIGEST ;(error as HTTPAccessFallbackError).digest = DIGEST
throw error throw error
......
...@@ -21,7 +21,6 @@ import { ...@@ -21,7 +21,6 @@ import {
const DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};404` const DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};404`
export function notFound(): never { export function notFound(): never {
// eslint-disable-next-line no-throw-literal
const error = new Error(DIGEST) as HTTPAccessFallbackError const error = new Error(DIGEST) as HTTPAccessFallbackError
;(error as HTTPAccessFallbackError).digest = DIGEST ;(error as HTTPAccessFallbackError).digest = DIGEST
......
...@@ -27,7 +27,6 @@ export function unauthorized(): never { ...@@ -27,7 +27,6 @@ export function unauthorized(): never {
) )
} }
// eslint-disable-next-line no-throw-literal
const error = new Error(DIGEST) as HTTPAccessFallbackError const error = new Error(DIGEST) as HTTPAccessFallbackError
;(error as HTTPAccessFallbackError).digest = DIGEST ;(error as HTTPAccessFallbackError).digest = DIGEST
throw error throw error
......
// TODO: Remove use of `any` type. Fix no-use-before-define violations. // TODO: Remove use of `any` type.
/* eslint-disable @typescript-eslint/no-use-before-define */
/** /**
* MIT License * MIT License
* *
......
...@@ -209,7 +209,7 @@ export async function initialize(opts: { devClient?: any } = {}): Promise<{ ...@@ -209,7 +209,7 @@ export async function initialize(opts: { devClient?: any } = {}): Promise<{
const prefix: string = initialData.assetPrefix || '' const prefix: string = initialData.assetPrefix || ''
// With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time
// So, this is how we do it in the client side at runtime // So, this is how we do it in the client side at runtime
;(self as any).__next_set_public_path__(`${prefix}/_next/`) //eslint-disable-line ;(self as any).__next_set_public_path__(`${prefix}/_next/`)
asPath = getURL() asPath = getURL()
...@@ -303,8 +303,6 @@ function AppContainer({ ...@@ -303,8 +303,6 @@ function AppContainer({
return ( return (
<Container <Container
fn={(error) => fn={(error) =>
// TODO: Fix disabled eslint rule
// eslint-disable-next-line @typescript-eslint/no-use-before-define
renderError({ App: CachedApp, err: error }).catch((err) => renderError({ App: CachedApp, err: error }).catch((err) =>
console.error('Error rendering page: ', err) console.error('Error rendering page: ', err)
) )
...@@ -364,8 +362,6 @@ function renderError(renderErrorProps: RenderErrorProps): Promise<any> { ...@@ -364,8 +362,6 @@ function renderError(renderErrorProps: RenderErrorProps): Promise<any> {
// We need to render an empty <App> so that the `<ReactDevOverlay>` can // We need to render an empty <App> so that the `<ReactDevOverlay>` can
// render itself. // render itself.
// TODO: Fix disabled eslint rule
// eslint-disable-next-line @typescript-eslint/no-use-before-define
return doRender({ return doRender({
App: () => null, App: () => null,
props: {}, props: {},
...@@ -420,8 +416,6 @@ function renderError(renderErrorProps: RenderErrorProps): Promise<any> { ...@@ -420,8 +416,6 @@ function renderError(renderErrorProps: RenderErrorProps): Promise<any> {
? renderErrorProps.props ? renderErrorProps.props
: loadGetInitialProps(App, appCtx) : loadGetInitialProps(App, appCtx)
).then((initProps) => ).then((initProps) =>
// TODO: Fix disabled eslint rule
// eslint-disable-next-line @typescript-eslint/no-use-before-define
doRender({ doRender({
...renderErrorProps, ...renderErrorProps,
err, err,
......
...@@ -363,7 +363,6 @@ const Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>( ...@@ -363,7 +363,6 @@ const Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(
} }
} else { } else {
// TypeScript trick for type-guarding: // TypeScript trick for type-guarding:
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _: never = key const _: never = key
} }
}) })
...@@ -446,7 +445,6 @@ const Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>( ...@@ -446,7 +445,6 @@ const Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(
} }
} else { } else {
// TypeScript trick for type-guarding: // TypeScript trick for type-guarding:
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _: never = key const _: never = key
} }
}) })
......
// eslint-disable-next-line @typescript-eslint/no-unused-vars
declare const __webpack_require__: any declare const __webpack_require__: any
// eslint-disable-next-line @typescript-eslint/no-unused-vars
declare let __webpack_public_path__: string declare let __webpack_public_path__: string
import { getDeploymentIdQueryOrEmptyString } from '../build/deployment-id' import { getDeploymentIdQueryOrEmptyString } from '../build/deployment-id'
...@@ -9,30 +7,23 @@ import { getDeploymentIdQueryOrEmptyString } from '../build/deployment-id' ...@@ -9,30 +7,23 @@ import { getDeploymentIdQueryOrEmptyString } from '../build/deployment-id'
// I am keeping the process check explicit so this can be statically optimized // I am keeping the process check explicit so this can be statically optimized
if (process.env.NEXT_DEPLOYMENT_ID) { if (process.env.NEXT_DEPLOYMENT_ID) {
const suffix = getDeploymentIdQueryOrEmptyString() const suffix = getDeploymentIdQueryOrEmptyString()
// eslint-disable-next-line no-undef
const getChunkScriptFilename = __webpack_require__.u const getChunkScriptFilename = __webpack_require__.u
// eslint-disable-next-line no-undef
__webpack_require__.u = (...args: any[]) => __webpack_require__.u = (...args: any[]) =>
// We enode the chunk filename because our static server matches against and encoded // We enode the chunk filename because our static server matches against and encoded
// filename path. // filename path.
getChunkScriptFilename(...args) + suffix getChunkScriptFilename(...args) + suffix
// eslint-disable-next-line no-undef
const getChunkCssFilename = __webpack_require__.k const getChunkCssFilename = __webpack_require__.k
// eslint-disable-next-line no-undef
__webpack_require__.k = (...args: any[]) => __webpack_require__.k = (...args: any[]) =>
getChunkCssFilename(...args) + suffix getChunkCssFilename(...args) + suffix
// eslint-disable-next-line no-undef
const getMiniCssFilename = __webpack_require__.miniCssF const getMiniCssFilename = __webpack_require__.miniCssF
// eslint-disable-next-line no-undef
__webpack_require__.miniCssF = (...args: any[]) => __webpack_require__.miniCssF = (...args: any[]) =>
getMiniCssFilename(...args) + suffix getMiniCssFilename(...args) + suffix
} }
// Ignore the module ID transform in client. // Ignore the module ID transform in client.
;(self as any).__next_set_public_path__ = (path: string) => { ;(self as any).__next_set_public_path__ = (path: string) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
__webpack_public_path__ = path __webpack_public_path__ = path
} }
......
...@@ -3,10 +3,8 @@ exports.__esModule = true ...@@ -3,10 +3,8 @@ exports.__esModule = true
exports.default = undefined exports.default = undefined
if (process.env.NEXT_RSPACK) { if (process.env.NEXT_RSPACK) {
// eslint-disable-next-line
Object.assign(exports, getRspackCore()) Object.assign(exports, getRspackCore())
Object.assign(exports, { Object.assign(exports, {
// eslint-disable-next-line import/no-extraneous-dependencies
StringXor: require('./bundle5')().StringXor, StringXor: require('./bundle5')().StringXor,
}) })
} else if (process.env.NEXT_PRIVATE_LOCAL_WEBPACK) { } else if (process.env.NEXT_PRIVATE_LOCAL_WEBPACK) {
...@@ -40,7 +38,6 @@ if (process.env.NEXT_RSPACK) { ...@@ -40,7 +38,6 @@ if (process.env.NEXT_RSPACK) {
function getRspackCore() { function getRspackCore() {
try { try {
// eslint-disable-next-line import/no-extraneous-dependencies
return require('next-rspack/rspack-core') return require('next-rspack/rspack-core')
} catch (e) { } catch (e) {
if (e instanceof Error && 'code' in e && e.code === 'MODULE_NOT_FOUND') { if (e instanceof Error && 'code' in e && e.code === 'MODULE_NOT_FOUND') {
......
// eslint-disable-next-line import/no-extraneous-dependencies
import * as base from '@playwright/test' import * as base from '@playwright/test'
import type { NextFixture } from './next-fixture' import type { NextFixture } from './next-fixture'
import type { NextOptions, NextOptionsConfig } from './next-options' import type { NextOptions, NextOptionsConfig } from './next-options'
...@@ -9,7 +8,6 @@ import { defaultPlaywrightConfig } from './default-config' ...@@ -9,7 +8,6 @@ import { defaultPlaywrightConfig } from './default-config'
export { defaultPlaywrightConfig } export { defaultPlaywrightConfig }
// eslint-disable-next-line import/no-extraneous-dependencies
export * from '@playwright/test' export * from '@playwright/test'
// Export this second so it overrides the one from `@playwright/test` // Export this second so it overrides the one from `@playwright/test`
......
...@@ -7,7 +7,6 @@ import { Emitter } from 'strict-event-emitter' ...@@ -7,7 +7,6 @@ import { Emitter } from 'strict-event-emitter'
// eslint-disable-next-line import/no-extraneous-dependencies // eslint-disable-next-line import/no-extraneous-dependencies
export * from 'msw' export * from 'msw'
// eslint-disable-next-line import/no-extraneous-dependencies
export * from '@playwright/test' export * from '@playwright/test'
export type { NextFixture } export type { NextFixture }
export { defineConfig } export { defineConfig }
......
import type { TestInfo } from '@playwright/test' import type { TestInfo } from '@playwright/test'
// eslint-disable-next-line import/no-extraneous-dependencies
import { test } from '@playwright/test' import { test } from '@playwright/test'
export interface StepProps { export interface StepProps {
......
...@@ -262,7 +262,6 @@ export async function writeConfigurationDefaults( ...@@ -262,7 +262,6 @@ export async function writeConfigurationDefaults(
) )
} }
} else { } else {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _: never = check const _: never = check
} }
} }
......
import type { LRUCache } from '../server/lib/lru-cache' import type { LRUCache } from '../server/lib/lru-cache'
/* eslint-disable no-redeclare */
export function withPromiseCache<K, V>( export function withPromiseCache<K, V>(
cache: LRUCache<Promise<V>>, cache: LRUCache<Promise<V>>,
fn: (value: K) => Promise<V> fn: (value: K) => Promise<V>
......
...@@ -130,7 +130,6 @@ export const ResizeProvider = ({ value, children }: ResizeProviderProps) => { ...@@ -130,7 +130,6 @@ export const ResizeProvider = ({ value, children }: ResizeProviderProps) => {
}) })
useLayoutEffect(() => { useLayoutEffect(() => {
// eslint-disable-next-line react-hooks/rules-of-hooks -- eprh bug
fireInitialConstrainDimensions() fireInitialConstrainDimensions()
}, []) }, [])
......
...@@ -145,7 +145,6 @@ export const DevtoolMenu = ({ ...@@ -145,7 +145,6 @@ export const DevtoolMenu = ({
useLayoutEffect(() => { useLayoutEffect(() => {
menuRef.current?.focus() // allows keydown to be captured menuRef.current?.focus() // allows keydown to be captured
// eslint-disable-next-line react-hooks/rules-of-hooks -- eprh bug
fireInitialSelectMenuItem() fireInitialSelectMenuItem()
}, []) }, [])
......
...@@ -10,7 +10,6 @@ export { ...@@ -10,7 +10,6 @@ export {
// eslint-disable-next-line import/no-extraneous-dependencies // eslint-disable-next-line import/no-extraneous-dependencies
export { prerender } from 'react-server-dom-webpack/static' export { prerender } from 'react-server-dom-webpack/static'
// eslint-disable-next-line import/no-extraneous-dependencies
export { captureOwnerStack } from 'react' export { captureOwnerStack } from 'react'
export { default as LayoutRouter } from '../../client/components/layout-router' export { default as LayoutRouter } from '../../client/components/layout-router'
......
...@@ -193,7 +193,6 @@ interface EntryType { ...@@ -193,7 +193,6 @@ interface EntryType {
} }
// Shadowing check in ESLint does not account for enum // Shadowing check in ESLint does not account for enum
// eslint-disable-next-line no-shadow
export const enum EntryTypes { export const enum EntryTypes {
ENTRY, ENTRY,
CHILD_ENTRY, CHILD_ENTRY,
......
...@@ -542,7 +542,6 @@ export function hasEntrypointForKey( ...@@ -542,7 +542,6 @@ export function hasEntrypointForKey(
) )
default: { default: {
// validation that we covered all cases, this should never run. // validation that we covered all cases, this should never run.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _: never = type const _: never = type
return false return false
} }
......
...@@ -305,7 +305,6 @@ export async function initialize(opts: { ...@@ -305,7 +305,6 @@ export async function initialize(opts: {
await initResult?.requestHandler(req, res) await initResult?.requestHandler(req, res)
} catch (err) { } catch (err) {
if (err instanceof NoFallbackError) { if (err instanceof NoFallbackError) {
// eslint-disable-next-line
await handleRequest(handleIndex + 1) await handleRequest(handleIndex + 1)
return return
} }
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
**/ **/
// eslint typescript has a bug with TS enums // eslint typescript has a bug with TS enums
/* eslint-disable no-shadow */
enum BaseServerSpan { enum BaseServerSpan {
handleRequest = 'BaseServer.handleRequest', handleRequest = 'BaseServer.handleRequest',
......
...@@ -471,7 +471,6 @@ export function patchErrorInspectNodeJS( ...@@ -471,7 +471,6 @@ export function patchErrorInspectNodeJS(
errorConstructor.prepareStackTrace = prepareUnsourcemappedStackTrace errorConstructor.prepareStackTrace = prepareUnsourcemappedStackTrace
// @ts-expect-error -- TODO upstream types // @ts-expect-error -- TODO upstream types
// eslint-disable-next-line no-extend-native -- We're not extending but overriding.
errorConstructor.prototype[inspectSymbol] = function ( errorConstructor.prototype[inspectSymbol] = function (
depth: number, depth: number,
inspectOptions: util.InspectOptions, inspectOptions: util.InspectOptions,
...@@ -512,7 +511,6 @@ export function patchErrorInspectEdgeLite( ...@@ -512,7 +511,6 @@ export function patchErrorInspectEdgeLite(
errorConstructor.prepareStackTrace = prepareUnsourcemappedStackTrace errorConstructor.prepareStackTrace = prepareUnsourcemappedStackTrace
// @ts-expect-error -- TODO upstream types // @ts-expect-error -- TODO upstream types
// eslint-disable-next-line no-extend-native -- We're not extending but overriding.
errorConstructor.prototype[inspectSymbol] = function ({ errorConstructor.prototype[inspectSymbol] = function ({
format, format,
}: { }: {
......
/* eslint-disable no-redeclare */
import type { IncomingMessage } from 'http' import type { IncomingMessage } from 'http'
import type { ParsedUrlQuery } from 'querystring' import type { ParsedUrlQuery } from 'querystring'
import type { UrlWithParsedQuery } from 'url' import type { UrlWithParsedQuery } from 'url'
......
// source: https://github.com/sindresorhus/fnv1a // source: https://github.com/sindresorhus/fnv1a
// FNV_PRIMES and FNV_OFFSETS from // FNV_PRIMES and FNV_OFFSETS from
// http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param // http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param
/* eslint-disable @typescript-eslint/no-loss-of-precision */
const FNV_PRIMES = { const FNV_PRIMES = {
32: BigInt(16_777_619), 32: BigInt(16_777_619),
......
...@@ -74,7 +74,6 @@ function createLoadableComponent(loadFn: any, options: any) { ...@@ -74,7 +74,6 @@ function createLoadableComponent(loadFn: any, options: any) {
let subscription: any = null let subscription: any = null
function init() { function init() {
if (!subscription) { if (!subscription) {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
const sub = new LoadableSubscription(loadFn, opts) const sub = new LoadableSubscription(loadFn, opts)
subscription = { subscription = {
getCurrentValue: sub.getCurrentValue.bind(sub), getCurrentValue: sub.getCurrentValue.bind(sub),
......
// tslint:disable:no-console
import type { ComponentType } from 'react' import type { ComponentType } from 'react'
import type { DomainLocale } from '../../../server/config' import type { DomainLocale } from '../../../server/config'
import type { MittEmitter } from '../mitt' import type { MittEmitter } from '../mitt'
...@@ -423,7 +422,6 @@ const manualScrollRestoration = ...@@ -423,7 +422,6 @@ const manualScrollRestoration =
!!(function () { !!(function () {
try { try {
let v = '__next' let v = '__next'
// eslint-disable-next-line no-sequences
return (sessionStorage.setItem(v, v), sessionStorage.removeItem(v), true) return (sessionStorage.setItem(v, v), sessionStorage.removeItem(v), true)
} catch (n) {} } catch (n) {}
})() })()
......
...@@ -17,7 +17,6 @@ const RECORD_SPAN_THRESHOLD_MS = parseInt( ...@@ -17,7 +17,6 @@ const RECORD_SPAN_THRESHOLD_MS = parseInt(
) )
// eslint typescript has a bug with TS enums // eslint typescript has a bug with TS enums
/* eslint-disable no-shadow */
export enum SpanStatus { export enum SpanStatus {
Started = 'started', Started = 'started',
Stopped = 'stopped', Stopped = 'stopped',
......
// eslint-disable-next-line import/no-extraneous-dependencies
const findUp = require('find-up') const findUp = require('find-up')
// eslint-disable-next-line import/no-extraneous-dependencies
const ncc = require('@vercel/ncc') const ncc = require('@vercel/ncc')
const { existsSync, readFileSync } = require('fs') const { existsSync, readFileSync } = require('fs')
const { basename, dirname, extname, join, resolve } = require('path') const { basename, dirname, extname, join, resolve } = require('path')
......
...@@ -5,11 +5,9 @@ const MODERN_BROWSERSLIST_TARGET = require('./src/shared/lib/modern-browserslist ...@@ -5,11 +5,9 @@ const MODERN_BROWSERSLIST_TARGET = require('./src/shared/lib/modern-browserslist
const path = require('path') const path = require('path')
// eslint-disable-next-line import/no-extraneous-dependencies
const transform = require('@swc/core').transform const transform = require('@swc/core').transform
module.exports = function (task) { module.exports = function (task) {
// eslint-disable-next-line require-yield
task.plugin( task.plugin(
'swc', 'swc',
{}, {},
......
...@@ -26,7 +26,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ...@@ -26,7 +26,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
const path = require('path') const path = require('path')
// eslint-disable-next-line import/no-extraneous-dependencies
const Watchpack = require('watchpack') const Watchpack = require('watchpack')
const toArr = (val) => (Array.isArray(val) ? val : val == null ? [] : [val]) const toArr = (val) => (Array.isArray(val) ? val : val == null ? [] : [val])
......
This diff is collapsed.
...@@ -211,7 +211,6 @@ const nextBuildWorkflow = ...@@ -211,7 +211,6 @@ const nextBuildWorkflow =
throw e throw e
} finally { } finally {
// This must run in order // This must run in order
// eslint-disable-next-line no-await-in-loop
for (const task of cleanupTasks.reverse()) await task() for (const task of cleanupTasks.reverse()) await task()
await measureTime('shutdown') await measureTime('shutdown')
} }
...@@ -353,7 +352,6 @@ const nextDevWorkflow = ...@@ -353,7 +352,6 @@ const nextDevWorkflow =
await writeFile(path, content, 'utf8') await writeFile(path, content, 'utf8')
}) })
let currentContent = content let currentContent = content
/* eslint-disable no-await-in-loop */
for (let hmrAttempt = 0; hmrAttempt < 10; hmrAttempt++) { for (let hmrAttempt = 0; hmrAttempt < 10; hmrAttempt++) {
if (hmrAttempt > 0) { if (hmrAttempt > 0) {
await new Promise((resolve) => { await new Promise((resolve) => {
...@@ -467,7 +465,6 @@ const nextDevWorkflow = ...@@ -467,7 +465,6 @@ const nextDevWorkflow =
if (!success) break if (!success) break
} }
/* eslint-enable no-await-in-loop */
} }
if (turbopack) { if (turbopack) {
...@@ -532,7 +529,6 @@ const nextDevWorkflow = ...@@ -532,7 +529,6 @@ const nextDevWorkflow =
await shell.reportMemUsage('mem usage after open page with cache') await shell.reportMemUsage('mem usage after open page with cache')
} finally { } finally {
// This must run in order // This must run in order
// eslint-disable-next-line no-await-in-loop
for (const task of cleanupTasks.reverse()) await task() for (const task of cleanupTasks.reverse()) await task()
await measureTime('shutdown') await measureTime('shutdown')
} }
...@@ -587,12 +583,10 @@ async function retry(fn) { ...@@ -587,12 +583,10 @@ async function retry(fn) {
let lastError let lastError
for (let i = 100; i < 2000; i += 100) { for (let i = 100; i < 2000; i += 100) {
try { try {
// eslint-disable-next-line no-await-in-loop
await fn() await fn()
return return
} catch (e) { } catch (e) {
lastError = e lastError = e
// eslint-disable-next-line no-await-in-loop
await new Promise((resolve) => { await new Promise((resolve) => {
setTimeout(resolve, i) setTimeout(resolve, i)
}) })
......
/* eslint-disable jest/no-standalone-expect -- rule does not understand testGateWebpack */
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import { import {
assertHasRedbox, assertHasRedbox,
......
...@@ -27,7 +27,6 @@ import { ...@@ -27,7 +27,6 @@ import {
import { Tab, RadioGroup, Transition } from '@headlessui/react' import { Tab, RadioGroup, Transition } from '@headlessui/react'
export function Comp() { export function Comp() {
// eslint-disable-next-line no-undef
globalThis.__noop__ = createLucideIcon globalThis.__noop__ = createLucideIcon
return ( return (
<> <>
......
...@@ -129,7 +129,6 @@ export function runErrorRecoveryHmrTest(nextConfig: { ...@@ -129,7 +129,6 @@ export function runErrorRecoveryHmrTest(nextConfig: {
await next.browser(basePath + '/does-not-exist') await next.browser(basePath + '/does-not-exist')
await retry(() => { await retry(() => {
// eslint-disable-next-line jest/no-standalone-expect
expect(next.cliOutput).toMatch(/getInitialProps called/) expect(next.cliOutput).toMatch(/getInitialProps called/)
}) })
...@@ -141,7 +140,6 @@ export function runErrorRecoveryHmrTest(nextConfig: { ...@@ -141,7 +140,6 @@ export function runErrorRecoveryHmrTest(nextConfig: {
const logOccurrences = const logOccurrences =
next.cliOutput.slice(outputIndex).split('getInitialProps called') next.cliOutput.slice(outputIndex).split('getInitialProps called')
.length - 1 .length - 1
// eslint-disable-next-line jest/no-standalone-expect
expect(logOccurrences).toBe(0) expect(logOccurrences).toBe(0)
} finally { } finally {
await next.deleteFile(errorPage) await next.deleteFile(errorPage)
......
/* eslint-disable */
import React from 'react' import React from 'react'
export default () => <>My component!</> export default () => <>My component!</>
/* eslint-disable jest/no-standalone-expect */
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import { createRequestTracker } from 'e2e-utils/request-tracker' import { createRequestTracker } from 'e2e-utils/request-tracker'
import { retry } from 'next-test-utils' import { retry } from 'next-test-utils'
......
/* eslint-disable jest/no-standalone-expect */
import { FileRef, nextTestSetup } from 'e2e-utils' import { FileRef, nextTestSetup } from 'e2e-utils'
import { check } from 'next-test-utils' import { check } from 'next-test-utils'
import { join } from 'path' import { join } from 'path'
......
/* eslint-disable jest/no-standalone-expect */
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import { retry } from 'next-test-utils' import { retry } from 'next-test-utils'
......
/* eslint-disable jest/no-standalone-expect */
import { FileRef, nextTestSetup } from 'e2e-utils' import { FileRef, nextTestSetup } from 'e2e-utils'
import { import {
assertHasRedbox, assertHasRedbox,
......
...@@ -155,13 +155,11 @@ describe('app dir - external dependency', () => { ...@@ -155,13 +155,11 @@ describe('app dir - external dependency', () => {
}) })
it('should not apply swc optimizer transform for external packages in browser layer in web worker', async () => { it('should not apply swc optimizer transform for external packages in browser layer in web worker', async () => {
const browser = await next.browser('/browser') const browser = await next.browser('/browser')
// eslint-disable-next-line jest/no-standalone-expect
expect(await browser.elementByCss('#worker-state').text()).toBe('default') expect(await browser.elementByCss('#worker-state').text()).toBe('default')
await browser.elementByCss('button').click() await browser.elementByCss('button').click()
await retry(async () => { await retry(async () => {
// eslint-disable-next-line jest/no-standalone-expect
expect(await browser.elementByCss('#worker-state').text()).toBe( expect(await browser.elementByCss('#worker-state').text()).toBe(
'worker.js:browser-module/other' 'worker.js:browser-module/other'
) )
......
...@@ -21,7 +21,6 @@ describe('app dir - proxy without pages dir', () => { ...@@ -21,7 +21,6 @@ describe('app dir - proxy without pages dir', () => {
}, },
}) })
// eslint-disable-next-line jest/no-identical-title
it('Updates headers', async () => { it('Updates headers', async () => {
const html = await next.render('/headers') const html = await next.render('/headers')
......
...@@ -9,7 +9,6 @@ function log(outBadge: string, errBadge: string) { ...@@ -9,7 +9,6 @@ function log(outBadge: string, errBadge: string) {
'two' 'two'
) )
console.log( console.log(
// eslint-disable-next-line no-useless-concat
`${outBadge} /console-after-abort/client: This is a console page. Don't match the codeframe.` `${outBadge} /console-after-abort/client: This is a console page. Don't match the codeframe.`
) )
console.warn(`${errBadge} /console-after-abort/client: not a template`, { console.warn(`${errBadge} /console-after-abort/client: not a template`, {
......
...@@ -8,7 +8,6 @@ async function cachedConsoleCalls(outBadge: string, errBadge: string) { ...@@ -8,7 +8,6 @@ async function cachedConsoleCalls(outBadge: string, errBadge: string) {
'two' 'two'
) )
console.log( console.log(
// eslint-disable-next-line no-useless-concat
`${outBadge} /console-after-abort/server: This is a console page` + `${outBadge} /console-after-abort/server: This is a console page` +
". Don't match the codeframe." ". Don't match the codeframe."
) )
...@@ -51,7 +50,6 @@ export default async function ConsolePage() { ...@@ -51,7 +50,6 @@ export default async function ConsolePage() {
'two' 'two'
) )
console.log( console.log(
// eslint-disable-next-line no-useless-concat
`${outBadge} /console-after-abort/server: This is a console page` + `${outBadge} /console-after-abort/server: This is a console page` +
". Don't match the codeframe." ". Don't match the codeframe."
) )
......
...@@ -3,7 +3,6 @@ async function cachedConsoleCalls(outBadge: string, errBadge: string) { ...@@ -3,7 +3,6 @@ async function cachedConsoleCalls(outBadge: string, errBadge: string) {
console.info(`${outBadge} /console: template(one: %s, two: %s)`, 'one', 'two') console.info(`${outBadge} /console: template(one: %s, two: %s)`, 'one', 'two')
await 1 await 1
console.log( console.log(
// eslint-disable-next-line no-useless-concat
`${outBadge} /console: This is a console page` + `${outBadge} /console: This is a console page` +
". Don't match the codeframe." ". Don't match the codeframe."
) )
...@@ -32,7 +31,6 @@ export default async function ConsolePage() { ...@@ -32,7 +31,6 @@ export default async function ConsolePage() {
console.info(`${outBadge} /console: template(one: %s, two: %s)`, 'one', 'two') console.info(`${outBadge} /console: template(one: %s, two: %s)`, 'one', 'two')
await 1 await 1
console.log( console.log(
// eslint-disable-next-line no-useless-concat
`${outBadge} /console: This is a console page` + `${outBadge} /console: This is a console page` +
". Don't match the codeframe." ". Don't match the codeframe."
) )
......
...@@ -9,7 +9,6 @@ function log(outBadge: string, errBadge: string) { ...@@ -9,7 +9,6 @@ function log(outBadge: string, errBadge: string) {
'two' 'two'
) )
console.log( console.log(
// eslint-disable-next-line no-useless-concat
`${outBadge} /console-after-abort/client: This is a console page. Don't match the codeframe.` `${outBadge} /console-after-abort/client: This is a console page. Don't match the codeframe.`
) )
console.warn(`${errBadge} /console-after-abort/client: not a template`, { console.warn(`${errBadge} /console-after-abort/client: not a template`, {
......
...@@ -8,7 +8,6 @@ async function cachedConsoleCalls(outBadge: string, errBadge: string) { ...@@ -8,7 +8,6 @@ async function cachedConsoleCalls(outBadge: string, errBadge: string) {
'two' 'two'
) )
console.log( console.log(
// eslint-disable-next-line no-useless-concat
`${outBadge} /console-after-abort/server: This is a console page` + `${outBadge} /console-after-abort/server: This is a console page` +
". Don't match the codeframe." ". Don't match the codeframe."
) )
...@@ -51,7 +50,6 @@ export default async function ConsolePage() { ...@@ -51,7 +50,6 @@ export default async function ConsolePage() {
'two' 'two'
) )
console.log( console.log(
// eslint-disable-next-line no-useless-concat
`${outBadge} /console-after-abort/server: This is a console page` + `${outBadge} /console-after-abort/server: This is a console page` +
". Don't match the codeframe." ". Don't match the codeframe."
) )
......
...@@ -3,7 +3,6 @@ async function cachedConsoleCalls(outBadge: string, errBadge: string) { ...@@ -3,7 +3,6 @@ async function cachedConsoleCalls(outBadge: string, errBadge: string) {
console.info(`${outBadge} /console: template(one: %s, two: %s)`, 'one', 'two') console.info(`${outBadge} /console: template(one: %s, two: %s)`, 'one', 'two')
await 1 await 1
console.log( console.log(
// eslint-disable-next-line no-useless-concat
`${outBadge} /console: This is a console page` + `${outBadge} /console: This is a console page` +
". Don't match the codeframe." ". Don't match the codeframe."
) )
...@@ -32,7 +31,6 @@ export default async function ConsolePage() { ...@@ -32,7 +31,6 @@ export default async function ConsolePage() {
console.info(`${outBadge} /console: template(one: %s, two: %s)`, 'one', 'two') console.info(`${outBadge} /console: template(one: %s, two: %s)`, 'one', 'two')
await 1 await 1
console.log( console.log(
// eslint-disable-next-line no-useless-concat
`${outBadge} /console: This is a console page` + `${outBadge} /console: This is a console page` +
". Don't match the codeframe." ". Don't match the codeframe."
) )
......
...@@ -35,7 +35,6 @@ describe('cache-components', () => { ...@@ -35,7 +35,6 @@ describe('cache-components', () => {
await assertNoRedbox(browser) await assertNoRedbox(browser)
} }
}) })
/* eslint-enable jest/no-standalone-expect */
it('should prerender pages with inline server actions', async () => { it('should prerender pages with inline server actions', async () => {
let $ = await next.render$('/server-action-inline', {}) let $ = await next.render$('/server-action-inline', {})
......
/* eslint-disable jest/no-standalone-expect */
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import cheerio from 'cheerio' import cheerio from 'cheerio'
......
...@@ -446,7 +446,6 @@ describe('app dir - navigation', () => { ...@@ -446,7 +446,6 @@ describe('app dir - navigation', () => {
.elementByCss('button') .elementByCss('button')
.click() .click()
.waitForElementByCss('#result-page') .waitForElementByCss('#result-page')
// eslint-disable-next-line jest/no-standalone-expect
expect(await browser.elementByCss('#result-page').text()).toBe( expect(await browser.elementByCss('#result-page').text()).toBe(
'Result Page' 'Result Page'
) )
......
import { cliLog } from './log' import { cliLog } from './log'
export function injectRequestContext() { export function injectRequestContext() {
// eslint-disable-next-line no-undef
const _globalThis = globalThis const _globalThis = globalThis
/** @type {import('next/dist/server/after/builtin-request-context').BuiltinRequestContext} */ /** @type {import('next/dist/server/after/builtin-request-context').BuiltinRequestContext} */
......
/* eslint-disable @typescript-eslint/no-explicit-any */
declare module '*.svg' { declare module '*.svg' {
const content: any const content: any
export const ReactComponent: any export const ReactComponent: any
......
//@ts-check //@ts-check
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { composePlugins, withNx } = require('@nx/next') const { composePlugins, withNx } = require('@nx/next')
/** /**
......
/* eslint-disable jest/no-standalone-expect */
import * as path from 'path' import * as path from 'path'
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import stripAnsi from 'strip-ansi' import stripAnsi from 'strip-ansi'
......
/* eslint-disable jest/no-standalone-expect */
import * as path from 'path' import * as path from 'path'
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import stripAnsi from 'strip-ansi' import stripAnsi from 'strip-ansi'
......
/* eslint-disable jest/valid-expect-in-promise */
import { createNext } from 'e2e-utils' import { createNext } from 'e2e-utils'
import { NextInstance } from 'e2e-utils' import { NextInstance } from 'e2e-utils'
import { fetchViaHTTP } from 'next-test-utils' import { fetchViaHTTP } from 'next-test-utils'
......
...@@ -114,7 +114,6 @@ describe('persistent-caching', () => { ...@@ -114,7 +114,6 @@ describe('persistent-caching', () => {
} }
} }
/* eslint-disable jest/no-standalone-expect */
const POTENTIAL_CHANGES = { const POTENTIAL_CHANGES = {
'RSC change': { 'RSC change': {
checkInitial: makeTextCheck('/', 'hello world'), checkInitial: makeTextCheck('/', 'hello world'),
...@@ -191,7 +190,6 @@ describe('persistent-caching', () => { ...@@ -191,7 +190,6 @@ describe('persistent-caching', () => {
}, },
}, },
} }
/* eslint-enable jest/no-standalone-expect */
const KEYS = Object.keys(POTENTIAL_CHANGES) const KEYS = Object.keys(POTENTIAL_CHANGES)
for (let bitset = 1; bitset < 1 << KEYS.length; bitset++) { for (let bitset = 1; bitset < 1 << KEYS.length; bitset++) {
......
/* eslint-env jest */ /* eslint-env jest */
/* eslint-disable jest/no-standalone-expect */
import { join } from 'path' import { join } from 'path'
import webdriver from 'next-webdriver' import webdriver from 'next-webdriver'
import { fetchViaHTTP } from 'next-test-utils' import { fetchViaHTTP } from 'next-test-utils'
......
/* eslint-disable jest/no-identical-title */
import { createNext, FileRef } from 'e2e-utils' import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'e2e-utils' import { NextInstance } from 'e2e-utils'
import { check, fetchViaHTTP } from 'next-test-utils' import { check, fetchViaHTTP } from 'next-test-utils'
......
...@@ -5,7 +5,6 @@ import { NextResponse } from 'next/server' ...@@ -5,7 +5,6 @@ import { NextResponse } from 'next/server'
class MyResponse extends Response {} class MyResponse extends Response {}
export async function middleware(request, ev) { export async function middleware(request, ev) {
// eslint-disable-next-line no-undef
const { readable, writable } = new TransformStream() const { readable, writable } = new TransformStream()
const url = request.nextUrl const url = request.nextUrl
const writer = writable.getWriter() const writer = writable.getWriter()
......
...@@ -76,7 +76,6 @@ MyDocument.getInitialProps = async (ctx) => { ...@@ -76,7 +76,6 @@ MyDocument.getInitialProps = async (ctx) => {
<style <style
data-emotion={`${style.key} ${style.ids.join(' ')}`} data-emotion={`${style.key} ${style.ids.join(' ')}`}
key={style.key} key={style.key}
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: style.css }} dangerouslySetInnerHTML={{ __html: style.css }}
/> />
)) ))
......
...@@ -412,7 +412,6 @@ describe('Prerender', () => { ...@@ -412,7 +412,6 @@ describe('Prerender', () => {
await goFromAnotherToHome() await goFromAnotherToHome()
// Client-side SSG data caching test // Client-side SSG data caching test
// eslint-disable-next-line no-lone-blocks
{ {
// Let revalidation period lapse // Let revalidation period lapse
await waitFor(2000) await waitFor(2000)
......
...@@ -19,6 +19,5 @@ export default function Page() { ...@@ -19,6 +19,5 @@ export default function Page() {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
window.pathnames.push(window.location.pathname) window.pathnames.push(window.location.pathname)
} }
// eslint-disable-next-line
return <p>{useRouter().asPath}</p> return <p>{useRouter().asPath}</p>
} }
...@@ -446,7 +446,6 @@ describe('Valid CSS Module Usage from within node_modules', () => { ...@@ -446,7 +446,6 @@ describe('Valid CSS Module Usage from within node_modules', () => {
await killApp(app) await killApp(app)
}) })
// eslint-disable-next-line jest/no-identical-title
it(`should've prerendered with relevant data`, async () => { it(`should've prerendered with relevant data`, async () => {
const content = await renderViaHTTP(appPort, '/') const content = await renderViaHTTP(appPort, '/')
const $ = cheerio.load(content) const $ = cheerio.load(content)
...@@ -457,7 +456,6 @@ describe('Valid CSS Module Usage from within node_modules', () => { ...@@ -457,7 +456,6 @@ describe('Valid CSS Module Usage from within node_modules', () => {
) )
}) })
// eslint-disable-next-line jest/no-identical-title
it(`should've emitted a single CSS file`, async () => { it(`should've emitted a single CSS file`, async () => {
const content = await renderViaHTTP(appPort, '/') const content = await renderViaHTTP(appPort, '/')
const $ = cheerio.load(content) const $ = cheerio.load(content)
......
...@@ -56,7 +56,6 @@ describe('Invalid Global CSS', () => { ...@@ -56,7 +56,6 @@ describe('Invalid Global CSS', () => {
await remove(join(appDir, '.next')) await remove(join(appDir, '.next'))
}) })
// eslint-disable-next-line jest/no-identical-title
it('should fail to build', async () => { it('should fail to build', async () => {
const { code, stderr } = await nextBuild(appDir, [], { const { code, stderr } = await nextBuild(appDir, [], {
stderr: true, stderr: true,
...@@ -128,7 +127,6 @@ describe('Invalid Global CSS with Custom App', () => { ...@@ -128,7 +127,6 @@ describe('Invalid Global CSS with Custom App', () => {
await remove(join(appDir, '.next')) await remove(join(appDir, '.next'))
}) })
// eslint-disable-next-line jest/no-identical-title
it('should fail to build', async () => { it('should fail to build', async () => {
const { code, stderr } = await nextBuild(appDir, [], { const { code, stderr } = await nextBuild(appDir, [], {
stderr: true, stderr: true,
...@@ -158,7 +156,6 @@ describe('Valid and Invalid Global CSS with Custom App', () => { ...@@ -158,7 +156,6 @@ describe('Valid and Invalid Global CSS with Custom App', () => {
await remove(join(appDir, '.next')) await remove(join(appDir, '.next'))
}) })
// eslint-disable-next-line jest/no-identical-title
it('should fail to build', async () => { it('should fail to build', async () => {
const { code, stderr } = await nextBuild(appDir, [], { const { code, stderr } = await nextBuild(appDir, [], {
stderr: true, stderr: true,
......
/* eslint-disable no-unused-expressions, no-undef */
let renderCount = 0 let renderCount = 0
export default function Error() { export default function Error() {
......
/* eslint-disable no-unused-expressions, no-unused-vars */
import React from 'react' import React from 'react'
import Link from 'next/link' import Link from 'next/link'
......
...@@ -492,7 +492,6 @@ describe('Edge runtime configurable guards', () => { ...@@ -492,7 +492,6 @@ describe('Edge runtime configurable guards', () => {
'production mode', 'production mode',
() => { () => {
// This checks the unstable_allowDynamic configuration which is not supported in Turbopack. // This checks the unstable_allowDynamic configuration which is not supported in Turbopack.
// eslint-disable-next-line jest/no-identical-title
;(process.env.IS_TURBOPACK_TEST ? it.skip : it)( ;(process.env.IS_TURBOPACK_TEST ? it.skip : it)(
'build and does not warn at runtime', 'build and does not warn at runtime',
async () => { async () => {
......
/* eslint-disable jest/no-identical-title */
/* eslint-env jest */ /* eslint-env jest */
import { remove } from 'fs-extra' import { remove } from 'fs-extra'
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment