Unverified Commit e72ac764 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Remove tslint disables (#16116)

We no longer use tslint so these comments don't do anything.
parent c154a878
......@@ -7,7 +7,6 @@ import { NON_STANDARD_NODE_ENV } from '../lib/constants'
// When 'npm link' is used it checks the clone location. Not the project.
require.resolve(dependency)
} catch (err) {
// tslint:disable-next-line
console.warn(
`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}'`
)
......@@ -44,7 +43,6 @@ const args = arg(
// Version is inlined into the file using taskr build pipeline
if (args['--version']) {
// tslint:disable-next-line
console.log(`Next.js v${process.env.__NEXT_VERSION}`)
process.exit(0)
}
......@@ -55,7 +53,6 @@ const foundCommand = Boolean(commands[args._[0]])
// Makes sure the `next <subcommand> --help` case is covered
// This help message is only showed for `next --help`
if (!foundCommand && args['--help']) {
// tslint:disable-next-line
console.log(`
Usage
$ next <command>
......@@ -113,7 +110,6 @@ if (command === 'dev') {
const { watchFile } = require('fs')
watchFile(`${process.cwd()}/${CONFIG_FILE}`, (cur: any, prev: any) => {
if (cur.size > 0 || prev.size > 0) {
// tslint:disable-next-line
console.log(
`\n> Found a change in ${CONFIG_FILE}. Restart the server to see the changes in effect.`
)
......
......@@ -30,7 +30,6 @@ const nextDev: cliCommand = (argv) => {
throw error
}
if (args['--help']) {
// tslint:disable-next-line
console.log(`
Description
Starts the application in development mode (hot-code reloading, error
......@@ -119,10 +118,8 @@ const nextDev: cliCommand = (argv) => {
errorMessage += `\nUse \`npm run ${nextScript[0]} -- -p <some other port>\`.`
}
}
// tslint:disable-next-line
console.error(errorMessage)
} else {
// tslint:disable-next-line
console.error(err)
}
process.nextTick(() => process.exit(1))
......
......@@ -29,7 +29,6 @@ const nextExport: cliCommand = (argv) => {
throw error
}
if (args['--help']) {
// tslint:disable-next-line
console.log(`
Description
Exports the application for production deployment
......
......@@ -29,7 +29,6 @@ const nextStart: cliCommand = (argv) => {
throw error
}
if (args['--help']) {
// tslint:disable-next-line
console.log(`
Description
Starts the application in production mode.
......@@ -53,14 +52,12 @@ const nextStart: cliCommand = (argv) => {
const port = args['--port'] || 3000
startServer({ dir }, port, args['--hostname'])
.then(async (app) => {
// tslint:disable-next-line
Log.ready(
`started server on http://${args['--hostname'] || 'localhost'}:${port}`
)
await app.prepare()
})
.catch((err) => {
// tslint:disable-next-line
console.error(err)
process.exit(1)
})
......
......@@ -94,9 +94,7 @@ routerEvents.forEach((event) => {
try {
_singletonRouter[eventField](...args)
} catch (err) {
// tslint:disable-next-line:no-console
console.error(`Error when running the Router event: ${eventField}`)
// tslint:disable-next-line:no-console
console.error(`${err.message}\n${err.stack}`)
}
}
......
......@@ -32,7 +32,6 @@ export default function mitt(): MittEmitter {
off(type: string, handler: Handler) {
if (all[type]) {
// tslint:disable-next-line:no-bitwise
all[type].splice(all[type].indexOf(handler) >>> 0, 1)
}
},
......
......@@ -103,7 +103,6 @@ export type NEXT_DATA = {
/**
* `Next` context
*/
// tslint:disable-next-line interface-name
export interface NextPageContext {
/**
* Error object if encountered during rendering
......
......@@ -20,7 +20,6 @@ export function getPageFiles(
let files = buildManifest.pages[normalizedPage]
if (!files) {
// tslint:disable-next-line
console.warn(
`Could not find files for ${normalizedPage} in .next/build-manifest.json`
)
......
......@@ -253,7 +253,6 @@ export default class Server {
this.onErrorMiddleware({ err })
}
if (this.quiet) return
// tslint:disable-next-line
console.error(err)
}
......
......@@ -33,7 +33,6 @@ export function getPagePath(
try {
page = denormalizePagePath(normalizePagePath(page))
} catch (err) {
// tslint:disable-next-line
console.error(err)
throw pageNotFoundError(page)
}
......
export function printAndExit(message: string, code = 1) {
if (code === 0) {
// tslint:disable-next-line no-console
console.log(message)
} else {
console.error(message)
......
......@@ -600,7 +600,6 @@ declare module 'webpack' {
type Rule = RuleSetRule
namespace Options {
// tslint:disable-next-line:max-line-length
type Devtool =
| 'eval'
| 'inline-source-map'
......@@ -869,13 +868,10 @@ declare module 'webpack' {
modulesSize(): number
size(options: any): number
integratedSize(otherChunk: any, options: any): number
// tslint:disable-next-line:ban-types
sortModules(sortByFn: Function): void
getAllAsyncChunks(): Set<any>
getChunkMaps(realHash: any): { hash: any; name: any }
// tslint:disable-next-line:ban-types
getChunkModuleMaps(filterFn: Function): { id: any; hash: any }
// tslint:disable-next-line:ban-types
hasModuleInGraph(filterFn: Function, filterChunkFn: Function): boolean
toString(): string
}
......@@ -1132,7 +1128,6 @@ declare module 'webpack' {
hash?: string
getStats(): Stats
addModule(module: CompilationModule, cacheGroup: any): any
// tslint:disable-next-line:ban-types
addEntry(context: any, entry: any, name: any, callback: Function): void
getPath(
filename: string,
......@@ -1256,7 +1251,6 @@ declare module 'webpack' {
watchRun: any
}
}
// tslint:disable-next-line:interface-name
interface ICompiler {
run(handler: ICompiler.Handler): void
watch(
......@@ -1877,7 +1871,6 @@ declare module 'webpack' {
}
class PrefetchPlugin extends Plugin {
// tslint:disable-next-line:unified-signatures
constructor(context: any, request: any)
constructor(request: any)
}
......@@ -2363,7 +2356,6 @@ declare module 'webpack' {
/** @deprecated */
namespace compiler {
/** @deprecated use webpack.Compiler */
// tslint:disable-next-line:no-unnecessary-qualifier
type Compiler = webpack.Compiler
/** @deprecated use webpack.Compiler.Watching */
......@@ -2374,7 +2366,6 @@ declare module 'webpack' {
type WatchOptions = Compiler.WatchOptions
/** @deprecated use webpack.Stats */
// tslint:disable-next-line:no-unnecessary-qualifier
type Stats = webpack.Stats
/** @deprecated use webpack.Stats.ToJsonOptions */
......
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