-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
39 lines (36 loc) · 1.02 KB
/
eslint.config.js
File metadata and controls
39 lines (36 loc) · 1.02 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
import js from "@eslint/js";
import { defineConfig } from "eslint/config";
import globals from "globals";
import CONFIG_PLUGIN_NEXT from "./.eslint/plugin-next.js";
import CONFIG_PLUGIN_REACT from "./.eslint/plugin-react.js";
import CONFIG_PLUGIN_UNICORN from "./.eslint/plugin-unicorn.js";
import { JS_SRC_PATTERN } from "./.eslint/utils.js";
export default defineConfig([
{
files: [JS_SRC_PATTERN],
ignores: [".next/**", "node_modules/**", "out/**"],
plugins: { js },
...js.configs.recommended,
},
{
files: [JS_SRC_PATTERN],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
rules: {
quotes: ["error", "double"],
semi: ["error", "always"],
"no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
camelcase: ["error", { properties: "never", ignoreDestructuring: true }],
"prefer-const": ["error"],
},
},
CONFIG_PLUGIN_UNICORN,
CONFIG_PLUGIN_REACT,
CONFIG_PLUGIN_NEXT,
]);