Unverified Commit eecc3342 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Temporarily remove experimental ESLint integration (#23521)

This pull request **temporarily** removes ESLint, as it was not landed in accordance with our standard experimental policies. We are fully committed to landing this change again.

This is being reverted because:

- Next.js has very strict goals for its install size. This feature resulted in adding over 17MB, or a 43.6% increase.
- The feature was not first landed under the `experimental` key in `next.config.js`, rather, it was added under the stable namespace (top-level)
- Using the feature doesn't do a "guided setup" like TypeScript, it should ask you to "bring your own" dependencies for ESLint
- It uses a undesirable ESLint plugin name: `plugin:@next/next/recommended`. This should read out as strictly `next`, or as short as we can get it.
- Does not provide actionable warnings (missing link to resolve issue)
- Does not follow appropriate console output styling. We need to revisit how these are presented.

To re-land this, we need to ensure the following minimums are met:
- Very minor change in install size
- Fully experimental (i.e. flagged) with warnings
- Finalized package name and configuration shape, preferably so we can do ` { extends: 'next' } `.
parent cd462413
......@@ -2,7 +2,6 @@ node_modules
**/.next/**
**/_next/**
**/dist/**
e2e-tests/**
examples/with-typescript-eslint-jest/**
examples/with-kea/**
packages/next/bundles/webpack/packages/*.runtime.js
......@@ -17,5 +16,4 @@ packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
test/integration/async-modules/**
test/integration/eslint/**
test-timings.json
\ No newline at end of file
---
description: Learn how to opt-in and out of ESLint during development mode and production builds.
---
# ESLint Warnings and Errors
## During builds
Next.js fails your **production build** (`next build`) when ESLint errors are present in your
project.
If you'd like Next.js to dangerously produce production code even when your application has errors,
you can disable ESLint running during the build process.
> It's recommended to run ESLint as part of the production build process to ensure your application
> is resilient against runtime issues.
Open `next.config.js` and disable the `build` option in the `eslint` config:
```js
module.exports = {
eslint: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has ESLint errors.
// !! WARN !!
build: false,
},
}
```
## During development
By default, Next.js does not run ESLint during **development** (`next dev`).
If you would like Next.js to lint files separately in development mode, you can enable it in your
configuration.
> Enabling ESLint during development mode will slow down how fast pages are compiled. Until this is
> optimized, we recommend that you [integrate ESLint in your code
> editor](https://eslint.org/docs/user-guide/integrations#editors).
Open `next.config.js` and enable the `dev` option in the `eslint` config:
```js
module.exports = {
eslint: {
// !! WARN !!
// This can slow down how long pages take to compile during development
// !! WARN !!
dev: true,
},
}
```
## Related
<div class="card">
<a href="/docs/api-reference/next.config.js/introduction.md">
<b>Introduction to next.config.js:</b>
<small>Learn more about the configuration file used by Next.js.</small>
</a>
</div>
<div class="card">
<a href="/docs/basic-features/eslint.md">
<b>ESLint:</b>
<small>Learn more about how to use ESLint in Next.js.</small>
</a>
</div>
---
description: Next.js uses ESLint to find and resolve issues affecting the user or developer experience.
---
# ESLint
Next.js uses [ESLint](https://eslint.org/) to find and resolve issues affecting the user or
developer experience. A minimal set of Next.js rules are provided by default, but can be extended by
adding an `.eslintrc` file to your project.
## Default configuration
By default, Next.js provides a set of [recommended ESLint
rules](https://github.com/vercel/next.js/blob/canary/packages/eslint-plugin-next/lib/index.js#L10-L18)
that are automatically linted against as part of `next build`. If you would like to control which
ESLint rules are checked during builds, you will need to add an `.eslintrc` file to the root of your
project.
Here's an example of an `.eslintrc.json` file:
```json
{
"extends": ["plugin:@next/next/recommended"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
"sourceType": "module",
"babelOptions": {
"presets": ["next/babel"]
}
}
}
```
- Extending the original base of rules (`plugin:@next/next/recommended`) is highly recommended to
catch and fix significant Next.js issues in your application.
- Including `@babel/eslint-parser` with the `next/babel` preset ensures that all language features
supported by Next.js will also be supported by ESLint. Although `@babel/eslint-parser` can parse
TypeScript, consider using
[`@typescript-eslint/parser`](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser)
if you have TypeScript enabled in your application to check for type-specific linting rules.
> If you add an `.eslintrc` file to your application and don't include
> `plugin:@next/next/recommended`in the config, its rules will not be checked during development or
> production builds. This is **not recommended**.
If you want to enable ESLint to run during development, or disable it for production builds; refer
to the documentation for [ESLint Warnings and
Errors](/docs/api-reference/next.config.js/eslint-warnings-errors.md).
......@@ -33,10 +33,6 @@
"title": "Fast Refresh",
"path": "/docs/basic-features/fast-refresh.md"
},
{
"title": "ESLint",
"path": "/docs/basic-features/eslint.md"
},
{
"title": "TypeScript",
"path": "/docs/basic-features/typescript.md"
......@@ -340,10 +336,6 @@
"title": "Configuring onDemandEntries",
"path": "/docs/api-reference/next.config.js/configuring-onDemandEntries.md"
},
{
"title": "ESLint Warnings and Errors",
"path": "/docs/api-reference/next.config.js/eslint-warnings-errors.md"
},
{
"title": "Ignoring TypeScript Errors",
"path": "/docs/api-reference/next.config.js/ignoring-typescript-errors.md"
......
const path = require('path')
const fs = require('fs')
const {
getUrlFromPagesDirectory,
normalizeURL,
execOnce,
} = require('../utils/url')
const pagesDirWarning = execOnce((pagesDirs) => {
console.warn(
`Pages directory cannot be found at ${pagesDirs.join(' or ')}. ` +
`If using a custom path, please configure with the no-html-link-for-pages rule in your eslint config file`
)
})
const { getUrlFromPagesDirectory, normalizeURL } = require('../utils/url')
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = {
meta: {
docs: {
......@@ -34,8 +26,10 @@ module.exports = {
]
const pagesDir = pagesDirs.find((dir) => fs.existsSync(dir))
if (!pagesDir) {
pagesDirWarning(pagesDirs)
return {}
throw new Error(
`Pages directory cannot be found at ${pagesDirs.join(' or ')}. ` +
`If using a custom path, please configure with the no-html-link-for-pages rule`
)
}
const urls = getUrlFromPagesDirectory('/', pagesDir)
......
......@@ -76,21 +76,7 @@ function normalizeURL(url) {
return url
}
function execOnce(fn) {
let used = false
let result
return (...args) => {
if (!used) {
used = true
result = fn(...args)
}
return result
}
}
module.exports = {
getUrlFromPagesDirectory,
normalizeURL,
execOnce,
}
......@@ -180,41 +180,6 @@ export default async function build(
telemetry.record(events)
)
if (config.eslint?.build) {
await nextBuildSpan
.traceChild('verify-and-lint')
.traceAsyncFn(async () => {
const lintWorkers = new Worker(
require.resolve('../lib/verifyAndLint'),
{
numWorkers: config.experimental.cpus,
enableWorkerThreads: config.experimental.workerThreads,
}
) as Worker & {
verifyAndLint: typeof import('../lib/verifyAndLint').verifyAndLint
}
lintWorkers.getStdout().pipe(process.stdout)
lintWorkers.getStderr().pipe(process.stderr)
const lintResults = await lintWorkers.verifyAndLint(
dir,
pagesDir,
null
)
if (lintResults.hasErrors) {
console.error(chalk.red('Failed to compile.'))
console.error(lintResults.results)
process.exit(1)
} else if (lintResults.hasMessages) {
console.log(lintResults.results)
}
lintWorkers.end()
})
}
const ignoreTypeScriptErrors = Boolean(config.typescript?.ignoreBuildErrors)
await nextBuildSpan
.traceChild('verify-typescript-setup')
......
import { ESLint, Linter } from 'eslint'
import chalk from 'chalk'
import path from 'path'
export enum MessageSeverity {
Warning = 1,
Error = 2,
}
function formatMessage(
dir: string,
messages: Linter.LintMessage[],
filePath: string
): string | void {
let fileName = path.posix.normalize(
path.relative(dir, filePath).replace(/\\/g, '/')
)
if (!fileName.startsWith('.')) {
fileName = './' + fileName
}
let output = '\n' + chalk.cyan(fileName)
for (let i = 0; i < messages.length; i++) {
const { message, severity, line, column, ruleId } = messages[i]
output = output + '\n'
if (line && column) {
output =
output +
chalk.yellow(line.toString()) +
':' +
chalk.yellow(column.toString()) +
' '
}
if (severity === MessageSeverity.Warning) {
output += chalk.yellow.bold('Warning') + ': '
} else {
output += chalk.red.bold('Error') + ': '
}
output += message
if (ruleId) {
output += ' ' + chalk.gray.bold(ruleId)
}
}
return output
}
export function formatResults(
baseDir: string,
results: ESLint.LintResult[]
): string {
return (
results
.filter(({ messages }) => messages?.length)
.map(({ messages, filePath }) =>
formatMessage(baseDir, messages, filePath)
)
.join('\n') + '\n'
)
}
import { ESLint } from 'eslint'
import { join } from 'path'
import { formatResults } from './eslint/customFormatter'
import { fileExists } from './file-exists'
import * as log from '../build/output/log'
import findUp from 'next/dist/compiled/find-up'
type Config = {
plugins: string[]
rules: { [key: string]: Array<number | string> }
}
export async function verifyAndLint(
baseDir: string,
pagesDir: string,
pagePath: string | null
): Promise<{
results: string
hasErrors: boolean
hasMessages: boolean
}> {
let options: ESLint.Options
let pathNotExists = Boolean(
pagePath && !(await fileExists(join(pagesDir, pagePath)))
)
if (pathNotExists)
return { results: '', hasErrors: false, hasMessages: false }
const eslintrcFile = await findUp(
[
'.eslintrc.js',
'.eslintrc.yaml',
'.eslintrc.yml',
'.eslintrc.json',
'.eslintrc',
],
{
cwd: baseDir,
}
)
const pagesDirRules = ['@next/next/no-html-link-for-pages']
const pkgJsonPath = await findUp('package.json', { cwd: baseDir })
const { eslintConfig = null } = !!pkgJsonPath
? await import(pkgJsonPath!)
: {}
let pluginIsEnabled = false
if (eslintrcFile) {
options = {
useEslintrc: true,
baseConfig: {},
}
} else {
if (!eslintConfig) {
console.log()
log.info(
'No ESLint configuration was detected, but checks from the Next.js ESLint plugin were included automatically (see https://nextjs.org/docs/basic-features/eslint).'
)
pluginIsEnabled = true
}
options = {
baseConfig: eslintConfig ?? {
extends: ['plugin:@next/next/recommended'],
parser: require.resolve('@babel/eslint-parser'),
parserOptions: {
requireConfigFile: false,
sourceType: 'module',
babelOptions: {
presets: ['next/babel'],
},
},
},
useEslintrc: false,
}
}
let eslint = new ESLint(options)
// check both eslintrc and package.json config since
// eslint will load config from both
for (const configFile of [eslintrcFile, pkgJsonPath]) {
if (!configFile) continue
const completeConfig: Config = await eslint.calculateConfigForFile(
configFile
)
if (completeConfig.plugins?.includes('@next/next')) {
pluginIsEnabled = true
break
}
}
if (pluginIsEnabled) {
let updatedPagesDir = false
for (const rule of pagesDirRules) {
if (
!options.baseConfig!.rules?.[rule] &&
!options.baseConfig!.rules?.[
rule.replace('@next/next', '@next/babel-plugin-next')
]
) {
if (!options.baseConfig!.rules) {
options.baseConfig!.rules = {}
}
options.baseConfig!.rules[rule] = [1, pagesDir]
updatedPagesDir = true
}
}
if (updatedPagesDir) {
eslint = new ESLint(options)
}
} else {
console.log()
log.warn(
`The Next.js ESLint plugin was not detected in ${
eslintrcFile || pkgJsonPath
}. We recommend including it to prevent significant issues in your application (see https://nextjs.org/docs/basic-features/eslint).`
)
}
const results = await eslint.lintFiles([
pagePath ? join(pagesDir, pagePath) : `${pagesDir}/**/*.{js,tsx}`,
])
const errors = ESLint.getErrorResults(results)
return {
results: formatResults(baseDir, results),
hasErrors: errors?.length > 0 && !pagePath,
hasMessages: results?.length > 0,
}
}
......@@ -122,10 +122,6 @@ export const defaultConfig: NextConfig = {
serverRuntimeConfig: {},
publicRuntimeConfig: {},
reactStrictMode: false,
eslint: {
dev: false,
build: false,
},
}
export function normalizeConfig(phase: string, config: any) {
......
......@@ -60,12 +60,9 @@
]
},
"dependencies": {
"@babel/core": "7.12.10",
"@babel/eslint-parser": "7.13.4",
"@babel/runtime": "7.12.5",
"@hapi/accept": "5.0.1",
"@next/env": "10.1.1",
"@next/eslint-plugin-next": "10.1.1",
"@next/polyfill-module": "10.1.1",
"@next/react-dev-overlay": "10.1.1",
"@next/react-refresh-utils": "10.1.1",
......@@ -83,7 +80,6 @@
"cssnano-simple": "1.2.2",
"domain-browser": "4.19.0",
"encoding": "0.1.13",
"eslint": "7.9.0",
"etag": "1.8.1",
"find-cache-dir": "3.3.1",
"get-orientation": "1.1.2",
......@@ -136,6 +132,7 @@
"devDependencies": {
"@ampproject/toolbox-optimizer": "2.7.1-alpha.0",
"@babel/code-frame": "7.12.11",
"@babel/core": "7.12.10",
"@babel/plugin-proposal-class-properties": "7.12.1",
"@babel/plugin-proposal-export-namespace-from": "7.12.1",
"@babel/plugin-proposal-numeric-separator": "7.12.7",
......@@ -166,7 +163,6 @@
"@types/cookie": "0.3.3",
"@types/cross-spawn": "6.0.0",
"@types/debug": "4.1.5",
"@types/eslint": "7.2.5",
"@types/etag": "1.8.0",
"@types/fresh": "0.5.0",
"@types/json5": "0.0.30",
......
......@@ -512,7 +512,6 @@ export default class HotReloader {
this.onDemandEntries = onDemandEntryHandler(this.watcher, multiCompiler, {
pagesDir: this.pagesDir,
pageExtensions: this.config.pageExtensions,
eslint: this.config.eslint?.dev,
...(this.config.onDemandEntries as {
maxInactiveAge: number
pagesBufferLength: number
......
......@@ -4,7 +4,6 @@ import { join, posix } from 'path'
import { parse } from 'url'
import { webpack } from 'next/dist/compiled/webpack/webpack'
import * as Log from '../build/output/log'
import { verifyAndLint } from '../lib/verifyAndLint'
import {
normalizePagePath,
normalizePathSep,
......@@ -33,13 +32,11 @@ export default function onDemandEntryHandler(
{
pagesDir,
pageExtensions,
eslint,
maxInactiveAge,
pagesBufferLength,
}: {
pagesDir: string
pageExtensions: string[]
eslint: boolean
maxInactiveAge: number
pagesBufferLength: number
}
......@@ -195,15 +192,6 @@ export default function onDemandEntryHandler(
}
}
// TODO: Move out of hot-reloader into a separate process
if (eslint) {
verifyAndLint(process.cwd(), pagesDir, pagePath).then(
({ results, hasMessages }) => {
if (hasMessages) console.log(results)
}
)
}
Log.event(`build page: ${normalizedPage}`)
entries[normalizedPage] = {
......
......@@ -29,9 +29,6 @@ do
cp -r "./examples/$testCase/." "./e2e-tests/$testCase"
cd "./e2e-tests/$testCase"
# Ensure builds do not fail due to lint errors
echo "module.exports = { eslint: { build: false } }" > next.config.js
touch yarn.lock
yarn set version berry
......
......@@ -47,10 +47,7 @@ describe('distDir', () => {
it('should throw error with invalid distDir', async () => {
const origNextConfig = await fs.readFile(nextConfig, 'utf8')
await fs.writeFile(
nextConfig,
`module.exports = { distDir: '', eslint: { build: false } }`
)
await fs.writeFile(nextConfig, `module.exports = { distDir: '' }`)
const { stderr } = await nextBuild(appDir, [], { stderr: true })
await fs.writeFile(nextConfig, origNextConfig)
......@@ -61,12 +58,10 @@ describe('distDir', () => {
it('should handle null/undefined distDir', async () => {
const origNextConfig = await fs.readFile(nextConfig, 'utf8')
await fs.writeFile(
nextConfig,
`module.exports = { distDir: null, eslint: { build: false } }`
)
await fs.writeFile(nextConfig, `module.exports = { distDir: null }`)
const { stderr } = await nextBuild(appDir, [], { stderr: true })
await fs.writeFile(nextConfig, origNextConfig)
expect(stderr.length).toBe(0)
})
})
{
"extends": ["plugin:@next/next/recommended"],
"rules": {
"@next/next/no-sync-scripts": "off",
"@next/next/no-css-tags": "warn",
"@next/next/no-html-link-for-pages": ["error", "./"]
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
}
}
}
import { Head } from 'next/document'
export default class Test extends Head {
render() {
return (
<div>
<h1>Hello title</h1>
<script src="https://synchronous-script.com"></script>
<link href="/_next/static/css/styles.css" rel="stylesheet" />
</div>
)
}
}
{
"extends": ["plugin:@next/next/recommended"],
"rules": {
"@next/next/no-html-link-for-pages": ["error", "./"]
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
}
}
}
module.exports = {
eslint: {
dev: true,
build: false,
},
}
import { Head } from 'next/document'
export default class Test extends Head {
render() {
return (
<div>
<h1>Hello title</h1>
<script src="https://synchronous-script.com"></script>
<link href="/_next/static/css/styles.css" rel="stylesheet" />
</div>
)
}
}
{
"name": "hello-world",
"version": "1.0.0",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "latest",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"license": "MIT",
"eslintConfig": {
"extends": [
"plugin:@next/next/recommended"
],
"rules": {
"@next/next/no-sync-scripts": "off",
"@next/next/no-css-tags": "warn",
"@next/next/no-html-link-for-pages": [
"error",
"./"
]
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
}
}
}
}
import { Head } from 'next/document'
export default class Test extends Head {
render() {
return (
<div>
<h1>Hello title</h1>
<script src="https://synchronous-script.com"></script>
<link href="/_next/static/css/styles.css" rel="stylesheet" />
</div>
)
}
}
import { join } from 'path'
import { nextBuild } from 'next-test-utils'
import { remove } from 'fs-extra'
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../custom-eslint-config')
describe('ESLint', () => {
let stdout
let code
beforeAll(async () => {
await remove(join(appDir, '.next'))
;({ code, stdout } = await nextBuild(appDir, [], {
stdout: true,
}))
})
it('should show warnings and errors based on custom eslint config', async () => {
expect(code).toBe(0)
expect(stdout).not.toContain(
'No ESLint configuration was detected, but checks from the Next.js ESLint plugin were included automatically'
)
expect(stdout).toContain('./pages/index.js')
expect(stdout).not.toContain(
"8:9 Warning: A synchronous script tag can impact your webpage's performance @next/next/no-sync-scripts"
)
expect(stdout).toContain(
'9:9 Warning: In order to use external stylesheets use @import in the root stylesheet compiled with NextJS. This ensures proper priority to CSS when loading a webpage. @next/next/no-css-tags'
)
expect(stdout).toContain(
'9:9 Warning: Stylesheet does not have an associated preload tag. This could potentially impact First paint. @next/next/missing-preload'
)
expect(stdout).toContain('Compiled successfully')
})
})
import { join } from 'path'
import {
launchApp,
renderViaHTTP,
killApp,
findPort,
nextBuild,
} from 'next-test-utils'
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../custom-next-config')
describe('ESLint', () => {
it('should show messages in dev mode as specified in next config', async () => {
let stdout
const appPort = await findPort()
const app = await launchApp(appDir, appPort, {
onStdout(msg) {
stdout += msg || ''
},
})
await renderViaHTTP(appPort, '/')
await killApp(app)
expect(stdout).toContain('pages/index.js')
expect(stdout).toContain(
"8:9 Warning: A synchronous script tag can impact your webpage's performance @next/next/no-sync-scripts"
)
expect(stdout).toContain(
'9:9 Warning: In order to use external stylesheets use @import in the root stylesheet compiled with NextJS. This ensures proper priority to CSS when loading a webpage. @next/next/no-css-tags'
)
expect(stdout).toContain(
'9:9 Warning: Stylesheet does not have an associated preload tag. This could potentially impact First paint. @next/next/missing-preload'
)
})
it('should not show messages in build mode as specified in next config', async () => {
const { code, stdout } = await nextBuild(appDir, [], {
stdout: true,
})
expect(code).toBe(0)
expect(stdout).not.toContain('pages/index.js')
expect(stdout).not.toContain(
"8:9 Warning: A synchronous script tag can impact your webpage's performance @next/next/no-sync-scripts"
)
expect(stdout).not.toContain(
'9:9 Warning: In order to use external stylesheets use @import in the root stylesheet compiled with NextJS. This ensures proper priority to CSS when loading a webpage. @next/next/no-css-tags'
)
expect(stdout).not.toContain(
'9:9 Warning: Stylesheet does not have an associated preload tag. This could potentially impact First paint. @next/next/missing-preload'
)
expect(stdout).toContain('Compiled successfully')
})
})
import { join } from 'path'
import { nextBuild } from 'next-test-utils'
import { remove } from 'fs-extra'
jest.setTimeout(1000 * 60 * 2)
const appDir = join(__dirname, '../pkg-json-eslint-config')
describe('ESLint', () => {
let code
let output
beforeAll(async () => {
await remove(join(appDir, '.next'))
let stderr
let stdout
;({ code, stdout, stderr } = await nextBuild(appDir, [], {
stdout: true,
stderr: true,
}))
output = stderr + stdout
})
it('should show warnings and errors based on eslint config in package.json', async () => {
expect(code).toBe(0)
expect(output).not.toContain(
'The Next.js ESLint plugin was not detected in'
)
expect(output).not.toContain(
'No ESLint configuration was detected, but checks from the Next.js ESLint plugin were included automatically'
)
expect(output).toContain('./pages/index.js')
expect(output).not.toContain(
"8:9 Warning: A synchronous script tag can impact your webpage's performance @next/next/no-sync-scripts"
)
expect(output).toContain(
'9:9 Warning: In order to use external stylesheets use @import in the root stylesheet compiled with NextJS. This ensures proper priority to CSS when loading a webpage. @next/next/no-css-tags'
)
expect(output).toContain(
'9:9 Warning: Stylesheet does not have an associated preload tag. This could potentially impact First paint. @next/next/missing-preload'
)
expect(output).toContain('Compiled successfully')
})
})
export default function Index() {
return <div id="page">index &gt; index</div>
return <div id="page">index > index</div>
}
export default function Index() {
return <div id="page">index &gt; index &gt; index</div>
return <div id="page">index > index > index</div>
}
export default function Index() {
return <div id="page">index &gt; project</div>
return <div id="page">index > project</div>
}
export default function Index() {
return <div id="page">index &gt; user</div>
return <div id="page">index > user</div>
}
module.exports = {
eslint: {
build: false,
},
}
/* eslint-disable */
import React from 'react'
export default class ErrorInRenderPage extends React.Component {
static async getInitialProps() {
return {}
}
// eslint-disable-next-line react/require-render-return
render() {
throw new Error('An Expected error occured')
}
......
/* eslint-disable */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const blah: boolean = false
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const blah2 = import('../value').then((r) => r.default)
export default () => <h3>Hello TypeScript</h3>
......@@ -11,7 +11,4 @@ module.exports = {
throw new Error('Webpack require hook not applying')
return config
},
eslint: {
build: false,
},
}
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