-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
82 lines (79 loc) · 2.05 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
var tsConfigs = ['./tsconfig.json'];
var tsConfigEmail = ['./tsconfig-emails.json'];
var srcRuleOverrides = {
'prettier/prettier': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@next/next/no-img-element': 0,
'@typescript-eslint/no-empty-object-type': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/ban-ts-comment': 0,
};
module.exports = {
overrides: [
{
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:@next/next/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: tsConfigs,
},
plugins: ['@typescript-eslint', 'prettier'],
rules: srcRuleOverrides,
files: ['src/**/*.ts', 'src/**/*.tsx'],
},
{
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:@next/next/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: tsConfigEmail,
},
plugins: ['@typescript-eslint', 'prettier'],
rules: srcRuleOverrides,
files: ['emails/**/*.ts', 'emails/**/*.tsx'],
},
{
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: tsConfigs,
},
plugins: [
'@typescript-eslint',
'plugin:playwright/playwright-test',
'prettier',
],
rules: srcRuleOverrides,
files: ['e2e/**/*.ts'],
},
{
extends: ['eslint:recommended', 'prettier'],
files: '*.mjs',
},
// make nextconfig.mjs node environment
{
extends: [
'eslint:recommended',
'prettier',
'plugin:@next/next/recommended',
],
files: 'next.config.mjs',
},
],
extends: ['plugin:@next/next/recommended'],
root: true,
};