Skip to content
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: add "no-unused-vars" #41

Merged
merged 5 commits into from
Jun 8, 2019
Merged

New: add "no-unused-vars" #41

merged 5 commits into from
Jun 8, 2019

Conversation

g-plane
Copy link
Collaborator

@g-plane g-plane commented Jun 7, 2019

Fixes #33 .

@aladdin-add aladdin-add self-requested a review June 7, 2019 08:43
valid: [
{
code: "import 'm'",
parserOptions: { sourceType: "module" }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is required to use {ecmaVersion: 6} in eslint v6 (not published yet).

also, you can use const ruleTester = new RuleTester({parserOpitons: {...}});

@g-plane g-plane marked this pull request as ready for review June 7, 2019 15:49
@g-plane g-plane requested a review from aladdin-add June 7, 2019 15:49
Copy link
Owner

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code looks good to me.

can you add some more tests like:

var undef; // => autofix
var t = `foo-${bar()}`; // no-autofix
var a = b = c; // either

@g-plane g-plane requested a review from aladdin-add June 8, 2019 01:07
Copy link
Owner

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@aladdin-add aladdin-add merged commit 332822c into master Jun 8, 2019
@aladdin-add aladdin-add deleted the no-unused-vars branch June 8, 2019 03:47
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.

no-unused-vars
2 participants