This repository was archived by the owner on Oct 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
51 lines (48 loc) · 1.48 KB
/
eslint.config.js
File metadata and controls
51 lines (48 loc) · 1.48 KB
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
45
46
47
48
49
50
51
// import globals from "globals";
// import pluginJs from "@eslint/js";
// import tseslint from "typescript-eslint";
// import pluginReact from "eslint-plugin-react";
// /** @type {import('eslint').Linter.Config[]} */
// export default [
// { files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
// { languageOptions: { globals: globals.browser } },
// pluginJs.configs.recommended,
// ...tseslint.configs.recommended,
// pluginReact.configs.flat.recommended,
// ];
// eslint.config.js
import eslintPluginReact from 'eslint-plugin-react';
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
import eslintPluginPrettier from 'eslint-plugin-prettier';
import typescriptEslintParser from '@typescript-eslint/parser';
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
export default [
{
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
languageOptions: {
parser: typescriptEslintParser,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: {
react: eslintPluginReact,
'react-hooks': eslintPluginReactHooks,
prettier: eslintPluginPrettier,
'@typescript-eslint': typescriptEslintPlugin,
},
rules: {
'prettier/prettier': 'error',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
ignores: ['node_modules/', 'dist/'],
},
];