standard-engine icon indicating copy to clipboard operation
standard-engine copied to clipboard

extension whitelist feature

Open mightyiam opened this issue 8 years ago • 3 comments

mightyiam avatar Jan 02 '17 22:01 mightyiam

Corresponding with https://github.com/feross/standard/pull/703.

mightyiam avatar Jan 02 '17 22:01 mightyiam

I can see that I've implemented this feature when whitelist is provided in new Linter(opts), and not in Linter.prototype.lintText nor Linter.prototype.lintFiles.

Question: why does the API allow for providing opts to lintText and lintFiles versus only on instantiation? This seems unusual to me and it does not mimic ESLint's executeOnText nor executeOnFiles. So I don't get it.

Question: both lintText and lintFiles use parseOpts to parse the opts. Why does the Linter constructor not do this, please? If it did, I could have added the feature strictly in parseOpts. That seems the reasonable thing to do, doesn't it? Should I make a prior PR in which the constructor uses parseOpts?

Question: Is it time to move forward and drop node v4 or should I add strict mode or should I target non-strict node v4?

:cat:

mightyiam avatar Jan 02 '17 22:01 mightyiam

Question: why does the API allow for providing opts to lintText and lintFiles versus only on instantiation? This seems unusual to me and it does not mimic ESLint's executeOnText nor executeOnFiles. So I don't get it.

I really don't know why this is the case. Perhaps to allow functional usage of just using lintText or lintFiles without having to call parseOpts or a constructor?

Question: both lintText and lintFiles use parseOpts to parse the opts. Why does the Linter constructor not do this, please? If it did, I could have added the feature strictly in parseOpts. That seems the reasonable thing to do, doesn't it? Should I make a prior PR in which the constructor uses parseOpts?

I agree in that I think we should unify the options parsing. We should just use parseOpts to parse both the constructor opts and the lintText/lintFiles opts. That should allow it to maintain backwards compatibility. This would mean all options parsing/setting would only need to be implemented one time in parseOpts. Maybe at a later date, we can look into modernizing the exported API to allow opts initialization only in the constructor.

Question: Is it time to move forward and drop node v4 or should I add strict mode or should I target non-strict node v4?

We should definitely drop node v4 support and migrate up to a minimum node v8 (Edit: fixed)

toddbluhm avatar Apr 30 '20 07:04 toddbluhm