-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy path.eslintrc.js
More file actions
30 lines (30 loc) · 995 Bytes
/
.eslintrc.js
File metadata and controls
30 lines (30 loc) · 995 Bytes
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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
projectService: true,
tsconfigRootDir: __dirname,
},
plugins: ['import', '@typescript-eslint'],
rules: {
'import/no-nodejs-modules': 'warn',
'@typescript-eslint/no-floating-promises': 'error',
'no-restricted-globals': [
'error',
{
name: 'crypto',
message: 'Do not use global crypto object which only exists in browsers and fails for node runtimes',
},
],
},
ignorePatterns: ['**/*.test.ts', 'out/', 'src.gen/', 'src/client/**/*.d.ts'],
overrides: [
{
// Lint webworker bundle does not use browser-incompatible NodeJS APIs in source code and upstream dependencies
files: ['bundle/aws-lsp-codewhisperer-webworker.js'],
rules: {
'import/no-nodejs-modules': 'error',
},
},
],
}