This repository was archived by the owner on Mar 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.eslintrc.js
More file actions
55 lines (49 loc) · 1.3 KB
/
.eslintrc.js
File metadata and controls
55 lines (49 loc) · 1.3 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,
parser: '@typescript-eslint/parser', // Make ESLint compatible with TypeScript
parserOptions: {
// Enable linting rules with type information from our tsconfig
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json'],
sourceType: 'module', // Allow the use of imports / ES modules
ecmaFeatures: {
impliedStrict: true, // Enable global strict mode
},
},
// Specify global variables that are predefined
env: {
node: true, // Enable node global variables & Node.js scoping
es2020: true, // Add all ECMAScript 2020 globals and automatically set the ecmaVersion parser option to ES2020
},
plugins: [],
extends: [
'@xpring-eng/eslint-config-mocha',
'@xpring-eng/eslint-config-base',
],
rules: {
// linter doesn't seem to understand ESM imports used by jose, even though typescript handles them just fine.
"node/no-missing-import": ["error", {
allowModules: ["jose"],
}],
"import/no-unresolved": [
2,
{
ignore: [
'jose'
]
}],
},
overrides: [
{
"files": ["*cli.ts"],
"rules": {
"node/shebang": "off"
},
},
{
"files": ["src/commands/*.ts"],
"rules": {
"class-methods-use-this": "off"
},
}],
}