-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
feat(cli-plugin-eslint): use ESLint class instead of CLIEngine #6714
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
Conversation
const keyPaths = [...renamedArrayArgs[key]] | ||
const lastKey = keyPaths.pop() | ||
for (const k of keyPaths) { | ||
config[k] = {} | ||
} | ||
config[lastKey] = args[key].split(',') |
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.
With
env: ['overrideConfig', 'env'],
global: ['overrideConfig', 'globals'],
--env browser --global window
gets normalized to
{
overrideConfig: {},
env: ['browser'],
globals: ['window']
}
Is this the intended result?
Because in my understanding, env
and globals
should be put under overrideConfig
.
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.
That's a bug. sorry I will fix it 😓
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.
Thank you for your review!
I changed this PR. Could you check it again?
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.
It's a little disappointing that cli-plugin-eslint
need to do some repetitive work (translateOptions) what ESLint
has done. 😢
https://github.com/eslint/eslint/blob/16034f09ae6c7a78b8268b4c859928f18de7b9d6/lib/cli.js#L62
https://github.com/eslint/eslint/blob/16034f09ae6c7a78b8268b4c859928f18de7b9d6/lib/cli.js#L232
😅It's actually a bug in my previous tests. I've fixed it in the dev branch. The PR looks good to me now, so don't mind the tests, I'll merge it. |
When is this supposed to be merged and released? ESLint 8.0 is out, so upgrading my Vue projects to the latest ESLint version breaks my builds. |
It's already released in 5.0.0-beta.5 |
Thank you for the quick reply. When do you expect v5 to be GA? |
I can't give a guaranteed date because I've missed my own deadline multiple times. |
Will this be released to the 4.x line as well? I was happy to see a new release today thinking I could upgrade ESLint too, but to no avail. If not, would there be any other way of enabling ESLint 8.0 while using Vue CLI 4.x? |
@ota-meshi any news about the v4 backport? |
Having same issue |
This PR replaces CLIEngine with the ESLint class.
CLIEngine will be removed in eslint v8 and must be replaced with the ESLint class to support eslint v8.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
Options may be affected by this change, but should not affect the options listed in the README.
https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint#readme
Other information: