-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
54 lines (52 loc) · 1.54 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
// @ts-check
/** @type {import("eslint").Linter.Config} */
const eslintConfig = {
extends: [
"next/core-web-vitals",
"plugin:perfectionist/recommended-natural",
"prettier",
],
ignorePatterns: ["**/out/*", "**/public/*"],
overrides: [
// Override for TypeScript files
{
extends: ["plugin:@typescript-eslint/recommended-type-checked"],
files: ["*.ts", "*.tsx"],
parserOptions: {
project: "./tsconfig.json",
},
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
},
},
],
rules: {
"arrow-body-style": ["error", "as-needed"],
"import/newline-after-import": ["error"],
"no-console": ["error", { allow: ["warn", "error"] }],
"react/button-has-type": ["error"],
"react/destructuring-assignment": [
"error",
"always",
{ destructureInSignature: "always" },
],
"react/hook-use-state": ["error", { allowDestructuredState: true }],
"react/jsx-boolean-value": ["error", "always"],
"react/jsx-curly-brace-presence": [
"error",
{ children: "never", propElementValues: "always", props: "never" },
],
"react/jsx-no-useless-fragment": ["error", { allowExpressions: true }],
"react/self-closing-comp": ["error"],
},
};
module.exports = eslintConfig;