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

upgrades eslint v5 (major), babel-eslint, eslint-plugin-flowtype, eslint-plugin-prettier #8259

Merged
merged 4 commits into from Jul 5, 2018

Conversation

@dnalborczyk
Copy link
Contributor

dnalborczyk commented Jul 4, 2018

Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR
Any Dependency Changes? eslint v5.0.1, babel-eslint v8.25, eslint-plugin-flowtype v2.49.3, eslint-plugin-prettier v2.6.1
License MIT

make lint and make fix pass

migration guide:
https://eslint.org/docs/5.0.0/user-guide/migrating-to-5.0.0

breaking change, v5 throws for non-existing files:`
https://eslint.org/docs/5.0.0/user-guide/migrating-to-5.0.0#-linting-nonexistent-files-from-the-command-line-is-now-a-fatal-error
-> removed non-existing glob, in addition removed default file .js extension glob

breaking change, v5 no-unused-vars reports all after-used params
https://eslint.org/blog/2018/04/eslint-v5.0.0-alpha.1-released#breaking-changes
-> added // eslint-disable-line no-unused-vars

@babel-bot

This comment has been minimized.

Copy link
Collaborator

babel-bot commented Jul 4, 2018

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/8489/

@@ -47,10 +47,10 @@ flow:
./node_modules/.bin/flow check --strip-root

lint:
./node_modules/.bin/eslint scripts $(SOURCES) '*.js' '**/.*.js' --format=codeframe --rulesdir="./scripts/eslint_rules"

This comment has been minimized.

Copy link
@nicolo-ribaudo

nicolo-ribaudo Jul 4, 2018

Member

Why where these removed? I think that it was used to lint things like babel.config.js

This comment has been minimized.

Copy link
@dnalborczyk

dnalborczyk Jul 4, 2018

Author Contributor

I tried to explain it above:

babel.config.js seems to fall through the crack though, let me check ...

This comment has been minimized.

Copy link
@nicolo-ribaudo

nicolo-ribaudo Jul 4, 2018

Member

I don't get why it is non-existing, it should just match everything... I guess I will download this PR and test it

This comment has been minimized.

Copy link
@dnalborczyk

dnalborczyk Jul 4, 2018

Author Contributor

oh I see. just looking at it a little closer: '**/.*.js'

I suppose there are no files with . (dot)something.js anymore. the (old?) babel.config.js probably started with a dot prior.

eslint v5 doesn't find anything starting with . (dot), and throws.

This comment has been minimized.

Copy link
@dnalborczyk

dnalborczyk Jul 4, 2018

Author Contributor

I think we could take out $(SOURCES), and replace it with '**/*.js' (everything), and .eslintignore excludes everything which needs to be excluded. that runs just fine, and includes babel.config.js as well.

This comment has been minimized.

Copy link
@nicolo-ribaudo

nicolo-ribaudo Jul 4, 2018

Member

Oh, i didn't notice the . in .*.js. It is ok to have sources instead of **/*.js (we would lint too much otherwise), but *.js should still be there. I tested it locally ant with this patch babel.config.js isn't linted anymore.

This comment has been minimized.

Copy link
@dnalborczyk

dnalborczyk Jul 4, 2018

Author Contributor

I didn't really see it either 😃 I only saw eslint complaining, and removed it.

alrighty, I'll put '*.js' back shortly and leave $(SOURCES) as is.

Copy link
Member

nicolo-ribaudo left a comment

Thank you!

@existentialism existentialism merged commit db1385f into babel:master Jul 5, 2018
4 checks passed
4 checks passed
babel/repl REPL preview is available
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 80.72% (target 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dnalborczyk dnalborczyk deleted the dnalborczyk:upgrade-eslint branch Jul 18, 2018
storyn26383 pushed a commit to UniSharp/babel that referenced this pull request Aug 6, 2018
…int-plugin-prettier (babel#8259)

* upgrade eslint v5 (major), babel-eslint (minor), eslint-plugin-flowtype (minor), eslint-plugin-prettier (patch)

* fix makefile: remove (default) .js file extension, remove non-existing glob pattern

* fix linting errors

* add '*.js' glob back to include babel.config.js for linting
@lock lock bot added the outdated label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
6 participants
You can’t perform that action at this time.