Skip to content

Commit

Permalink
Simplified typescript-eslint configuration (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwngr authored Sep 8, 2024
1 parent bfb9e0a commit ea7c2d7
Show file tree
Hide file tree
Showing 5 changed files with 303 additions and 428 deletions.
29 changes: 29 additions & 0 deletions website/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import eslint from '@eslint/js';
// TODO: Add back `eslint-plugin-react-hooks once it supports the ESLint flat file format.
// import reactHooks from 'eslint-plugin-react-hooks';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
// ESLint.
eslint.configs.recommended,

// TypeScript.
...tseslint.configs.strict,
...tseslint.configs.stylistic,

// Custom.
{
files: ['**/*.{js,jsx,ts,tsx,mjs}'],
ignores: ['**/dist'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: globals.browser,
},
rules: {
'no-console': 'error',
'@typescript-eslint/no-extraneous-class': 'off',
},
}
);
Loading

0 comments on commit ea7c2d7

Please sign in to comment.