Fix pre-commit script to properly handle multiple files and resolve ESLint warnings
This commit is contained in:
@@ -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',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user