Skip to content

Commit 48cc729

Browse files
authored
fix(NODE-2899): sort and correct circular imports (#3072)
1 parent 4f56409 commit 48cc729

File tree

171 files changed

+3860
-2561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+3860
-2561
lines changed

.eslintrc.json

+46-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
"parserOptions": {
55
"ecmaVersion": 2019
66
},
7-
"plugins": ["@typescript-eslint", "prettier", "eslint-plugin-tsdoc"],
7+
"plugins": [
8+
"simple-import-sort",
9+
"import",
10+
"@typescript-eslint",
11+
"prettier",
12+
"tsdoc"
13+
],
814
"extends": [
915
"eslint:recommended",
1016
"plugin:@typescript-eslint/eslint-recommended",
@@ -28,7 +34,15 @@
2834
"null": "ignore"
2935
}
3036
],
31-
"strict": ["error", "global"],
37+
"simple-import-sort/imports": "error",
38+
"simple-import-sort/exports": "error",
39+
"import/first": "error",
40+
"import/newline-after-import": "error",
41+
"import/no-duplicates": "error",
42+
"strict": [
43+
"error",
44+
"global"
45+
],
3246
"@typescript-eslint/no-explicit-any": "off",
3347
"no-restricted-syntax": [
3448
"error",
@@ -52,7 +66,9 @@
5266
},
5367
"overrides": [
5468
{
55-
"files": ["*.d.ts"],
69+
"files": [
70+
"*.d.ts"
71+
],
5672
"parser": "@typescript-eslint/parser",
5773
"rules": {
5874
"prettier/prettier": "off",
@@ -63,17 +79,26 @@
6379
}
6480
},
6581
{
66-
"files": ["*.mjs"],
82+
"files": [
83+
"*.mjs"
84+
],
6785
"parserOptions": {
6886
"sourceType": "module"
6987
}
7088
},
7189
{
7290
// Settings for javascript test files
73-
"files": ["test/**/*.js"],
91+
"files": [
92+
"test/**/*.js"
93+
],
7494
"parser": "espree",
75-
"plugins": ["prettier"],
76-
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
95+
"plugins": [
96+
"prettier"
97+
],
98+
"extends": [
99+
"eslint:recommended",
100+
"plugin:prettier/recommended"
101+
],
77102
"rules": {
78103
"@typescript-eslint/no-var-requires": "off",
79104
"@typescript-eslint/no-empty-function": "off",
@@ -84,18 +109,26 @@
84109
"no-restricted-modules": [
85110
"error",
86111
{
87-
"patterns": ["**/../lib/**", "mongodb-mock-server"]
112+
"patterns": [
113+
"**/../lib/**",
114+
"mongodb-mock-server"
115+
]
88116
}
89117
],
90118
"no-console": "off",
91119
"tsdoc/syntax": "off",
92-
"strict": ["off", "global"],
120+
"strict": [
121+
"off",
122+
"global"
123+
],
93124
"no-restricted-syntax": "off"
94125
}
95126
},
96127
{
97128
// Settings for typescript test files
98-
"files": ["test/**/*.ts"],
129+
"files": [
130+
"test/**/*.ts"
131+
],
99132
"parser": "@typescript-eslint/parser",
100133
"rules": {
101134
"no-console": "off",
@@ -104,7 +137,9 @@
104137
},
105138
{
106139
// Settings for typescript type test files
107-
"files": ["*.test-d.ts"],
140+
"files": [
141+
"*.test-d.ts"
142+
],
108143
"parser": "@typescript-eslint/parser",
109144
"rules": {
110145
"prettier/prettier": "error",

.mocharc.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"require": [
88
"source-map-support/register",
99
"ts-node/register",
10-
"test/tools/runner/chai-addons",
11-
"test/tools/runner/circular-dep-hack"
10+
"test/tools/runner/chai-addons"
1211
],
1312
"ui": "test/tools/runner/metadata_ui.js",
1413
"recursive": true,

0 commit comments

Comments
 (0)