Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e72ac76

Browse files
authored
Remove tslint disables (vercel#16116)
We no longer use tslint so these comments don't do anything.
1 parent c154a87 commit e72ac76

File tree

12 files changed

+0
-28
lines changed

12 files changed

+0
-28
lines changed

packages/next/bin/next.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { NON_STANDARD_NODE_ENV } from '../lib/constants'
77
// When 'npm link' is used it checks the clone location. Not the project.
88
require.resolve(dependency)
99
} catch (err) {
10-
// tslint:disable-next-line
1110
console.warn(
1211
`The module '${dependency}' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install ${dependency}'`
1312
)
@@ -44,7 +43,6 @@ const args = arg(
4443

4544
// Version is inlined into the file using taskr build pipeline
4645
if (args['--version']) {
47-
// tslint:disable-next-line
4846
console.log(`Next.js v${process.env.__NEXT_VERSION}`)
4947
process.exit(0)
5048
}
@@ -55,7 +53,6 @@ const foundCommand = Boolean(commands[args._[0]])
5553
// Makes sure the `next <subcommand> --help` case is covered
5654
// This help message is only showed for `next --help`
5755
if (!foundCommand && args['--help']) {
58-
// tslint:disable-next-line
5956
console.log(`
6057
Usage
6158
$ next <command>
@@ -113,7 +110,6 @@ if (command === 'dev') {
113110
const { watchFile } = require('fs')
114111
watchFile(`${process.cwd()}/${CONFIG_FILE}`, (cur: any, prev: any) => {
115112
if (cur.size > 0 || prev.size > 0) {
116-
// tslint:disable-next-line
117113
console.log(
118114
`\n> Found a change in ${CONFIG_FILE}. Restart the server to see the changes in effect.`
119115
)

packages/next/cli/next-dev.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const nextDev: cliCommand = (argv) => {
3030
throw error
3131
}
3232
if (args['--help']) {
33-
// tslint:disable-next-line
3433
console.log(`
3534
Description
3635
Starts the application in development mode (hot-code reloading, error
@@ -119,10 +118,8 @@ const nextDev: cliCommand = (argv) => {
119118
errorMessage += `\nUse \`npm run ${nextScript[0]} -- -p <some other port>\`.`
120119
}
121120
}
122-
// tslint:disable-next-line
123121
console.error(errorMessage)
124122
} else {
125-
// tslint:disable-next-line
126123
console.error(err)
127124
}
128125
process.nextTick(() => process.exit(1))

packages/next/cli/next-export.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const nextExport: cliCommand = (argv) => {
2929
throw error
3030
}
3131
if (args['--help']) {
32-
// tslint:disable-next-line
3332
console.log(`
3433
Description
3534
Exports the application for production deployment

packages/next/cli/next-start.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const nextStart: cliCommand = (argv) => {
2929
throw error
3030
}
3131
if (args['--help']) {
32-
// tslint:disable-next-line
3332
console.log(`
3433
Description
3534
Starts the application in production mode.
@@ -53,14 +52,12 @@ const nextStart: cliCommand = (argv) => {
5352
const port = args['--port'] || 3000
5453
startServer({ dir }, port, args['--hostname'])
5554
.then(async (app) => {
56-
// tslint:disable-next-line
5755
Log.ready(
5856
`started server on http://${args['--hostname'] || 'localhost'}:${port}`
5957
)
6058
await app.prepare()
6159
})
6260
.catch((err) => {
63-
// tslint:disable-next-line
6461
console.error(err)
6562
process.exit(1)
6663
})

packages/next/client/router.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ routerEvents.forEach((event) => {
9494
try {
9595
_singletonRouter[eventField](...args)
9696
} catch (err) {
97-
// tslint:disable-next-line:no-console
9897
console.error(`Error when running the Router event: ${eventField}`)
99-
// tslint:disable-next-line:no-console
10098
console.error(`${err.message}\n${err.stack}`)
10199
}
102100
}

packages/next/next-server/lib/mitt.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export default function mitt(): MittEmitter {
3232

3333
off(type: string, handler: Handler) {
3434
if (all[type]) {
35-
// tslint:disable-next-line:no-bitwise
3635
all[type].splice(all[type].indexOf(handler) >>> 0, 1)
3736
}
3837
},

packages/next/next-server/lib/utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ export type NEXT_DATA = {
103103
/**
104104
* `Next` context
105105
*/
106-
// tslint:disable-next-line interface-name
107106
export interface NextPageContext {
108107
/**
109108
* Error object if encountered during rendering

packages/next/next-server/server/get-page-files.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export function getPageFiles(
2020
let files = buildManifest.pages[normalizedPage]
2121

2222
if (!files) {
23-
// tslint:disable-next-line
2423
console.warn(
2524
`Could not find files for ${normalizedPage} in .next/build-manifest.json`
2625
)

packages/next/next-server/server/next-server.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ export default class Server {
253253
this.onErrorMiddleware({ err })
254254
}
255255
if (this.quiet) return
256-
// tslint:disable-next-line
257256
console.error(err)
258257
}
259258

packages/next/next-server/server/require.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export function getPagePath(
3333
try {
3434
page = denormalizePagePath(normalizePagePath(page))
3535
} catch (err) {
36-
// tslint:disable-next-line
3736
console.error(err)
3837
throw pageNotFoundError(page)
3938
}

packages/next/server/lib/utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export function printAndExit(message: string, code = 1) {
22
if (code === 0) {
3-
// tslint:disable-next-line no-console
43
console.log(message)
54
} else {
65
console.error(message)

packages/next/types/webpack.d.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,6 @@ declare module 'webpack' {
600600
type Rule = RuleSetRule
601601

602602
namespace Options {
603-
// tslint:disable-next-line:max-line-length
604603
type Devtool =
605604
| 'eval'
606605
| 'inline-source-map'
@@ -869,13 +868,10 @@ declare module 'webpack' {
869868
modulesSize(): number
870869
size(options: any): number
871870
integratedSize(otherChunk: any, options: any): number
872-
// tslint:disable-next-line:ban-types
873871
sortModules(sortByFn: Function): void
874872
getAllAsyncChunks(): Set<any>
875873
getChunkMaps(realHash: any): { hash: any; name: any }
876-
// tslint:disable-next-line:ban-types
877874
getChunkModuleMaps(filterFn: Function): { id: any; hash: any }
878-
// tslint:disable-next-line:ban-types
879875
hasModuleInGraph(filterFn: Function, filterChunkFn: Function): boolean
880876
toString(): string
881877
}
@@ -1132,7 +1128,6 @@ declare module 'webpack' {
11321128
hash?: string
11331129
getStats(): Stats
11341130
addModule(module: CompilationModule, cacheGroup: any): any
1135-
// tslint:disable-next-line:ban-types
11361131
addEntry(context: any, entry: any, name: any, callback: Function): void
11371132
getPath(
11381133
filename: string,
@@ -1256,7 +1251,6 @@ declare module 'webpack' {
12561251
watchRun: any
12571252
}
12581253
}
1259-
// tslint:disable-next-line:interface-name
12601254
interface ICompiler {
12611255
run(handler: ICompiler.Handler): void
12621256
watch(
@@ -1877,7 +1871,6 @@ declare module 'webpack' {
18771871
}
18781872

18791873
class PrefetchPlugin extends Plugin {
1880-
// tslint:disable-next-line:unified-signatures
18811874
constructor(context: any, request: any)
18821875
constructor(request: any)
18831876
}
@@ -2363,7 +2356,6 @@ declare module 'webpack' {
23632356
/** @deprecated */
23642357
namespace compiler {
23652358
/** @deprecated use webpack.Compiler */
2366-
// tslint:disable-next-line:no-unnecessary-qualifier
23672359
type Compiler = webpack.Compiler
23682360

23692361
/** @deprecated use webpack.Compiler.Watching */
@@ -2374,7 +2366,6 @@ declare module 'webpack' {
23742366
type WatchOptions = Compiler.WatchOptions
23752367

23762368
/** @deprecated use webpack.Stats */
2377-
// tslint:disable-next-line:no-unnecessary-qualifier
23782369
type Stats = webpack.Stats
23792370

23802371
/** @deprecated use webpack.Stats.ToJsonOptions */

0 commit comments

Comments
 (0)