BackStoryOrg / website

Landing page for backstory.ink
Other
0 stars 0 forks source link

feature: add prettier and eslint #7

Closed SundayTyper closed 8 months ago

SundayTyper commented 8 months ago

Resolves https://github.com/BackStoryOrg/website/issues/6

I added to default configurations of prettier and eslint. We can define rules and standards as we go.

Currently there are clashes between prettier and eslint, and prettier will run on each commit to maintain standards.

I also removed some demo files that weren't relevant to BackStory, and added some folders to the directory to better locate files down the line.

Time spent, around an hour (including other hyperlink ticket)

netlify[bot] commented 8 months ago

Deploy Preview for backstoryink ready!

Name Link
Latest commit a061b7de9f3ca2d21def9ce8b66f664de9e68db0
Latest deploy log https://app.netlify.com/sites/backstoryink/deploys/65df59bca40ccb00078b5d78
Deploy Preview https://deploy-preview-7--backstoryink.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

rendall commented 8 months ago

Regarding the conflicts between prettier and eslint, this page should help. https://prettier.io/docs/en/integrating-with-linters.html I used it in another project and it works great.

rendall commented 8 months ago

Check out this article on git commit messages when you have a chance: https://cbea.ms/git-commit/

This advice is an industry standard. The main point is to use the imperative mood when writing the subject of a git commit message.

So for instance these commit messages:

could instead be:

Having a consistent way of creating git messages reduces cognitive load.

rendall commented 8 months ago

If you think it's valuable, we could add "fix:" and "feature:" labels to branch names. I've never really seen the value, but I don't mind doing it if we think it's best.

Quest037 commented 8 months ago

@SundayTyper - best not to include me in code reviews bud. I'll end up doing more harm than good. When we get to the stage of considering content, design and wording, tag me in. :)

SundayTyper commented 8 months ago

If you think it's valuable, we could add "fix:" and "feature:" labels to branch names. I've never really seen the value, but I don't mind doing it if we think it's best.

I've always been told it's standard/good practice to run PRs and commit messages with those prefixes, so it's now a mix of habit and effort

SundayTyper commented 8 months ago

Added prettier and es-lint to dev dependencies and added 'npm run fix' command to package.json

Removed previous work on husky package and pre-commit hook. Our use of husky doesn't warrant the use of a package and I had implementation questions over pre-commit, giving heightened permissions to the hook file