Skip to content

Commit

Permalink
#69 ESLint v9 (#76)
Browse files Browse the repository at this point in the history
* upgrade deps

* eslint 9

* upgrade deps

* docs; remove redundant deps
  • Loading branch information
mwarman authored Nov 4, 2024
1 parent 18e073a commit ca3c26c
Show file tree
Hide file tree
Showing 5 changed files with 401 additions and 374 deletions.
16 changes: 0 additions & 16 deletions .eslintrc.cjs

This file was deleted.

46 changes: 46 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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';

/**
* The ESLint configuration in "flat config" format.
*
* Note: This configuration uses helper functions from `typescript-eslint`.
*
* @see {@link https://eslint.org/docs/latest/use/configure/ Configure ESLint}
* @see {@link https://typescript-eslint.io/packages/typescript-eslint typescript-eslint}
*/
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 ca3c26c

Please sign in to comment.