-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Add node/no-unsupported-features
rules and fix unit tests
#341
Conversation
@sindresorhus it seems the repo is not activated on Travis anymore. Maybe the orga has been migrated to |
4f59869
to
61b8416
Compare
This is a great addition, I'm just reluctant to merge it because it's going to cause a lot of problems for me. I use async functions with AVA in lots of tests (that are transpiled), even though the module targets Node.js 6. Can we This is what I'm seeing everywhere:
|
It's not migrated, but I've had this issue on other repos too. Probably just another Travis bug. I've tried to reactivate the repo now, but I don't think it takes effect on existing PRs... |
Now that you mention that, it might create other issues unless you use The proper fix would be to detect AVA files and put them in an override with Maybe I can split this PR in two:
|
See #344 |
Was there a PR for this with a discussion? Link? |
Yes: #281 |
61b8416
to
17ecf3e
Compare
I think this feature is pretty valuable. How about we do |
I don't think it's a good idea, because even if Maybe we could just set |
9bbe1bf
to
2ab0a69
Compare
Good news. AVA no longer includes Babel by default. https://github.com/avajs/ava/releases/tag/v3.0.0 |
17ecf3e
to
1fde568
Compare
@@ -226,31 +224,32 @@ test('buildConfig: nodeVersion: false', t => { | |||
t.is(config.rules['node/prefer-promises/fs'], 'off'); | |||
}); | |||
|
|||
test('buildConfig: nodeVersion: invalid range', t => { |
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.
Removed that test as this case can never actually happens as the validity of the semver range is verified earlier in mergeOptions
@sindresorhus I updated the PR and clarified the doc regarding transpiled code. If you have a codebase that targets two different Node version (as it was the case with AVA) then you will need to define an But any case it's a good practice to define such |
👍 |
Awesome to be able to finally merge this 🙌 |
Fix #108
The following rules are added, only if the
node-version
is used or if thepackage.json
has a validengines.node
prop:node/no-unsupported-features/es-builtins
node/no-unsupported-features/es-syntax
node/no-unsupported-features/node-builtins