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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
- name: Install npm dependencies
run: npm ci

- name: Lint frontend
run: npm run lint

- name: Build frontend
run: npm run build

Expand Down
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100
}
71 changes: 71 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import js from '@eslint/js';
import globals from 'globals';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import prettier from 'eslint-config-prettier';

/**
* ESLint flat config for CLAI frontend.
*
* React 19 hooks rules are intentionally disabled for now because the
* existing codebase was written before these strict rules existed.
* Re-enable them incrementally in follow-up PRs:
* - react-hooks/set-state-in-effect
* - react-hooks/exhaustive-deps
* - react-hooks/preserve-manual-memoization
* - react-hooks/refs
* - react-hooks/immutability
* - react-hooks/use-memo
* - react-hooks/purity
*/
export default [
js.configs.recommended,
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
...globals.es2021,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
react,
'react-hooks': reactHooks,
},
rules: {
...react.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/display-name': 'off',
'react/no-unescaped-entities': 'off',
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
// Disabled React 19 strict hooks rules (see top comment)
'react-hooks/set-state-in-effect': 'off',
'react-hooks/exhaustive-deps': 'off',
'react-hooks/preserve-manual-memoization': 'off',
'react-hooks/refs': 'off',
'react-hooks/immutability': 'off',
'react-hooks/use-memo': 'off',
'react-hooks/purity': 'off',
},
settings: {
react: {
version: 'detect',
},
},
},
{
files: ['**/*.config.{js,mjs,cjs}'],
languageOptions: {
globals: globals.node,
},
},
prettier,
];
Loading
Loading