Skip to content

Commit

Permalink
feat: update eslint all project
Browse files Browse the repository at this point in the history
  • Loading branch information
khoilen committed Jan 22, 2025
1 parent 2f6a3c9 commit bf8bb1c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Code Check '

on:
pull_request:
branches: ['main']

jobs:
code-check:
name: Code Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22.12.0'

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Run lint
run: pnpm lint

- name: Run tests
run: pnpm test
2 changes: 1 addition & 1 deletion apps/nt-headless-ui/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const __dirname = dirname(__filename)

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: () => null,
})

const eslintConfig = [
...compat.extends('next/core-web-vitals', 'next/typescript'),
...compat.extends('eslint:recommended', 'prettier'),
]

export default eslintConfig
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "husky install",
"commitlint": "commitlint --edit",
"build:headlessui-storybook": "npx nx run nt-stylesheet:build && npx nx run nt-headless-ui:build-storybook"
"build:headlessui-storybook": "npx nx run nt-stylesheet:build && npx nx run nt-headless-ui:build-storybook",
"lint": "npx nx run-many --target=lint --all"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit bf8bb1c

Please sign in to comment.