-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
28 lines (26 loc) · 909 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
import { FlatCompat } from '@eslint/eslintrc';
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';
const compat = new FlatCompat();
/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
pluginReact.configs.flat.recommended,
...tseslint.configs.recommended,
...compat.extends('plugin:jest/recommended'),
{
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-module-boundary-types': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'no-undef': 'warn',
'react/display-name': 'warn',
'no-require-imports': 'warn',
},
},
...compat.extends('plugin:prettier/recommended'),
];