-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslintrc.js
57 lines (56 loc) · 1.25 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
const path = require("path");
module.exports = {
root: true,
extends: ["eslint:recommended", "prettier"],
env: {
es6: true,
jest: true,
node: true,
},
parserOptions: {
ecmaVersion: 2018,
},
overrides: [
{
files: "web/**/*.+(ts|tsx)",
extends: [
"plugin:@next/next/recommended",
"plugin:@tanstack/eslint-plugin-query/recommended",
],
plugins: ["react"],
settings: {
next: {
rootDir: "web/",
},
},
parserOptions: {
project: path.resolve(__dirname, "web/tsconfig.json"),
tsconfigRootDir: path.resolve(__dirname, "web"),
},
rules: {
"react/jsx-sort-props": [
"warn",
{
reservedFirst: true,
},
],
},
},
{
files: "firebase/**/*.+(ts|tsx)",
parserOptions: {
project: path.resolve(__dirname, "firebase/functions/tsconfig.json"),
tsconfigRootDir: path.resolve(__dirname, "firebase/functions"),
},
},
{
files: "**/*.+(ts|tsx)",
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint/eslint-plugin"],
extends: [
"plugin:@typescript-eslint/eslint-recommended", // removes redundant warnings between TS & ESLint
"plugin:@typescript-eslint/recommended", // rules specific to typescript, e.g., writing interfaces
],
},
],
};