Skip to content

Commit 15ecc95

Browse files
VoloVolo
authored andcommitted
Add new Eslint rules: no .only in tests and require await if function is async
1 parent 5b516ae commit 15ecc95

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.eslintrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"root": true,
33
"parser": "@typescript-eslint/parser",
4-
"plugins": ["@typescript-eslint"],
4+
"plugins": ["@typescript-eslint", "no-only-tests"],
55
"rules": {
66
"keyword-spacing": 2,
77
"array-bracket-spacing": [2, "never"],
@@ -33,7 +33,9 @@
3333
"no-sparse-arrays": 2,
3434
"no-unreachable": 2,
3535
"use-isnan": 2,
36-
"valid-typeof": 2
36+
"valid-typeof": 2,
37+
"require-await": "error",
38+
"no-only-tests/no-only-tests": "error"
3739
},
3840
"extends": [
3941
"eslint:recommended",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "intercom-client",
3-
"version": "3.1.2",
3+
"version": "3.1.3",
44
"description": "Official Node bindings to the Intercom API",
55
"homepage": "https://github.com/intercom/intercom-node",
66
"bugs:": "https://github.com/intercom/intercom-node/issues",
@@ -32,6 +32,7 @@
3232
"@typescript-eslint/parser": "^5.7.0",
3333
"eslint": "^8.2.0",
3434
"eslint-config-prettier": "^8.3.0",
35+
"eslint-plugin-no-only-tests": "^2.6.0",
3536
"merge2": "^1.4.1",
3637
"mocha": "^9.2.0",
3738
"nock": "^13.0.11",

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,13 @@ __metadata:
12951295
languageName: node
12961296
linkType: hard
12971297

1298+
"eslint-plugin-no-only-tests@npm:^2.6.0":
1299+
version: 2.6.0
1300+
resolution: "eslint-plugin-no-only-tests@npm:2.6.0"
1301+
checksum: 4e3c9cc7e09c13e855fd7af4a8969128f766dcf32a0680715ebcaa903c7fe44db8e45e994c8b908443a6019cbd9ea1b51f413bf968a0c58214aded930a863df9
1302+
languageName: node
1303+
linkType: hard
1304+
12981305
"eslint-scope@npm:^5.1.1":
12991306
version: 5.1.1
13001307
resolution: "eslint-scope@npm:5.1.1"
@@ -1922,6 +1929,7 @@ __metadata:
19221929
axios: ^0.24.0
19231930
eslint: ^8.2.0
19241931
eslint-config-prettier: ^8.3.0
1932+
eslint-plugin-no-only-tests: ^2.6.0
19251933
htmlencode: ^0.0.4
19261934
lodash: ^4.17.21
19271935
merge2: ^1.4.1

0 commit comments

Comments
 (0)