diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 000000000..a55ca38f1 --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,48 @@ +name: Check PRs + +on: + pull_request + +jobs: + lint-react: + name: Lint React codebase + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '22.x' + - run: npm ci + working-directory: packages/react + - run: npm run lint + working-directory: packages/react + + lint-vue3: + name: Lint Vue3 codebase + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '22.x' + - run: npm ci + working-directory: packages/vue3 + - run: npm run lint + working-directory: packages/vue3 + + lint: + name: Lint codebase + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '22.x' + - run: npm ci + - run: npm run lint:check diff --git a/package.json b/package.json index 2f8c5db11..80c9aba29 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "build": "vite build --mode prod", "preview": "vite preview", "lint": "eslint --fix src/", + "lint:check": "eslint src/", "prepare": "husky install", "test": "jest tests" }, @@ -88,4 +89,4 @@ "vite-plugin-vue2": "^2.0.2", "vue-template-compiler": "^2.7.8" } -} \ No newline at end of file +} diff --git a/packages/vue3/package.json b/packages/vue3/package.json index 821322996..b85cf5b0c 100644 --- a/packages/vue3/package.json +++ b/packages/vue3/package.json @@ -10,6 +10,7 @@ "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook", "postinstall": "npm run build", + "lint": "prettier --check src", "lint:fix": "prettier --write src" }, "lint-staged": {