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

style: add more React focused linting #1178

Merged
merged 2 commits into from
Aug 28, 2020
Merged

Conversation

hkang1
Copy link
Contributor

@hkang1 hkang1 commented Aug 26, 2020

Description

Add the following rules:

  • object-curly-newline
  • react/jsx-first-prop-new-line
  • react/jsx-max-props-per-line

The JSX rules will help us add fixable structuring to our JSX.

Test Plan

Commentary (optional)

Checklist

  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.

@cla-bot cla-bot bot added the cla-signed label Aug 26, 2020
@@ -50,10 +51,18 @@ module.exports = {
'no-multi-spaces': [ 'error', { ignoreEOLComments: true } ],
'no-multiple-empty-lines': [ 'error', { max: 1, maxBOF: 0, maxEOF: 0 } ],
'no-trailing-spaces': [ 'error', {} ],
'object-curly-newline': [ 'error', {
ExportDeclaration: { consistent: true },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed this to consistent instead of multiline for import and export so we can still support something like this:

import {
  Checkpoint, CheckpointDetail, CheckpointState, ExperimentDetails,
  RunState, Step, TrialDetails, ValidationMetrics,
} from 'types';

otherwise each of those imports will be on its own line

Copy link
Member

@hamidzr hamidzr left a comment

Choose a reason for hiding this comment

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

LGTM. more free styling help! 🍬

would these affect the test directory? (it's importing the same eslint rules)

@hamidzr hamidzr assigned hkang1 and unassigned hamidzr Aug 27, 2020
@hkang1 hkang1 merged commit 5730050 into determined-ai:master Aug 28, 2020
@hkang1 hkang1 deleted the more-linting branch August 28, 2020 00:20
@hkang1
Copy link
Contributor Author

hkang1 commented Aug 28, 2020

LGTM. more free styling help! 🍬

would these affect the test directory? (it's importing the same eslint rules)

The tests directory passed with flying colors as well!

@dannysauer dannysauer added this to the 0.13.2 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants