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

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
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"
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

@dnalborczyk dnalborczyk Jul 4, 2018

Choose a reason for hiding this comment

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

I tried to explain it above:

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

Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

@dnalborczyk dnalborczyk Jul 4, 2018

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

@dnalborczyk dnalborczyk Jul 4, 2018

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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 nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Thank you!

@existentialism existentialism merged commit db1385f into babel:master Jul 5, 2018
@hzoo hzoo added the PR: Internal 🏠 A type of pull request used for our changelog categories label Jul 5, 2018
@dnalborczyk dnalborczyk deleted the upgrade-eslint branch July 18, 2018 15:19
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 A closed issue/PR that is archived due to age. Recommended to make a new issue 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.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Dependency ⬆️ PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants