-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: migrate from ESLint v8 to ESLint v9 flat config #5825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| 'use strict'; | ||
|
|
||
| const url = require('url'); | ||
| const url = require('node:url'); | ||
|
|
||
|
|
||
| module.exports = { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { fixupConfigRules } from '@eslint/compat'; | ||
| import { FlatCompat } from '@eslint/eslintrc'; | ||
| import path from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = path.dirname(__filename); | ||
|
|
||
| const compat = new FlatCompat({ | ||
| baseDirectory: __dirname, | ||
| }); | ||
|
|
||
| export default [ | ||
| { | ||
| ignores: [ | ||
| 'test/fixtures/**', | ||
| 'examples/**/app/public/**', | ||
| 'logs/**', | ||
| 'run/**', | ||
| 'docs/node_modules/**', | ||
| 'site/**', | ||
| ], | ||
| }, | ||
| ...fixupConfigRules(compat.extends('eslint-config-egg')), | ||
| ]; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| 'use strict'; | ||
|
|
||
| const util = require('util'); | ||
| const util = require('node:util'); | ||
| const is = require('is-type-of'); | ||
| const URL = require('url').URL; | ||
| const URL = require('node:url').URL; | ||
|
|
||
| module.exports = { | ||
| convertObject, | ||
|
|
@@ -87,7 +87,7 @@ | |
| function safeParseURL(url) { | ||
| try { | ||
| return new URL(url); | ||
| } catch (err) { | ||
| } catch { | ||
| return null; | ||
| } | ||
| } | ||
|
|
@@ -100,10 +100,10 @@ | |
| * - Allows overriding properties on the proxy target (overlay) to take effect. | ||
| * - Delegates everything else to the real object. | ||
| * | ||
| * @param {Object} options | ||
|
Check warning on line 103 in lib/core/utils.js
|
||
| * @param {Function} options.createReal Create the real object (lazy) | ||
| * @param {boolean} [options.bindFunctions=true] Bind real methods to the real object | ||
| * @return {Proxy} | ||
|
Check warning on line 106 in lib/core/utils.js
|
||
| */ | ||
| function createTransparentProxy({ createReal, bindFunctions = true }) { | ||
| if (typeof createReal !== 'function') { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The versions for several new ESLint-related dependencies appear to be incorrect as they do not correspond to any published versions on npm. This will likely cause the
npm installcommand to fail.Please verify the versions for
@eslint/compat,@eslint/eslintrc,@eslint/js,eslint, andglobalsand update them to valid, published versions from the npm registry.