-
Notifications
You must be signed in to change notification settings - Fork 180
/
.eslintrc.js
38 lines (38 loc) · 1.03 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
'use strict';
module.exports = {
root: true,
extends: ['@mongodb-js/eslint-config-compass'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig-lint.json'],
},
overrides: [
{
files: ['./src/**/*.ts', './src/**/*.tsx'],
rules: {
// See -
// https://typescript-eslint.io/rules/no-restricted-imports/#how-to-use
'no-restricted-imports': 'off',
'@typescript-eslint/no-restricted-imports': [
'error',
{
patterns: [
{
group: ['@mongodb-js/connection-storage', 'mongodb'],
message:
'@mongodb-js/connection-form package is shared between Compass and VSCode and should use Compass-specific packages only for type definitions',
allowTypeImports: true,
},
],
},
],
},
},
{
files: ['./src/**/*.spec.ts'],
rules: {
'@typescript-eslint/no-restricted-imports': ['off'],
},
},
],
};