Skip to content

Commit a6a678f

Browse files
authored
chore: bump eslint-config-devtools to 0.9.9 (#4635)
bump eslint-config-devtools
1 parent 1daa01e commit a6a678f

File tree

3 files changed

+1596
-1661
lines changed

3 files changed

+1596
-1661
lines changed

configs/eslint-config-compass/index.js

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ const path = require('path');
44
const shared = require('@mongodb-js/eslint-config-devtools');
55
const common = require('@mongodb-js/eslint-config-devtools/common');
66

7-
const tsRules = {
8-
...common.tsRules,
7+
const extraTsRules = {
98
// Newly converted plugins use `any` quite a lot, we can't enable the rule,
109
// but we can warn so we can eventually address this
1110
'@typescript-eslint/no-unsafe-argument': 'warn',
11+
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
12+
'@typescript-eslint/restrict-template-expressions': 'warn',
13+
'@typescript-eslint/restrict-plus-operands': 'warn',
14+
};
15+
16+
const tsRules = {
17+
...common.tsRules,
18+
...extraTsRules,
1219
};
1320

1421
const tsOverrides = {
@@ -18,20 +25,28 @@ const tsOverrides = {
1825

1926
const tsxRules = {
2027
...common.tsxRules,
21-
'@typescript-eslint/no-unsafe-argument': 'warn',
28+
...extraTsRules,
2229
};
2330

2431
const tsxOverrides = {
2532
...common.tsxOverrides,
2633
rules: { ...tsxRules },
2734
};
2835

29-
const testOverrides = {
36+
const testJsOverrides = {
3037
...common.testOverrides,
38+
files: ['**/*.spec.js', '**/*.spec.jsx', '**/*.test.js'],
39+
rules: {
40+
...common.testRules,
41+
'@mongodb-js/compass/unique-mongodb-log-id': 'off',
42+
},
43+
};
44+
45+
const testTsOverrides = {
46+
files: ['**/*.spec.ts', '**/*.spec.tsx', '**/*.test.tsx', '**/*.test.ts'],
3147
rules: {
3248
...common.testRules,
33-
'@typescript-eslint/no-unsafe-argument': 'off',
34-
'@typescript-eslint/restrict-template-expressions': 'off',
49+
...extraTsRules,
3550
'@mongodb-js/compass/unique-mongodb-log-id': 'off',
3651
},
3752
};
@@ -54,7 +69,8 @@ module.exports = {
5469
common.jsxOverrides,
5570
tsOverrides,
5671
tsxOverrides,
57-
testOverrides,
72+
testJsOverrides,
73+
testTsOverrides,
5874
],
5975
settings: {
6076
...shared.settings,

configs/eslint-config-compass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"dependencies": {
1616
"@babel/core": "^7.21.4",
1717
"@babel/eslint-parser": "^7.14.3",
18-
"@mongodb-js/eslint-config-devtools": "^0.9.7",
18+
"@mongodb-js/eslint-config-devtools": "^0.9.9",
1919
"@mongodb-js/eslint-plugin-compass": "^1.0.6",
2020
"@typescript-eslint/eslint-plugin": "^5.59.0",
2121
"@typescript-eslint/parser": "^5.59.0",

0 commit comments

Comments
 (0)