-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
52 lines (51 loc) · 1.34 KB
/
eslint.config.js
File metadata and controls
52 lines (51 loc) · 1.34 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
52
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import unusedImports from "eslint-plugin-unused-imports";
import nextPlugin from "@next/eslint-plugin-next";
export default tseslint.config(
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
plugins: {
"unused-imports": unusedImports,
"@next/next": nextPlugin,
},
languageOptions: {
ecmaVersion: 2021,
sourceType: "module",
parser: tseslint.parser,
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "after-used",
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"@next/next/no-img-element": "off" // Desactivar si usas Image de next/image y necesitas img normal
},
files: ["**/*.{js,jsx,ts,tsx}"],
}
);