-
Notifications
You must be signed in to change notification settings - Fork 38
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
Internal: Add prettier and simplify eslint config #530
Internal: Add prettier and simplify eslint config #530
Conversation
@@ -1,7 +1,34 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add prettier as a plugin for eslint - it gets run now when yarn lint
is ran and --fix
will also fix prettier issues
Not sure why there were 4 different .eslintrc
files in different places but i've removed them and compressed the rules into one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's the same with .gitignore, there are multiple ways to configure things, globally or per directory.
i think we can work with overrides for now
@@ -0,0 +1,10 @@ | |||
# See https://prettier.io/docs/en/options. most are set to default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Config for prettier - per comment: most are set to default. We can change this to JSON TOML or plain js if anyone has an aversion to yaml
@@ -34,9 +34,11 @@ | |||
"css-loader": "^6.8.1", | |||
"dart-sass": "^1.25.0", | |||
"eslint": "^8.54.0", | |||
"eslint-config-prettier": "^9.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add prettier, the plugin to socket it in, and the config that prevents conflicts with eslint.
Essentially we keep eslint as a way to find and prevent bugs, while prettier is soley focused on code styling per:
https://prettier.io/docs/en/comparison
Thx for the work! not a fan of prettier per se, but i can work with it. |
Something like this: eslint-plugin-pug Benefit of prettier here is that we can add: @prettier-plugin-pug Went ahead and added just the prettier plugin in the next few commits and ran it with fix. Ideally, |
@beckpaul you think this can be merged? |
Due to the size of the PR ill be addressing the relevant file changes/new files in comments below.
Main motivation behind this is to address the egregious number of white space issues and large trailing single lines.