-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
62 lines (62 loc) · 1.49 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
module.exports = {
plugins: ['unused-imports', 'prettier', 'header', 'require-extensions'],
extends: [
'next/core-web-vitals',
'react-app',
'prettier',
'plugin:prettier/recommended',
'plugin:import/typescript',
],
settings: {
react: {
version: '18',
},
'import/resolver': {
typescript: true,
},
},
env: {
es2020: true,
},
rules: {
'no-case-declarations': 'off',
'no-implicit-coercion': [2, { number: true, string: true, boolean: false }],
'@typescript-eslint/no-redeclare': 'off',
'import/no-useless-path-segments': 'off',
'@typescript-eslint/ban-types': [
'error',
{
types: {
Buffer: 'Buffer usage increases bundle size and is not consistently implemented on web.',
},
extendDefaults: true,
},
],
'no-restricted-globals': [
'error',
{
name: 'Buffer',
message: 'Buffer usage increases bundle size and is not consistently implemented on web.',
},
],
'header/header': [
2,
'line',
[' Copyright (c) RoochNetwork', ' SPDX-License-Identifier: Apache-2.0'],
],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
vars: 'all',
args: 'none',
ignoreRestSiblings: true,
},
],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'directive', next: '*' },
],
},
}