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
New: multiple processors support (fixes #11035, fixes #11725) #11552
Conversation
aaf72a8
to
4f3f181
Compare
4f3f181
to
c337fe8
Compare
c337fe8
to
2055f6c
Compare
2055f6c
to
d8a4c53
Compare
I updated this PR and I believe ready for review. |
d8a4c53
to
ed33de2
Compare
ed33de2
to
7fb58a3
Compare
I'm sorry, I updated this PR because I found I believe ready for review, again. |
# Conflicts: # tests/lib/cli-engine.js
I have added some additional tests because the coverage check failed after I merged master into this branch. Some tests are not related to this feature, but it improves coverage. |
Co-Authored-By: Ilya Volodin <ivolodin@gmail.com>
Co-Authored-By: Ilya Volodin <ivolodin@gmail.com>
Co-Authored-By: Ilya Volodin <ivolodin@gmail.com>
Co-Authored-By: Ilya Volodin <ivolodin@gmail.com>
Thank you for your review! I updated this PR. |
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.
LGTM in general, just some minor suggestions for readability. Thanks!
Thank you for your review! I updated this PR. |
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.
LGTM, thanks!
…ps://github.com/eslint/rfcs/tree/master/designs/2018-processors-improvements / eslint/eslint#11552 Upgrade: Update deps. and devDeps; istanbul -> nyc Update object-assign, unified, remark-parse for deps and eslint-release, chai, mocha, eslint for devDeps. In process of updating: 1. Get plugins tests to work with eslint 6 2. In whitespace processor test, add an extra line break for the expected since `remark-parse@7` started preserving them (see remarkjs/remark#351 )
…ps://github.com/eslint/rfcs/tree/master/designs/2018-processors-improvements / eslint/eslint#11552 Upgrade: Update deps. and devDeps; istanbul -> nyc Update object-assign, unified, remark-parse for deps and eslint-release, chai, mocha, eslint for devDeps. In process of updating: 1. Get plugins tests to work with eslint 6 2. In whitespace processor test, add an extra line break for the expected since `remark-parse@7` started preserving them (see remarkjs/remark#351 )
…ps://github.com/eslint/rfcs/tree/master/designs/2018-processors-improvements / eslint/eslint#11552 Upgrade: Update deps. and devDeps; istanbul -> nyc Update object-assign, unified, remark-parse for deps and eslint-release, chai, mocha, eslint for devDeps. In process of updating: 1. Get plugins tests to work with eslint 6 2. In whitespace processor test, add an extra line break for the expected since `remark-parse@7` started preserving them (see remarkjs/remark#351 )
…ps://github.com/eslint/rfcs/tree/master/designs/2018-processors-improvements / eslint/eslint#11552 Upgrade: Update deps. Update object-assign, unified, remark-parse for deps. In process of updating, for whitespace processor test, add an extra line break for the expected since `remark-parse@7` started preserving them (see remarkjs/remark#351 )
…ps://github.com/eslint/rfcs/tree/master/designs/2018-processors-improvements / eslint/eslint#11552 Upgrade: Update deps. Update object-assign, unified, remark-parse for deps. In process of updating, for whitespace processor test, add an extra line break for the expected since `remark-parse@7` started preserving them (see remarkjs/remark#351 )
…ps://github.com/eslint/rfcs/tree/master/designs/2018-processors-improvements / eslint/eslint#11552 Upgrade: Update deps. Update object-assign, unified, remark-parse for deps. In process of updating, for whitespace processor test, add an extra line break for the expected since `remark-parse@7` started preserving them (see remarkjs/remark#351 )
…ps://github.com/eslint/rfcs/tree/master/designs/2018-processors-improvements / eslint/eslint#11552 Upgrade: Update deps. Update object-assign, unified, remark-parse for deps. In process of updating, for whitespace processor test, add an extra line break for the expected since `remark-parse@7` started preserving them (see remarkjs/remark#351 )
…ps://github.com/eslint/rfcs/tree/master/designs/2018-processors-improvements / eslint/eslint#11552 Upgrade: Update deps. Update unified, remark-parse for deps. In process of updating, for whitespace processor test, add an extra line break for the expected since `remark-parse@7` started preserving them (see remarkjs/remark#351 )
…ps://github.com/eslint/rfcs/tree/master/designs/2018-processors-improvements / eslint/eslint#11552 Upgrade: Update deps. Update unified, remark-parse for deps. In process of updating, for whitespace processor test, add an extra line break for the expected since `remark-parse@7` started preserving them (see remarkjs/remark#351 )
…ps://github.com/eslint/rfcs/tree/master/designs/2018-processors-improvements / eslint/eslint#11552 Upgrade: Update deps. Update unified, remark-parse for deps. In process of updating, for whitespace processor test, add an extra line break for the expected since `remark-parse@7` started preserving them (see remarkjs/remark#351 )
What is the purpose of this pull request? (put an "X" next to item)
[X] Add something to the core: fixes #11035, fixes #11725
What changes did you make? (Give an overview)
This PR adds support for multiple processors (eslint/rfcs#3).
preprocess
method of processors now can return{ text, filename }
formed objects.processor
key in config files.disableFixs
option inLinter#verify()
method to disable autofix for the processors which don't support autofix in recursive calls.filterCodeBlock
option inLinter#verify()
method to filter code blocks by--ext
option in recursive calls.This implementation is different a bit from what eslint/rfcs#3 described because #11546 improved the configuration calculation. The current configuration calculation doesn't need file systems, so we don't need to move the application of processors to
CLIEngine
. It avoided cloningLinter#verifyAndFix
logic toCLIEngine
.Is there anything you'd like reviewers to focus on?
Nothing in particular.