-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
67 lines (67 loc) · 1.71 KB
/
.eslintrc.js
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/** @type {import('eslint/lib/shared/types').ConfigData} */
module.exports = {
root: true,
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"next/core-web-vitals",
"plugin:eslint-comments/recommended",
"plugin:storybook/recommended",
"plugin:tailwindcss/recommended",
"plugin:mdx/recommended",
],
plugins: ["unused-imports", "simple-import-sort"],
rules: {
"prefer-spread": 2,
"prefer-template": 2,
"no-useless-rename": [2],
"object-shorthand": [2, "always"],
"quote-props": [2, "consistent"],
"eqeqeq": 2,
"no-empty-function": 2,
/* unused-imports */
"unused-imports/no-unused-imports": [2],
/* simple-import-sort */
"sort-imports": 0,
"simple-import-sort/imports": 2,
"simple-import-sort/exports": 2,
/* react */
"react/self-closing-comp": [
2,
{
component: true,
html: false,
},
],
/* next.js */
"@next/next/no-html-link-for-pages": [0], // https://github.com/vercel/next.js/issues/42448
/* eslint-comments */
"eslint-comments/require-description": 1,
/* typescript */
"@typescript-eslint/ban-ts-comment": 1,
"@typescript-eslint/no-unused-vars": 1,
"@typescript-eslint/no-explicit-any": 2,
},
overrides: [
{
files: ["opengraph-image.tsx"],
rules: {
"jsx-a11y/alt-text": 0,
"@next/next/no-img-element": 0,
},
},
{
files: ["*.config.js"],
rules: {
"@typescript-eslint/no-var-requires": 0,
},
},
{
files: ["*.stories.ts", "*.stories.tsx"],
rules: {
"storybook/prefer-pascal-case": 0,
"@typescript-eslint/no-explicit-any": 1,
},
},
],
};