-
Notifications
You must be signed in to change notification settings - Fork 117
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
Upgrade to ESLint 8 #250
Comments
+1 for upgrade to eslint v7.0.0, here is a real case, I am recently working on migration from tslint to eslint, and I found eslint has an important fix on the id-blacklist rule in v7, but unfortunately gulp-eslint doesn't support the newest version and I got many complaints in the code, unlike gulp-tslint, seems the API for gulp-eslint cannot specify a version for the dependent eslint, so I have to wait for a gulp-eslint package update to support eslint 7. |
Same, gulp-eslint is broken on eslint v7.0, ran into this converting a repo to TS Running eslint directly from .bin works just fine, but gulp-eslint is unable to find my config files in 7.0 |
ESLint 7.3.0 was released on Jun 19th, is it time to think about forking this project to leverage ESLint 7.x features in gulp? |
If it helps, I have created a fork that uses ESLint 8 for linting. It already supports all new options, but also still accepts options in the old gulp-elint/CLIEngine format for compatibility. There is still work to be done: make some adjustments for a couple of things that have changed in new versions of ESLint, improve the output and update the documentation. |
With yarn, I was able to work-around this by adding "eslint" to "resolutions" in my
I believe that you can do something similar with |
Really eslint should be a peer dependency |
Any progress on this? |
Fixed based in adametry/gulp-eslint#250
Yes it seems to be working for me with npm-shrinkwrap.json (need to fix all the the new eslint errors I have in my code now). Any news on a coming fix? |
Make this plugins also like https://github.com/olegskl/gulp-stylelint |
You can always create your own Gulp task called Here's a start: import { ESLint } from 'eslint'
import { argv } from 'yargs'
import log from 'fancy-log'
import colors from 'ansi-colors'
import PluginError from 'plugin-error'
const fileGlobs = ['src/**/*.js']
async function lint() {
const { fix } = argv
try {
const eslint = new ESLint({ fix })
const formatter = await eslint.loadFormatter('stylish')
const results = await eslint.lintFiles(fileGlobs)
const errors = ESLint.getErrorResults(results)
const resultText = formatter.format(results)
if (fix) {
await ESLint.outputFixes(results)
}
if (errors.length) {
log(resultText)
// Beep sound in console
process.stdout.write('\u0007')
} else {
log(colors.green('✓ Linting Successful'))
}
} catch (err) {
throw new PluginError('lint', err)
}
}
export { lint } |
I finished the remaining work on gulp-eslint-new, so I thought I would provide an update here. ESLint 8 and all related features should be working as expected now, as described in the documentation and in the updated examples. If anybody decides to try it out and give me a feedback, that would be greatly appreciated. Contributions would be even more welcome of course. |
Sad to see packages being split apart cuz one is no longer being updated... |
@fasttime Thanks for this! Works great! |
ESLint 7ESLint 8 has been released and it includes some important breaking changes. Any plans to support the new version?The text was updated successfully, but these errors were encountered: