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

Run linters on every commit #38

Open
zaro0508 opened this issue Apr 13, 2021 · 2 comments
Open

Run linters on every commit #38

zaro0508 opened this issue Apr 13, 2021 · 2 comments

Comments

@zaro0508
Copy link
Contributor

It would be nice to setup something like pre-commit so that we can setup multiple linters to validate files on every commit. It looks like there's lint-staged for the node environment. here's an example, https://juliangaramendy.dev/blog/prettier-pre-commit-hook

@OlafConijn
Copy link
Member

we run cfn-lint as part of checks on PR.

copy over the scripts from here: https://github.com/org-formation/org-formation-reference/blob/master/package.json

and

"hooks": {
    "pre-commit": "npm run print-tasks && npm run cfn-lint"
  }

not sure whether the cli should ship with husky configs (tool/integration method is not a cli choice), but this way it should be easy to integrate. maybe we can add this to the https://github.com/org-formation/org-formation-reference

@zaro0508
Copy link
Contributor Author

hmm, running linters manually or in CI is not the same as running on every local commit (git commit hook). I find the hook workflow to be better and much more convenient. Also i think would be in package.json devDependencies so shouldn't ship with the cli, correct?

@OlafConijn OlafConijn transferred this issue from org-formation/org-formation-cli Apr 25, 2021
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

No branches or pull requests

2 participants