-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
39 lines (38 loc) · 1.16 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
import globals from 'globals';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import pluginReact from 'eslint-plugin-react';
import eslintPrettier from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';
export default [
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
languageOptions: {
globals: globals.browser,
parser: tsParser,
},
plugins: {
'@typescript-eslint': tseslint,
react: pluginReact,
prettier: eslintPrettier,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:prettier/recommended',
'prettier', // Intégration complète de Prettier
],
rules: {
'prettier/prettier': 'error', // Intégration des règles de Prettier comme erreurs
'react/react-in-jsx-scope': 'off', // Désactiver pour les nouvelles versions de React
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
},
];