-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
71 lines (68 loc) · 1.95 KB
/
.eslintrc.cjs
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
68
69
70
71
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require("path");
const prettierConfig = require("./prettier.config.cjs");
const project = path.join(__dirname, "./tsconfig.json");
const backend = path.join(__dirname, "./amplify/tsconfig.json");
/** @type {import("eslint").Linter.Config} */
const config = {
settings: {
react: {
version: "detect",
},
},
overrides: [
{
extends: [
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:promise/recommended",
],
files: [
"./src/**/*.ts",
"./src/**/*.tsx",
"./amplify/**/*.ts",
"./amplify/**/*.tsx",
],
parserOptions: {
project: {
include: [project, backend],
},
},
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "off",
},
},
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier", "promise"],
extends: [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
//"plugin:@typescript-eslint/recommended",
"plugin:@next/next/recommended",
"plugin:prettier/recommended",
"plugin:tailwindcss/recommended",
"prettier",
],
rules: {
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
eqeqeq: ["error", "smart"],
"prettier/prettier": ["error", prettierConfig],
"no-eval": "error",
"no-var": "error",
"prettier/prettier": "error",
// "no-restricted-imports": ["error", { patterns: [".*"] }],
"tailwindcss/no-custom-classname": "off",
"tailwindcss/classnames-order": "off", // tcss prettier plugin handles this
"require-await": "off",
"@typescript-eslint/require-await": "off",
},
};
module.exports = config;