Skip to content

Conversation

okonet
Copy link
Contributor

@okonet okonet commented Feb 4, 2017

What kind of change does this PR introduce?
build related change

Did you add tests for your changes?

Not needed

If relevant, did you update the documentation?

Not needed

Summary

https://github.com/mysticatea/eslint-plugin-node implements some useful checks that can preven bugs related to Node. One of my favorites is https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features.md that checks our code againt engines field of package.json and doesn't allow using unsupported ES2015 features.

Does this PR introduce a breaking change?

No

Other information

This is WIP!

@okonet
Copy link
Contributor Author

okonet commented Feb 4, 2017

I've fixed a few issues already but there are still some to go:

/Users/okonet/Projects/OSS/webpack-cli/lib/parser/resolve-packages.js
   2:7   error    Destructuring are not supported yet on Node v4      node/no-unsupported-features
  18:42  warning  'result' is defined but never used                  no-unused-vars
  19:8   warning  'packageModule' is assigned a value but never used  no-unused-vars
  30:12  warning  'err' is defined but never used                     no-unused-vars

/Users/okonet/Projects/OSS/webpack-cli/lib/parser/validateOptions.js
  8:8  error  Destructuring are not supported yet on Node v4  node/no-unsupported-features

/Users/okonet/Projects/OSS/webpack-cli/lib/transformations/defineTest.js
  16:28  error  "eslint" is not published                                     node/no-unpublished-require
  71:1   error  Unexpected access to 'exports'. Use 'module.exports' instead  node/exports-style
  87:1   error  Unexpected access to 'exports'. Use 'module.exports' instead  node/exports-style

/Users/okonet/Projects/OSS/webpack-cli/lib/transformations/loaders/__tests__/loaders.test.js
  1:1  error  Import and Export Declarations are not supported yet on Node v4  node/no-unsupported-features

/Users/okonet/Projects/OSS/webpack-cli/lib/transformations/resolve/__tests__/resolve.test.js
  1:1  error  Import and Export Declarations are not supported yet on Node v4  node/no-unsupported-features

/Users/okonet/Projects/OSS/webpack-cli/lib/transformations/safeTraverse.js
  1:46  error  Default Parameters are not supported yet on Node v4  node/no-unsupported-features

✖ 11 problems (8 errors, 3 warnings)

Everyone is welcome to take a few and fix them :)

@evenstensberg
Copy link
Member

You can ignore parser for now, put up a issue on it and assign it to me

@okonet okonet requested a review from DanielaValero February 4, 2017 14:53
@okonet okonet self-assigned this Feb 4, 2017
@DanielaValero
Copy link
Contributor

LGTM. Will merge

@DanielaValero DanielaValero reopened this Feb 5, 2017
@DanielaValero DanielaValero merged commit 7284e09 into master Feb 5, 2017
@DanielaValero DanielaValero deleted the feature/eslint-plugin-node branch February 5, 2017 13:17
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.

3 participants