Fix pre-commit script to properly handle multiple files and resolve ESLint warnings

This commit is contained in:
William Valentin
2025-09-07 13:34:39 -07:00
parent 8fa2d3fb60
commit 315303b120
33 changed files with 561 additions and 404 deletions

View File

@@ -3,6 +3,9 @@ const tsPlugin = require('@typescript-eslint/eslint-plugin');
const reactHooksPlugin = require('eslint-plugin-react-hooks');
module.exports = [
{
ignores: ['dist/**', 'node_modules/**', '**/*.min.js'],
},
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
@@ -29,7 +32,7 @@ module.exports = [
// TypeScript ESLint rules
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
{ argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' },
],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
@@ -60,4 +63,10 @@ module.exports = [
'no-console': 'off',
},
},
{
files: ['**/tests/e2e/fixtures.ts'],
rules: {
'react-hooks/rules-of-hooks': 'off',
},
},
];