Skip to content
Merged
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
65 changes: 65 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Lint Check

on:
push:
branches: main
paths:
- 'web/frontend/**'
- 'web/personas-open-source/**'
pull_request:
branches: main
paths:
- 'web/frontend/**'
- 'web/personas-open-source/**'

jobs:
lint-frontend:
name: Lint Frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/frontend

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: './web/frontend/package-lock.json'

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Check Prettier formatting
run: npm run lint:format -- --check

lint-personas:
name: Lint Personas Open Source
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/personas-open-source

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: './web/personas-open-source/package-lock.json'

- name: Install dependencies
run: npm ci --legacy-peer-deps

- name: Run ESLint
run: npm run lint
6 changes: 6 additions & 0 deletions web/frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@ module.exports = {
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'react/react-in-jsx-scope': 'off',
'jsx-a11y/accessible-emoji': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'react/prop-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'simple-import-sort/imports': 'off',
'simple-import-sort/exports': 'off',
// Add warnings for specific rules
'react/no-unescaped-entities': 'warn',
'jsx-a11y/heading-has-content': 'warn',
'jsx-a11y/anchor-is-valid': [
'error',
{
Expand Down
2 changes: 2 additions & 0 deletions web/frontend/.prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ module.exports = {
printWidth: 90,
tabWidth: 2,
endOfLine: 'auto',
htmlWhitespaceSensitivity: 'css',
singleAttributePerLine: false,
};
12 changes: 6 additions & 6 deletions web/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading