-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslintrc.cjs
76 lines (75 loc) · 1.52 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
72
73
74
75
76
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
module.exports = {
plugins: ['unused-imports', 'prettier', 'header', 'require-extensions'],
extends: [
'react-app',
'eslint:recommended',
'prettier',
'plugin:prettier/recommended',
'plugin:import/typescript',
],
settings: {
'import/resolver': {
typescript: true,
},
},
env: {
es2020: true,
},
root: false,
ignorePatterns: [
'node_modules',
'build',
'dist',
'coverage',
'apps/icons/src',
'next-env.d.ts',
'doc/book',
'external-crates',
'storybook-static',
'.next',
'documentation',
'packages',
],
rules: {
'no-case-declarations': 'off',
'no-implicit-coercion': [2, { number: true, string: true, boolean: false }],
'@typescript-eslint/no-redeclare': '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) Mysten Labs, Inc.', ' SPDX-License-Identifier: Apache-2.0'],
],
'unused-imports/no-unused-imports': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
vars: 'all',
args: 'none',
ignoreRestSiblings: true,
},
],
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
};