-
Notifications
You must be signed in to change notification settings - Fork 192
/
Copy patheslint.config.mjs
29 lines (28 loc) · 971 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
import { defineConfig } from "eslint/config";
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
export default defineConfig([
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"], plugins: { js }, extends: ["js/recommended"] },
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"], languageOptions: { globals: globals.browser } },
tseslint.configs.recommended, // This applies the recommended TypeScript rules
pluginReact.configs.flat.recommended,
{
files: ["**/*.{ts,tsx}"], // Apply only to TypeScript and TSX files
rules: {
'@typescript-eslint/no-explicit-any': 'off',
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"react/react-in-jsx-scope": "off",
"react/display-name":"off"
},
},
{
settings: {
react: {
version: 'detect', // Automatically detects the React version
},
},
},
]);