Skip to content

Commit

Permalink
eslint 9
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Nov 4, 2024
1 parent 69ea76b commit fcd522c
Show file tree
Hide file tree
Showing 5 changed files with 315 additions and 294 deletions.
16 changes: 0 additions & 16 deletions .eslintrc.cjs

This file was deleted.

38 changes: 38 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

import pluginReactHooks from 'eslint-plugin-react-hooks';
import pluginReactRefresh from 'eslint-plugin-react-refresh';

export default tseslint.config(
{
files: ['**/*.ts', '**/*.tsx'],
extends: [eslint.configs.recommended, ...tseslint.configs.recommended],
languageOptions: {
globals: {
...globals.browser,
},

parser: tsParser,
},
linterOptions: {
reportUnusedDisableDirectives: 'warn',
},
plugins: {
'react-hooks': pluginReactHooks,
'react-refresh': pluginReactRefresh,
},
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'@typescript-eslint/no-empty-object-type': ['error', { allowWithName: 'Props$' }],
},
},
{
// global ignores
// do not add any other keys to this object
ignores: ['coverage/', 'dist/'],
},
);
Loading

0 comments on commit fcd522c

Please sign in to comment.