-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
42 lines (41 loc) · 994 Bytes
/
Copy patheslint.config.mjs
File metadata and controls
42 lines (41 loc) · 994 Bytes
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
import js from "@eslint/js";
import ts from "typescript-eslint";
import globals from "globals";
import { defineConfig } from "eslint/config";
import reactPlugin from "eslint-plugin-react";
import reactHooksPlugin from "eslint-plugin-react-hooks";
export default defineConfig([
{
ignores: ["dist/**", "*.config.js"],
},
{
files: ["**/*.{js,cjs,mjs}"],
languageOptions: {
globals: globals.browser,
},
extends: [js.configs.recommended],
},
{
files: ["**/*.{ts,tsx}"],
languageOptions: {
parser: ts.parser,
sourceType: "module",
globals: globals.browser,
},
extends: [...ts.configs.recommended],
},
{
files: ["**/*.{jsx,tsx}"],
extends: [
reactPlugin.configs.flat.recommended,
reactHooksPlugin.configs.flat["recommended-latest"],
],
rules: {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
},
settings: {
react: { version: "detect" },
},
},
]);