Skip to content

Commit 6feaddf

Browse files
eps1lonunstubbable
andauthored
Remove unused eslint-disable directives (#84797)
Co-authored-by: Hendrik Liebau <[email protected]>
1 parent 91e660d commit 6feaddf

File tree

117 files changed

+131
-474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+131
-474
lines changed

packages/create-next-app/helpers/git.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/no-extraneous-dependencies */
21
import { execSync } from 'node:child_process'
32
import { join } from 'node:path'
43
import { rmSync } from 'node:fs'

packages/eslint-plugin-next/src/rules/no-typos.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ function minDistance(a, b) {
4040
return previousRow[previousRow.length - 1]
4141
}
4242

43-
/* eslint-disable eslint-plugin/require-meta-docs-url */
4443
export default defineRule({
4544
meta: {
4645
docs: {

packages/font/src/google/retry.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line import/no-extraneous-dependencies
21
// @ts-expect-error File exists
32
import asyncRetry from 'next/dist/compiled/async-retry'
43

packages/font/src/local/loader.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// @ts-ignore
2-
// eslint-disable-next-line import/no-extraneous-dependencies
32
let fontFromBuffer: any
43
try {
54
// eslint-disable-next-line @next/internal/typechecked-require -- Module created during build.

packages/next-polyfill-module/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable no-extend-native, no-sequences */
1+
/* eslint-disable no-extend-native */
22

33
// Contains polyfills for methods missing after browser version(s):
44
// Edge 16, Firefox 60, Chrome 61, Safari 10.1

packages/next/src/build/get-babel-loader-config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import type { NextBabelLoaderOptions } from './babel/loader/types'
55

66
function getReactCompiler() {
77
try {
8-
// It's in peerDependencies, so it should be available
9-
// eslint-disable-next-line import/no-extraneous-dependencies
108
return require.resolve('babel-plugin-react-compiler')
119
} catch {
1210
throw new Error(

packages/next/src/build/swc/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-use-before-define */
21
import path from 'path'
32
import { pathToFileURL } from 'url'
43
import { arch, platform } from 'os'

packages/next/src/build/swc/options.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ function getBaseSWCOptions({
205205
},
206206
// Disable css-in-js libs (without client-only integration) transform on server layer for server components
207207
...(!isReactServerLayer && {
208-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
209208
emotion: getEmotionOptions(compilerOptions?.emotion, development),
210-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
211209
styledComponents: getStyledComponentsOptions(
212210
compilerOptions?.styledComponents,
213211
development

packages/next/src/build/webpack/loaders/css-loader/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ function getModulesOptions(rawOptions: any, loaderContext: any) {
3232
localIdentName: '[hash:base64]',
3333
localIdentContext: loaderContext.rootContext,
3434
localIdentHashPrefix: '',
35-
// eslint-disable-next-line no-undefined
3635
localIdentRegExp: undefined,
3736
namedExport: false,
3837
exportLocalsConvention: 'asIs',
@@ -268,7 +267,6 @@ export default async function loader(
268267
const { ast } = meta
269268

270269
if (ast && ast.type === 'postcss') {
271-
// eslint-disable-next-line no-param-reassign
272270
content = ast.root
273271
loaderSpan.setAttribute('astUsed', 'true')
274272
}

packages/next/src/build/webpack/loaders/css-loader/src/plugins/postcss-icss-parser.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ const plugin = (options: any = {}) => {
1515
const imports = new Map()
1616
const tasks = []
1717

18-
// eslint-disable-next-line guard-for-in
1918
for (const url in icssImports) {
2019
const tokens = icssImports[url]
2120

2221
if (Object.keys(tokens).length === 0) {
23-
// eslint-disable-next-line no-continue
2422
continue
2523
}
2624

@@ -48,7 +46,6 @@ const plugin = (options: any = {}) => {
4846
return
4947
}
5048

51-
// eslint-disable-next-line consistent-return
5249
return { url: resolvedUrl, prefix, tokens }
5350
}
5451

@@ -61,7 +58,6 @@ const plugin = (options: any = {}) => {
6158
const item = results[index]
6259

6360
if (!item) {
64-
// eslint-disable-next-line no-continue
6561
continue
6662
}
6763

0 commit comments

Comments
 (0)