Skip to content

Commit

Permalink
include frontend linting warnings in precommit check
Browse files Browse the repository at this point in the history
  • Loading branch information
0age committed Dec 6, 2024
1 parent f5da631 commit 92cc74c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 10 additions & 1 deletion frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ module.exports = {
tsconfigRootDir: __dirname,
project: ['tsconfig.app.json', 'tsconfig.node.json']
},
overrides: [
{
files: ['*.js', '*.cjs'],
parserOptions: {
project: null
}
}
],
plugins: [
'react',
'react-refresh',
Expand All @@ -34,6 +42,7 @@ module.exports = {
],
'@typescript-eslint/no-explicit-any': 'warn',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off'
'react/prop-types': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }]
}
}
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@
"pnpm test:related",
"pnpm smoke-test:precommit"
],
"frontend/src/**/*.ts?(x)": [
"frontend/**/*.{ts,tsx,js}": [
"prettier --write",
"cd frontend && eslint --fix",
"cd frontend && eslint --fix --max-warnings 0",
"prettier --check",
"cd frontend && eslint --max-warnings 0",
"cd frontend && tsc --noEmit -p tsconfig.app.json"
],
"*.{json,md}": [
Expand Down

0 comments on commit 92cc74c

Please sign in to comment.