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

[LINT] Remove fix option for ESLint #2036

Merged
merged 4 commits into from
Nov 7, 2019
Merged

Conversation

harupy
Copy link
Member

@harupy harupy commented Nov 3, 2019

What changes are proposed in this pull request?

This PR propses to remove --fix option from server/js/lint.sh (link) because with --fix option, eslint exits with 0 if all the detected violations are fixable. This behavior might allow code that violates the lint rules to pass the CI tests.

How is this patch tested?

Tested on this PR #2035

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)

What component(s) does this PR affect?

  • UI
  • CLI
  • API
  • REST-API
  • Examples
  • Docs
  • Tracking
  • Projects
  • Artifacts
  • Models
  • Scoring
  • Serving
  • R
  • Java
  • Python

How should the PR be classified in the release notes? Choose one:

  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

@harupy harupy changed the title Remove fix option for ESLint [LINT] Remove fix option for ESLint Nov 3, 2019
Copy link
Contributor

@Zangr Zangr left a comment

Choose a reason for hiding this comment

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

Good point on removing this to prevent false positive in CI test. @smurching, maybe we can have a separate script for CI(lint_ci.sh)? I personally find --fix pretty useful during development.

@aarondav
Copy link
Contributor

aarondav commented Nov 5, 2019

Agree with @Zangr. I also use this script during development, and it's nice that it does in place fixing of certain style issues. Let's have a separate variant for CI which does not fix.

@harupy
Copy link
Member Author

harupy commented Nov 5, 2019

@Zangr @aarondav Thanks for the comments. I also agree with you two.

@harupy
Copy link
Member Author

harupy commented Nov 6, 2019

I personally prefer to include lint commands into npm scripts like:

"scripts": {
  ...
  "lint": "eslint src",
  "lint:fix": "eslint src --fix",
  ...
}

@Zangr
Copy link
Contributor

Zangr commented Nov 6, 2019

@harupy yes that makes sense.

@harupy
Copy link
Member Author

harupy commented Nov 6, 2019

@aarondav What do you think?

@aarondav
Copy link
Contributor

aarondav commented Nov 6, 2019

Sorry, I am not as familiar with npm -- would this mean developers would run npm:lint and npm lint:fix? That seems reasonable.

@aarondav aarondav self-assigned this Nov 6, 2019
@harupy
Copy link
Member Author

harupy commented Nov 6, 2019

You would run:

npm run lint
npm run lint:fix

@aarondav
Copy link
Contributor

aarondav commented Nov 6, 2019

Sounds good, let's do it

@Zangr
Copy link
Contributor

Zangr commented Nov 6, 2019

@aarondav , yes we need to change the CI script accordingly.

@harupy
Copy link
Member Author

harupy commented Nov 7, 2019

Should I remove lint.sh?

@aarondav
Copy link
Contributor

aarondav commented Nov 7, 2019

Yes, sounds good.

@harupy harupy requested a review from Zangr November 7, 2019 11:00
@aarondav
Copy link
Contributor

aarondav commented Nov 7, 2019

Tried it out locally and it seems to work as expected, thanks for the fix!

@aarondav aarondav merged commit 81a04e4 into mlflow:master Nov 7, 2019
@smurching smurching added the rn/none List under Small Changes in Changelogs. label Dec 19, 2019
avflor pushed a commit to avflor/mlflow that referenced this pull request Aug 22, 2020
@harupy harupy deleted the remove-fix-option branch May 18, 2024 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn/none List under Small Changes in Changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants