-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy patheslint.config.mjs
37 lines (35 loc) · 1000 Bytes
/
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
// @ts-check
import eslint from '@eslint/js';
import prettierConfig from 'eslint-config-prettier';
import jest from 'eslint-plugin-jest';
import jestDom from 'eslint-plugin-jest-dom';
import react from 'eslint-plugin-react';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default [
{
ignores: ['coverage/**', 'dist/**', 'example/dist/**', '__tests__/**'],
},
{
plugins: {
react,
},
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
},
},
},
...tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, prettierConfig),
...tseslint.config({
files: ['__tests__/**'],
plugins: { jest },
...jest.configs['flat/recommended'],
...jestDom.configs['flat/recommended'],
}),
];