-
Notifications
You must be signed in to change notification settings - Fork 7
/
eslint.config.mjs
44 lines (43 loc) · 1.13 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import globals from 'globals';
import js from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tseslintParser from '@typescript-eslint/parser';
import reactHooks from 'eslint-plugin-react-hooks';
import prettier from 'eslint-plugin-prettier';
import react from 'eslint-plugin-react';
export default [
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
ignores: [
'dist/*',
'jest.config.js',
'**/*.test.{js,jsx,ts,tsx}' // Ignore all test files (optional)
],
languageOptions: {
globals: {
...globals.browser
},
parser: tseslintParser,
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname
}
},
plugins: {
'@typescript-eslint': tseslint,
'react-hooks': reactHooks,
prettier: prettier,
react: react
},
rules: {
...js.configs.recommended.rules,
...tseslint.configs['recommended-type-checked'].rules,
...react.configs.recommended.rules,
...reactHooks.configs.recommended.rules
// Add any additional custom rules here
}
},
{
ignores: ['dist/*']
}
];