From ecd5db295260a9989718c4efed2f1fc9c827b160 Mon Sep 17 00:00:00 2001 From: EYHN Date: Wed, 8 Nov 2023 17:54:41 +0800 Subject: [PATCH] ci: add oxlint (#4867) --- .eslintrc.js | 1 + .github/workflows/build.yml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index edd56de21..e0f1244bc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -127,6 +127,7 @@ const config = { 'no-constant-binary-expression': 'error', 'no-constructor-return': 'error', 'react/prop-types': 'off', + 'react/jsx-no-useless-fragment': 'error', '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/no-non-null-assertion': 'error', '@typescript-eslint/no-explicit-any': 'off', diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf200a6a5..bd8106306 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Run oxlint + # oxlint is fast, so wrong code will fail quickly + run: yarn dlx oxlint@latest . - name: Setup Node.js uses: ./.github/actions/setup-node with: