Skip to content

Commit

Permalink
fix(NODE-2899): sort and correct circular imports (#3072)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Dec 13, 2021
1 parent 4f56409 commit 48cc729
Show file tree
Hide file tree
Showing 171 changed files with 3,860 additions and 2,561 deletions.
57 changes: 46 additions & 11 deletions .eslintrc.json
Expand Up @@ -4,7 +4,13 @@
"parserOptions": {
"ecmaVersion": 2019
},
"plugins": ["@typescript-eslint", "prettier", "eslint-plugin-tsdoc"],
"plugins": [
"simple-import-sort",
"import",
"@typescript-eslint",
"prettier",
"tsdoc"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
Expand All @@ -28,7 +34,15 @@
"null": "ignore"
}
],
"strict": ["error", "global"],
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"strict": [
"error",
"global"
],
"@typescript-eslint/no-explicit-any": "off",
"no-restricted-syntax": [
"error",
Expand All @@ -52,7 +66,9 @@
},
"overrides": [
{
"files": ["*.d.ts"],
"files": [
"*.d.ts"
],
"parser": "@typescript-eslint/parser",
"rules": {
"prettier/prettier": "off",
Expand All @@ -63,17 +79,26 @@
}
},
{
"files": ["*.mjs"],
"files": [
"*.mjs"
],
"parserOptions": {
"sourceType": "module"
}
},
{
// Settings for javascript test files
"files": ["test/**/*.js"],
"files": [
"test/**/*.js"
],
"parser": "espree",
"plugins": ["prettier"],
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"plugins": [
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-function": "off",
Expand All @@ -84,18 +109,26 @@
"no-restricted-modules": [
"error",
{
"patterns": ["**/../lib/**", "mongodb-mock-server"]
"patterns": [
"**/../lib/**",
"mongodb-mock-server"
]
}
],
"no-console": "off",
"tsdoc/syntax": "off",
"strict": ["off", "global"],
"strict": [
"off",
"global"
],
"no-restricted-syntax": "off"
}
},
{
// Settings for typescript test files
"files": ["test/**/*.ts"],
"files": [
"test/**/*.ts"
],
"parser": "@typescript-eslint/parser",
"rules": {
"no-console": "off",
Expand All @@ -104,7 +137,9 @@
},
{
// Settings for typescript type test files
"files": ["*.test-d.ts"],
"files": [
"*.test-d.ts"
],
"parser": "@typescript-eslint/parser",
"rules": {
"prettier/prettier": "error",
Expand Down
3 changes: 1 addition & 2 deletions .mocharc.json
Expand Up @@ -7,8 +7,7 @@
"require": [
"source-map-support/register",
"ts-node/register",
"test/tools/runner/chai-addons",
"test/tools/runner/circular-dep-hack"
"test/tools/runner/chai-addons"
],
"ui": "test/tools/runner/metadata_ui.js",
"recursive": true,
Expand Down

0 comments on commit 48cc729

Please sign in to comment.