-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
chore: Revisit linting/styling #227
Comments
@jpmcb would this be setting up the config files for eslint and prettier? I'm interested in working on it but the pull/176 link 404d, so I'm not sure exactly what I would have to do? |
@Jenna59, looking at the prettier config, the single quote change is correct. https://github.com/open-sauced/landing-page/blob/main/.prettierrc.js#L1-L6 module.exports = {
trailingComma: 'es5',
tabWidth: 2,
semi: false,
singleQuote: true,
} I think the issue is we need to run prettier over all the files to ensure everything is formatted correctly (step 1), and then I think we need to put in place lint-staged with husky, so we get pre-commit hooks formatting things in case people are using different editors/settings. "lint-staged": {
"*.{js,jsx,ts,tsx}": "eslint --cache --fix",
- "*.{ts,tsx}": "vitest related --run",
"*.{js,jsx,ts,tsx,css,md}": "prettier --write"
} Note that the landing page doesn't use vitest, so that can be omitted. You can look at https://github.com/open-sauced/app/blob/beta/package.json#L160-L164 for lint-staged, and it would also require setting up Husky. I'll let others chime in though as I'm typically not working in this project. |
.take @nickytonline would I need Sanity Studio access to work on this issue? https://github.com/open-sauced/landing-page?tab=readme-ov-file#-cms-sanity-commands |
Thanks for taking this on! If you have not already, join the conversation in our Discord |
I don't think you do as I've never installed it. |
I would probably break this up into a couple of PRs. One for running prettier on the whole code base to fix any existing forgetting issues and a second PR which would add Husky and lint-staged. Again though, I don't usually work in this repo, so just checking in with @brandonroberts and @zeucapua before you start any of the work. |
Hey there @brandonroberts and @zeucapua I was hoping to start taking a look at things on Friday. Do you have any thoughts before I begin? |
Hi @Jenna59 - still looking to tackle this? Happy to assist if you need help! |
Originally posted by @jpmcb in #218 (comment)
Looks like we may need to revisit linting/styling in this repo (like we have in the app and etl: https://github.com/open-sauced/etl/pull/176)
Also noticed the
npm run lint
command is just callingnext lint
which we should probably call into prettier/eslint like we do elsewhere.The text was updated successfully, but these errors were encountered: