- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
Latest commit
30 lines (26 loc) · 829 Bytes
/
Copy patheslint.config.mjs
File metadata and controls
30 lines (26 loc) · 829 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
import{dirname}from"path";
import{fileURLToPath}from"url";
import{FlatCompat}from"@eslint/eslintrc";
importstylisticTsfrom"@stylistic/eslint-plugin-ts";
importstylisticJsxfrom"@stylistic/eslint-plugin-jsx";
const__filename=fileURLToPath(import.meta.url);
const__dirname=dirname(__filename);
constcompat=newFlatCompat({
baseDirectory: __dirname,
});
consteslintConfig=[
...compat.extends("next/core-web-vitals","next/typescript"),
{
plugins: {
"@stylistic/ts": stylisticTs,
"@stylistic/jsx": stylisticJsx
},
rules: {
semi: ["warn","always"],
"@stylistic/ts/indent": ["error",2],
"@stylistic/jsx/jsx-indent": ["error",2],
"@stylistic/ts/quotes": ["error","double",{"avoidEscape": true}]
},
},
];
exportdefaulteslintConfig;