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

Eslint prettier #170

Merged
merged 11 commits into from
Oct 4, 2020
Merged

Conversation

gurvanhenry
Copy link
Contributor

Issue : #165

Done:

  • Add prettier in eslint config
  • Apply lint/prettier on all existing app/* files.
  • Add "yarn lint:fix" command
  • Minor update of README

Comments:

  • I tried to find a prettier config that match the existing code base to make the minimum of file changes
  • prettier is automatically applied with "yarn lint" so I did not add script command like "yarn prettier"
  • husky already run "yarn lint" on pre-commit so I did not changed that
  • we can add a file .vscode/settings.json with the following content to format/fix file on save. (tell me if you want me to add it)
{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
}

Copy link
Member

@PierreBresson PierreBresson left a comment

Choose a reason for hiding this comment

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

Just a quick fix. If you can add .vscode/settings.json it would also be perfect 👌

package.json Outdated Show resolved Hide resolved
@PierreBresson
Copy link
Member

@gurvanhenry Little question of me being curious, if you have time : how to apply changes to all the files without saving them one by one?

@gurvanhenry
Copy link
Contributor Author

@gurvanhenry Little question of me being curious, if you have time : how to apply changes to all the files without saving them one by one?

By running yarn lint:fix which include --fix parameter on eslint command.

@gurvanhenry
Copy link
Contributor Author

Just a quick fix. If you can add .vscode/settings.json it would also be perfect 👌

Done

@gurvanhenry
Copy link
Contributor Author

I have synced my branch with master and re-applied lint on the file NoEmission.story.tsx to fix the CI

@PierreBresson
Copy link
Member

@gurvanhenry top, thanks!

@PierreBresson PierreBresson merged commit 3d493b1 into NMF-earth:master Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants