Skip to content

Commit

Permalink
update next, eslint configs and add ci quality checks
Browse files Browse the repository at this point in the history
  • Loading branch information
rezrah committed Dec 1, 2024
1 parent 137bd87 commit 8e12576
Show file tree
Hide file tree
Showing 10 changed files with 1,333 additions and 562 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ module.exports = {
'plugin:react/jsx-runtime',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
'plugin:github/recommended',
'plugin:github/browser',
'plugin:primer-react/recommended',
],
ignorePatterns: ['node_modules', '.next', 'dist/**/*', 'out/**/*', 'types/**/*'],
ignorePatterns: ['node_modules', '.next', 'dist/**/*', 'out/**/*', 'types/**/*', 'CHANGELOG.md'],
globals: {
__DEV__: 'readonly',
},
Expand Down Expand Up @@ -162,6 +161,7 @@ module.exports = {
'@typescript-eslint/no-unnecessary-condition': 0,
'@typescript-eslint/no-unused-vars': 0,
'no-redeclare': 0,
'no-unused-labels': 0,
},
},
],
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI - Code Quality

on:
push:
branches:
- main
pull_request:

jobs:
ci:
if: ${{ github.repository == 'primer/doctocat-nextjs' }}
name: Install and run code quality tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2

- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20

- name: Cache dependencies
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a #4.1.2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run linters
run: npm run lint


- name: Verify types
run: npm run check

Loading

0 comments on commit 8e12576

Please sign in to comment.