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

Automate formatting/linting #1

Open
j127 opened this issue Nov 21, 2020 · 3 comments
Open

Automate formatting/linting #1

j127 opened this issue Nov 21, 2020 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers possibly outdated These are old issues that might be out of date

Comments

@j127
Copy link
Member

j127 commented Nov 21, 2020

Automate formatting/linting with a git hook or similar method.

  • prettier.js
  • flake8 (or whatever)
@j127 j127 added enhancement New feature or request good first issue Good for newcomers labels Nov 21, 2020
@datadaveshin
Copy link
Collaborator

For Prettier, there appears to be 5 choices on when the changes may occur, do you have a preference?

@j127
Copy link
Member Author

j127 commented Nov 22, 2020

Option 1 looks like it would be easy for people to use without having to think about it, unless you think another one would be better.

@j127
Copy link
Member Author

j127 commented Nov 23, 2020

I tried it in the other data repo and it works well.

I overwrote their prettier command with a custom shell script (./format_json.sh) that runs on every commit.

    "devDependencies": {
        "husky": "^4.3.0",
        "lint-staged": "^10.5.1",
        "prettier": "^2.2.0"
    },
    "husky": {
        "hooks": {
            "pre-commit": "lint-staged"
        }
    },
    "lint-staged": {
        "*.--write": "./format_json.sh"
    }

Edit: ↑ that actually might not be working correctly.

@j127 j127 added the possibly outdated These are old issues that might be out of date label Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers possibly outdated These are old issues that might be out of date
Projects
None yet
Development

No branches or pull requests

2 participants