-
Notifications
You must be signed in to change notification settings - Fork 161
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
55 lines (55 loc) · 1.85 KB
/
Copy path.eslintrc.cjs
File metadata and controls
55 lines (55 loc) · 1.85 KB
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
module.exports = {
root: true,
overrides: [
{
files: ['*.{ts,tsx,js,jsx,mjs,cjs}'],
extends: ['@edgeandnode/eslint-config', '@edgeandnode/eslint-config/next'],
settings: {
next: { rootDir: 'website' },
},
},
{
files: ['*.{ts,tsx}'],
excludedFiles: ['**/*.{md,mdx}/*.{ts,tsx}'],
parserOptions: {
project: 'tsconfig.json',
},
},
{
// We lint only english pages because other languages will be translated from english
files: ['website/pages/en/**/*.{md,mdx}'],
parser: 'eslint-mdx',
processor: 'mdx/remark',
plugins: ['mdx'],
rules: {
'mdx/remark': 'error',
},
settings: {
'mdx/code-blocks': true,
},
},
{
files: ['**/*.{md,mdx}/*.{ts,tsx}'],
rules: {
// Disables rules that requires type information
'@typescript-eslint/await-thenable': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/prefer-regexp-exec': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/no-unnecessary-type-arguments': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
'@typescript-eslint/prefer-includes': 'off',
'@typescript-eslint/prefer-return-this-type': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
// Disable rules for code-blocks
'no-restricted-globals': 'off',
},
},
],
}