Skip to content

Change Linter to CLIEngine to use plugins on ESLint#166

Open
americoneto1 wants to merge 3 commits into
es-analysis:masterfrom
americoneto1:master
Open

Change Linter to CLIEngine to use plugins on ESLint#166
americoneto1 wants to merge 3 commits into
es-analysis:masterfrom
americoneto1:master

Conversation

@americoneto1

Copy link
Copy Markdown

Actually, Plato uses linter verify as you can see below:
https://github.com/es-analysis/plato/blob/master/lib/reporters/eslint/index.js#L39

But using linter on this way, eslint plugins doesn't work. ESLint team recommends use CLIEngine instead of Linter Verify (eslint/eslint#4119 (comment)).

Could you please validate this PR and if it's OK procceds with merge on master branch?

Thank you!

@americoneto1

Copy link
Copy Markdown
Author

Anyone can check this PR?

@jsoverson

Copy link
Copy Markdown
Member

Thanks @americoneto1, can you add some tests for eslint in general? I don't use this functionality and don't know the use cases to test for (eg eslintrcs, plugins, etc).

@ColCh

ColCh commented Dec 2, 2015

Copy link
Copy Markdown

@americoneto1 we can't use another name for eslint config instead of .eslintrc?

@conradoqg

Copy link
Copy Markdown

Please, merge this pull request. This made eslint work.

@americoneto1

Copy link
Copy Markdown
Author

@ColCh As far as I know, when we use CLIEngine, the eslint file name must be .eslintrc.
@conradoqg Did you test this PR on your project?

…ons. Fixes the test of strip comment utility.
@conradoqg

Copy link
Copy Markdown

Look at the recent pull request i made to your fork. There, you need to pass the config path, instead of an object. With a json file, it worked for me.

ESLint config correction and test.
@JSlain

JSlain commented Sep 5, 2016

Copy link
Copy Markdown

This pull request is still actuality.
However, the new test is failing...
It relies on 2 other existing fixture files (a and b), and on a default ESLint configuration.
The meaning of "extends": "eslint:recommended" changes over time, this makes the test hard to maintain.
I think the test shouldn't rely on this extends.

@jmullo

jmullo commented Jan 26, 2017

Copy link
Copy Markdown

Is there another way to get ESLint plugins to work before this is fixed?

@ColCh

ColCh commented Jan 26, 2017

Copy link
Copy Markdown

@jmullo use forks
https://github.com/Lingvokot/es6-plato this on one is used by me. However, I don't recommend it :)

kyungilpark added a commit to kyungilpark/plato that referenced this pull request Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants