-
-
Notifications
You must be signed in to change notification settings - Fork 254
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
Compatibility with new eslint config spec (flat config) #231
Comments
I tried it out quickly, and in short: Yes, it works. But there are some things to do as well. eslint.config.js: import prettier from "eslint-config-prettier";
export default [
"eslint:recommended",
prettier,
]; The above successfully disables the no-mixed-spaces-and-tabs rule from And this: import prettier from "eslint-config-prettier";
export default [
{
rules: {
semi: "error",
}
},
prettier,
]; The above successfully turns off the However, the CLI helper tool does not work:
TODO:
However, it might be too early days to do this just yet: eslint/eslint#13481 |
Changing this line: eslint-config-prettier/bin/cli.js Line 11 in a57a3bb
-const { ESLint } = require(require.resolve("eslint", {
+const { FlatESLint: ESLint } = require(require.resolve("eslint/use-at-your-own-risk", { … seems to make the CLI work with the new config system. However, that is still an unsupported API, and I need to figure out how to support both the old and new config systems at the same time. I think the conclusion for now is:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
The updated CLI tool was released in v9.0.0. The docs and tests have been updated too. |
Eslint announced a new config spec.
https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new
According to eslint's official blog, though backward compatibility was taken care of, not all shareable configs continue to work with the new config system.
Is
eslint-config-prettier
compatible with the new config?Thanks.
The text was updated successfully, but these errors were encountered: