forked from AudiusProject/audius-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
64 lines (64 loc) · 1.54 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
module.exports = {
root: true,
env: {
es6: true
},
extends: ['audius'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['react', 'react-hooks', '@typescript-eslint', 'import'],
settings: {
'import/external-module-folders': ['node_modules', 'web'],
'import/resolver': {
// NOTE: sk - These aliases are required for the import/order rule.
alias: {
map: [
['app', './src'],
['utils', '@audius/web/src/utils'],
['common', '@audius/web/src/common']
],
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json']
}
}
},
ignorePatterns: ['**/harmony/**/*'],
rules: {
'@typescript-eslint/consistent-type-imports': [
'error',
{
disallowTypeAnnotations: false
}
],
'no-restricted-properties': [
'error',
{
object: 'Promise',
property: 'allSettled',
message:
'Do NOT use `Promise.allSettled` as it will be undefined. Use `allSettled` from `@audius/common` instead.'
}
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@audius/harmony',
message:
'Use @audius/harmony-native instead. If needing to access an @audius/harmony export, reference it directly with @audius/harmony/src/..'
}
]
}
]
}
}