Skip to content

Commit

Permalink
style: Move prettier and editorconfig to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Sep 30, 2024
1 parent a651647 commit 69ae5fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 32 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,6 @@ jobs:
with:
extra_args: ""

prettier:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Install NodeJS
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: "20"

- name: Install Prettier
run: npm install -g prettier@3.1.0

- name: Run Prettier --check
run: prettier --check .

editorconfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: "20"

- name: Install editorconfig-checker
run: npm install -g editorconfig-checker

- name: Run ECLint check
run: editorconfig-checker -exclude README.md $(git ls-files | grep -v test)

###################
# nf-core linting #
###################
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ repos:
files: \.py$
args: [--fix, --exit-non-zero-on-fix, "--select", "I,E1,E4,E7,E9,F,UP,N"] # sort imports and fix (rules taken from nf-core/tools)
- id: ruff-format # formatter
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "" # pick a git hash / tag to point to
hooks:
- id: editorconfig-checker
alias: ec

0 comments on commit 69ae5fa

Please sign in to comment.