Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions .github/workflows/lint-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ jobs:
exit 1
fi

lint-eslint:
name: Lint (lint:eslint)
lint-oxlint:
name: Lint (lint:oxlint)
runs-on: ubuntu-latest
if: needs.prepare.outputs.changed-paths != '[]'
needs: prepare
Expand All @@ -126,19 +126,7 @@ jobs:
persist-credentials: false
node-version: ${{ matrix.node-version }}
- name: Lint
run: |
if [[ "$CHANGED_PATHS" == "full" ]]; then
echo "Running ESLint on all packages."
echo ""
yarn lint:eslint
else
echo "Running ESLint on:"
echo "$CHANGED_PATHS" | jq -r '"- " + .[]'
echo ""
echo "$CHANGED_PATHS" | jq -r '.[]' | xargs yarn lint:eslint
fi
env:
CHANGED_PATHS: ${{ needs.prepare.outputs.changed-paths }}
run: yarn lint:oxlint
- name: Require clean working directory
shell: bash
run: |
Expand Down
10 changes: 5 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ The monorepo uses a hierarchical configuration approach for different tools. For
- `jest.config.scripts.js` defines shared Jest settings for all directories in `scripts/`.
- `packages/**/jest.config.js` (and `scripts/create-package/package-template/jest.config.js`) customizes Jest settings for each package.

#### ESLint
#### Oxlint

- `eslint.config.mjs` configures ESLint for the entire monorepo.
- `eslint-suppressions.json` isn't a config file per se, but defines ESLint errors that are being ignored (temporarily).
- `oxlint.config.ts` configures Oxlint for the entire monorepo.
- `oxlint-suppressions.json` isn't a config file per se, but defines Oxlint errors that are being ignored (temporarily).

#### Prettier
#### Oxfmt

- `.prettierrc.js` configures Prettier for the entire repo.
- `.oxfmtrc.json` configures Oxlint for the entire repo.

#### TypeDoc

Expand Down
4 changes: 2 additions & 2 deletions docs/processes/linting-and-formatting.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Linting and formatting code

[ESLint](https://eslint.org) v9 (via [MetaMask's shared ESLint configurations](https://github.com/MetaMask/eslint-config)) is used to check for code quality issues, and [Prettier](https://prettier.io/docs/en/) is used to format files.
[Oxlint](https://oxc.rs/docs/guide/usage/linter) v1 (via [MetaMask's shared Oxlint configurations](https://github.com/MetaMask/oxlint-config)) is used to check for code quality issues, and [Oxfmt](https://oxc.rs/docs/guide/usage/formatter) is used to format files.

If you need to customize the behavior of ESLint, see `eslint.config.mjs` in the root.
If you need to customize the behavior of Oxlint, see `oxlint.config.ts` in the root.

- Run `yarn lint` to lint all files and show possible violations across the monorepo.
- Run `yarn lint:fix` to fix any automatically fixable violations.
Loading