-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy patheslint.config.mjs
More file actions
43 lines (42 loc) · 1.09 KB
/
Copy patheslint.config.mjs
File metadata and controls
43 lines (42 loc) · 1.09 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
import { defineConfig } from "eslint/config";
import nextPlugin from "@next/eslint-plugin-next";
import tsParser from "@typescript-eslint/parser";
export default defineConfig([
{
ignores: [
".next/**",
"out/**",
"coverage/**",
"build/**",
"node_modules/**",
// Jekyll vendors its gems into vendor/bundle when bundler-cache is on,
// which drops third-party JavaScript such as Jekyll's minified
// livereload.js into the tree. These paths are in .gitignore, but flat
// config does not read .gitignore, so they have to be listed here too.
"vendor/**",
".jekyll-cache/**",
"**/_site/**",
],
},
{
files: ["**/*.{js,mjs,cjs,ts,tsx}"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
"@next/next": nextPlugin,
},
rules: {
...nextPlugin.configs["core-web-vitals"].rules,
semi: "error",
"prefer-const": "error",
},
},
]);