Update dependency eslint to version 3.17.1 #123
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull Request updates dependency eslint from version
3.16.1
to3.17.1
Changelog
3.17.1 / 2017-03-06
The nonblock-statement-body-position rule is intended to compare the start line of a statement with the end line of the previous token. Due to a typo, it was comparing the end line of the statement instead, which caused false positives for multiline statements.
3.17.0 / 2017-03-03
Most of the time, it's legal to remove spacing between adjacent operator tokens,
but in a case like `+ +a` it changes the behavior, so we should skip autofixing.
Another example is `+ ++a`, and the `-` versions of all of these. Since there
are relatively few unary operators and `++` and `--` are only allowed in limited
contexts, there aren't a ton of cases to think through here, so hopefully this
is all of them.
Fixes #8013.
A few features of the `mock-fs` module are broken in Node 7.7.0+. Since our tests rely on these features, our build is currently broken. This commit temporarily updates to a patched version of mock-fs from GitHub in order to fix our build. (I've also made a pull request with the patch to the main mock-fs repo.) This is intended to be a temporary fix until a new version of mock-fs with the patch included gets released to npm.
This lists the available properties for RuleTester cases rather than relying on a usage example.
1.use set instead of regex, to improve readablity.
2.make the error message more correct.
As discussed in #7928, this commit modifies the `no-else-return`,
`no-useless-return`, `semi`, and `no-extra-semi` rules to generate fix commands
with a larger range. For the first two, the entire enclosing function is
"locked", and for the semicolon rules, just the surrounding tokens are "locked".
This works using a new `FixTracker` class, which is sort of a builder-style
class that allows the rule to specify the range to retain and then supply an
operation, and the class figures out the final text replacement.
In the future, `FixTracker` could also allow multiple replacement operations,
e.g. to make the `no-extra-parens` code a little simpler. It also might be
useful as a public API in the future.
To get the existing tests to work, I added an optional preference to run
multiple passes for an autofix test. It turns out that running multiple passes
by default causes problems in a number of tests, and likely slows down the
tests, so I just made it opt-in for now.