Skip to content

Commit

Permalink
Update Github actions to use Biome for formatting / linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremywiebe committed Oct 24, 2024
1 parent 197ed4b commit e94ed03
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ updates:
schedule:
interval: "daily"
allow:
- dependency-name: "@khanacademy/eslint-config"
- dependency-name: "@khanacademy/eslint-plugin"
- dependency-name: "@biomejs/biome"
14 changes: 7 additions & 7 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:

- name: Check formatting
run: |
yarn -s prettier --check .
yarn -s biome --check .
- id: js-files
name: Find .js(x)/.ts(x) changed files
Expand All @@ -90,19 +90,19 @@ jobs:
extensions: ".js,.jsx,.ts,.tsx"
files: "yarn.lock"

- id: eslint-reset
- id: biome-reset
uses: Khan/actions@filter-files-v1
name: Files that would trigger a full eslint run
name: Files that would trigger a full Biome run
with:
changed-files: ${{ steps.changed.outputs.files }}
files: ".eslintrc.js,package.json,yarn.lock,.eslintignore"
files: "biome.jsonc,package.json,yarn.lock"

# Linting / type checking
- name: Eslint
- name: Biome
uses: Khan/actions@full-or-limited-v0
with:
full-trigger: ${{ steps.eslint-reset.outputs.filtered }}
full: yarn lint packages
full-trigger: ${{ steps.biome-reset.outputs.filtered }}
full: yarn biome check .
limited-trigger: ${{ steps.js-files.outputs.filtered }}
limited: yarn lint {}

Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@
"clean": "./utils/clean.sh",
"coverage": "./utils/test-with-coverage.sh",
"dev": "yarn --cwd dev dev",
"lint": "eslint . --ext .js --ext .jsx --ext .ts --ext .tsx",
"lint:timing": "cross-env TIMING=1 yarn lint",
"lint": "biome check",
"publish:ci": "utils/pre-publish-check-ci.ts && git diff --stat --exit-code HEAD && yarn build && yarn build:types && changeset publish",
"sloc": "sloc packages --exclude node_modules",
"test": "jest",
Expand All @@ -143,7 +142,7 @@
"build-storybook": "storybook build",
"cypress": "cypress open --component",
"cypress:ci": "cross-env cypress run --component",
"format": "prettier --write .",
"format": "biome format --write .",
"typecheck": "tsc",
"knip": "knip --config knip.config.ts"
},
Expand Down

0 comments on commit e94ed03

Please sign in to comment.