vs-code-prettier-eslint
vs-code-prettier-eslint copied to clipboard
Don't support ESlint v9.x
log as below:
Error: Could not warm up worker. Formatting a file for the first time may take longer than usual.
Message: Invalid Options:
- Unknown options: ignorePath, resolvePluginsRelativeTo, rulePaths, useEslintrc
- 'resolvePluginsRelativeTo' has been removed.
- 'ignorePath' has been removed.
- 'rulePaths' has been removed. Please define your rules using plugins.
Stacktrace: Error: Invalid Options:
- Unknown options: ignorePath, resolvePluginsRelativeTo, rulePaths, useEslintrc
- 'resolvePluginsRelativeTo' has been removed.
- 'ignorePath' has been removed.
- 'rulePaths' has been removed. Please define your rules using plugins.
at processOptions (e:\eslint-test\node_modules\eslint\lib\eslint\eslint-helpers.js:853:15)
at new ESLint (e:\eslint-test\node_modules\eslint\lib\eslint\eslint.js:688:34)
at getESLint (e:\eslint-test\node_modules\prettier-eslint\dist\utils.js:337:12)
at getESLintConfig (e:\eslint-test\node_modules\prettier-eslint\dist\index.js:268:39)
at analyze (e:\eslint-test\node_modules\prettier-eslint\dist\index.js:80:77)
at format (e:\eslint-test\node_modules\prettier-eslint\dist\index.js:50:13)
Bump?
+1
+1
+1
For those still having issues it might be worth looking into https://github.com/idahogurl/vs-code-prettier-eslint/issues/222
This issue is stale because it has been open for 14 days with no activity.
😡
same
any progress?
+1
+1
+1
@idahogurl Is this repo still maintained? If not would you care to set it to archived so that people can move on? Thanks.
@Mettbrot This extension uses the prettier-eslint package which has not been updated to support ESLint 9. Until the prettier-eslint package is updated, this extension will continue to use ESLint 8. As you can see, there was a PR created to support ESLint but it was closed due to inactivity. https://github.com/prettier/prettier-eslint/pull/1036
@idahogurl yep, I started an attempt to convert pretter-eslint to support ESLint@9, but having issues with the tests. I'm not an OG contributor or maintainer of this, so it goes very slowly.
I think the only thing that remains is to get all the tests to run/or have other viable tests, and do a sanity check to see if it works as intended. Still waiting for the question about config presedence.
Feel free to aid me or the maintainers in this: https://github.com/prettier/prettier-eslint/pull/1036
In case anyone is bumping into this, you can still use Prettier in ESLint with eslint-plugin-prettier and configure Prettier in prettier.config.js. There is some difference between prettier-eslint and eslint-plugin-prettier as the latter runs Prettier as a rule while prettier-eslint runs Prettier before running ESLint, thus allowing the Prettier output to not comply with your ESLint linting rules; still, if you are ok with running Prettier as an ESLint rule, this will work for you.
This is how my Angular environment is setup
// eslint.config.js
// @ts-check
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const angular = require("angular-eslint");
const prettierRecommended = require("eslint-plugin-prettier/recommended");
module.exports = tseslint.config(
{
files: ["src/**/*.ts"],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended,
prettierRecommended,
],
processor: angular.processInlineTemplates,
rules: {
"@angular-eslint/directive-selector": [
"error",
{
type: "attribute",
prefix: "app",
style: "camelCase",
},
],
"@angular-eslint/component-selector": [
"error",
{
type: "element",
prefix: "app",
style: "kebab-case",
},
],
},
},
{
files: ["**/*.html"],
extends: [
...angular.configs.templateRecommended,
...angular.configs.templateAccessibility,
],
rules: {},
}
);
// prettier.config.js
module.exports = require('prettier-config-xo/space');
This issue is stale because it has been open for 14 days with no activity.
This issue is stale because it has been open for 14 days with no activity.
no
+1
Please help to test out the first prototype https://github.com/prettier/prettier-eslint/releases/tag/v17.0.0-alpha.1 which only supports Flat Config yet, legacy eslintrc support will be added back soon later.
Thank you!! @idahogurl could you maybe also release an alpha version of the Plugin for us to test?
ping @idahogurl
+1
This issue is stale because it has been open for 14 days with no activity.
Rebecca, this Addon has 3,5 Million installs. If you could send a life sign that this plugin is still being worked on, that would be great!
Rebecca, this Addon has 3,5 Million installs. If you could send a life sign that this plugin is still being worked on, that would be great!
@Mettbrot this extension relies on the project "prettier-eslint". JounQin contributed ESLint v9 Flat config support and it was released with https://github.com/prettier/prettier-eslint/releases/tag/v17.0.0-alpha.0.
Idahogurl is probably waiting for a full release. However, you could contribute toward a prerelease of this extension by updating and refactoring for the prettier-eslint v17 prerelease.
Please help to test out the first prototype https://github.com/prettier/prettier-eslint/releases/tag/v17.0.0-alpha.1 which only supports Flat Config yet, legacy eslintrc support will be added back soon later.
@JounQin have you considered using @eslint/eslintrc for legacy config compatibility?
As you quoted:
which only supports Flat Config yet, legacy eslintrc support will be added back soon later.
This issue is stale because it has been open for 14 days with no activity.
This issue is stale because it has been open for 14 days with no activity.
no