Skip to content

Commit c117036

Browse files
authored
chore: update dependencies (#2995)
1 parent d9daac5 commit c117036

14 files changed

+418
-537
lines changed

.eslintrc.json

Lines changed: 74 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
"parserOptions": {
55
"ecmaVersion": 2019
66
},
7-
"plugins": [
8-
"@typescript-eslint",
9-
"prettier",
10-
"eslint-plugin-tsdoc"
11-
],
7+
"plugins": ["@typescript-eslint", "prettier", "eslint-plugin-tsdoc"],
128
"extends": [
139
"eslint:recommended",
1410
"plugin:@typescript-eslint/eslint-recommended",
@@ -22,15 +18,17 @@
2218
},
2319
"rules": {
2420
"prettier/prettier": "error",
25-
2621
"tsdoc/syntax": "warn",
27-
2822
"no-console": "error",
29-
"eqeqeq": ["error", "always", {"null": "ignore"}],
23+
"eqeqeq": [
24+
"error",
25+
"always",
26+
{
27+
"null": "ignore"
28+
}
29+
],
3030
"strict": ["error", "global"],
31-
3231
"@typescript-eslint/no-explicit-any": "off",
33-
3432
"no-restricted-syntax": [
3533
"error",
3634
{
@@ -51,23 +49,71 @@
5149
}
5250
]
5351
},
54-
"overrides": [{
55-
"files": ["*.d.ts"],
56-
"rules": {
57-
"prettier/prettier": "off",
58-
"@typescript-eslint/no-empty-interface": "off",
59-
"@typescript-eslint/no-misused-new": "off",
60-
"@typescript-eslint/ban-types": "off",
61-
"@typescript-eslint/no-unused-vars": "off"
52+
"overrides": [
53+
{
54+
"files": ["*.d.ts"],
55+
"parser": "@typescript-eslint/parser",
56+
"rules": {
57+
"prettier/prettier": "off",
58+
"@typescript-eslint/no-empty-interface": "off",
59+
"@typescript-eslint/no-misused-new": "off",
60+
"@typescript-eslint/ban-types": "off",
61+
"@typescript-eslint/no-unused-vars": "off"
62+
}
63+
},
64+
{
65+
"files": ["*.mjs"],
66+
"parserOptions": {
67+
"sourceType": "module"
68+
}
69+
},
70+
{
71+
// Settings for javascript test files
72+
"files": ["test/**/*.js"],
73+
"parser": "espree",
74+
"plugins": ["prettier"],
75+
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
76+
"rules": {
77+
"@typescript-eslint/no-var-requires": "off",
78+
"@typescript-eslint/no-empty-function": "off",
79+
"@typescript-eslint/no-this-alias": "off",
80+
"@typescript-eslint/no-unused-vars": "off",
81+
// Since we use ts-node we should always require the TS code
82+
// Also we have patches to apply to the mock server, so we should always import from there
83+
"no-restricted-modules": [
84+
"error",
85+
{
86+
"patterns": ["**/../lib/**", "mongodb-mock-server"]
87+
}
88+
],
89+
"no-console": "off",
90+
"tsdoc/syntax": "off",
91+
"strict": ["off", "global"],
92+
"no-restricted-syntax": "off"
93+
}
94+
},
95+
{
96+
// Settings for typescript test files
97+
"files": ["test/**/*.ts"],
98+
"parser": "@typescript-eslint/parser",
99+
"rules": {
100+
"no-console": "off",
101+
"no-restricted-syntax": "off"
102+
}
103+
},
104+
{
105+
// Settings for typescript type test files
106+
"files": ["*.test-d.ts"],
107+
"parser": "@typescript-eslint/parser",
108+
"rules": {
109+
"prettier/prettier": "error",
110+
"tsdoc/syntax": "warn",
111+
"no-console": "off",
112+
"@typescript-eslint/no-explicit-any": "off",
113+
"@typescript-eslint/no-unused-vars": "error",
114+
"@typescript-eslint/ban-ts-comment": "off",
115+
"@typescript-eslint/no-empty-function": "off"
116+
}
62117
}
63-
},
64-
{
65-
"files": ["*.mjs"],
66-
"parserOptions": {"sourceType": "module"}
67-
68-
},{
69-
"files": ["*.ts"],
70-
"parserOptions": {"sourceType": "module"}
71-
72-
}]
118+
]
73119
}

.evergreen/run-checks.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ source "${PROJECT_DIRECTORY}/.evergreen/init-nvm.sh"
55

66
npm run check:lint
77

8+
npm run check:unit
9+
810
echo "Typescript $(npx tsc -v)"
911
# check resolution uses the default latest types
1012
echo "import * as mdb from '.'" > file.ts && npx tsc --noEmit --traceResolution file.ts | grep 'mongodb.d.ts' && rm file.ts
@@ -14,5 +16,3 @@ echo "Typescript $(npx tsc -v)"
1416
npx tsc --noEmit mongodb.ts34.d.ts
1517
# check that resolution uses the downleveled types
1618
echo "import * as mdb from '.'" > file.ts && npx tsc --noEmit --traceResolution file.ts | grep 'mongodb.ts34.d.ts' && rm file.ts
17-
18-
npm run check:unit

0 commit comments

Comments
 (0)