-
Notifications
You must be signed in to change notification settings - Fork 52
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
fix(deps): update dependency eslint to v9 #2690
Conversation
This pull request is automatically being deployed by Amplify Hosting (learn more). |
06c59c5
to
556e703
Compare
52b344b
to
2ca63d8
Compare
a39a384
to
dfdcc0f
Compare
b20bc73
to
580929a
Compare
580929a
to
6036608
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
recommendedConfig: js.configs.recommended, | ||
}); | ||
|
||
module.exports = [ |
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 flat config file format has been the default configuration file format since ESLint v9.0.0
Ref: https://eslint.org/docs/latest/use/configure/migration-guide#start-using-flat-config-files
The previous format, eslintrc, is now deprecated .
eslint.config.js
Outdated
...fixupConfigRules( | ||
compat.extends("@cybozu/eslint-config/presets/node-typescript-prettier"), | ||
eslintPluginNode, | ||
), |
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.
If you are using FlatCompat from the @eslint/eslintrc package, you may not be able to access each of the plugins that are referenced inside of an eslintrc-style configuration. In that case, you can use the fixupConfigRules() function to wrap all plugins, as in this example:
// eslint.config.js
import { fixupConfigRules } from "@eslint/compat";
import { FlatCompat } from "@eslint/eslintrc";
const flatCompat = new FlatCompat();
export default [
...fixupConfigRules(
flatCompat.extends("my-config")
)
// other config
];
Ref: https://eslint.org/blog/2024/05/eslint-compatibility-utilities/#using-with-flatcompat
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
}); |
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.
-
import FlatCompat and create a new instance to convert an existing eslintrc config. For example, if the npm package eslint-config-my-config is in eslintrc format.
Ref: https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config -
TypeError: Missing parameter 'recommendedConfig' in FlatCompat constructor
=> The recommendedConfig option is required when any config uses eslint:recommended, including any config in an extends clause. To fix this, using @eslint/js to provide the eslint:recommended config.
Ref: https://github.com/eslint/eslintrc?tab=readme-ov-file#troubleshooting
|
||
module.exports = [ | ||
{ | ||
files: ["plugin-uploader/**/*.ts"], |
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.
@@ -48,7 +48,7 @@ | |||
"start": "pnpm build --watch", | |||
"build": "pnpm clean && tsc --build --force", | |||
"clean": "rimraf dist", | |||
"lint": "eslint --ext .ts src --max-warnings 0", | |||
"lint": "eslint src --max-warnings 0", |
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 following CLI flags are no longer supported with the flat config file format:
--rulesdir
--ext
--resolve-plugins-relative-to
Ref: https://eslint.org/docs/latest/use/configure/migration-guide#cli-flag-changes
@@ -315,7 +313,6 @@ export class RecordClient extends BaseClient { | |||
const { id } = await this.createCursor(params); | |||
try { | |||
let allRecords: T[] = []; | |||
// eslint-disable-next-line no-constant-condition |
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.
Using the recommended config from @eslint/js in a configuration file enables this rule.
Ref: https://eslint.org/docs/latest/rules/no-constant-condition
…etting for globals
This PR contains the following updates:
^8.57.0
->^9.3.0
Release Notes
eslint/eslint (eslint)
v9.3.0
Compare Source
v9.2.0
Compare Source
v9.1.1
Compare Source
v9.1.0
Compare Source
v9.0.0
Compare Source
Configuration
📅 Schedule: Branch creation - "after 9pm,before 9am" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.