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

Provide repo level settings for prettier to prevent overwriting of code standards #9792

Closed
jpvajda opened this issue Jun 7, 2022 · 3 comments · Fixed by #9809
Closed

Provide repo level settings for prettier to prevent overwriting of code standards #9792

jpvajda opened this issue Jun 7, 2022 · 3 comments · Fixed by #9809
Assignees

Comments

@jpvajda
Copy link
Contributor

jpvajda commented Jun 7, 2022

As a vsCode + Prettier user, I find there are certain "opinionated" rules that Prettier enforces that differ from our code standards.

  • We prefer * instead of - for our markdown bullets
  • We prefer " instead of ' for our quoting
  • Could be others that I haven't come across yet.

Given the popularity of prettier in the JS community, perhaps we can add a .prettierignore file to our repo to ensure we don't let prettier overwrite our standards. I spent about 1.5 hours trying to get Prettier to not overwrite the bullets to - and the only solution I found was to disable it in VsCode as a lot of our markdown is in MDX files.

It's possible we could just add settings to our settings.json file for vscode.

References

VsCode settings

 "markdownlint.ignore": ["bullet - MD004, MD005, MD006, MD007, MD032"],
  "markdownlint.run": "onSave",
  "markdown.extension.toc.unorderedList.marker": "*",
  "editor.defaultFormatter": null,
  "[markdown]": {
    "editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
  }

@jpvajda jpvajda self-assigned this Jun 7, 2022
@jpvajda
Copy link
Contributor Author

jpvajda commented Jun 7, 2022

@StephenBarlow Since we discussed this issue, I filed an issue for it.

@benjamn
Copy link
Member

benjamn commented Jun 7, 2022

I love the idea of a .prettierignore file!

@jpvajda
Copy link
Contributor Author

jpvajda commented Jun 7, 2022

@benjamn awesome! I was curious to hear your thoughts. 😄 I'll work on this and get a PR up for review.

@jpvajda jpvajda linked a pull request Jun 10, 2022 that will close this issue
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants