Skip to content

Commit f5dc2b3

Browse files
fix: Typescript eslint setup
1 parent 4193c7c commit f5dc2b3

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.eslintrc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"parser": "@typescript-eslint/parser",
33
"extends": [
4-
"plugin:@typescript-eslint/recommended",
5-
"./node_modules/kcd-scripts/eslint.js"
4+
"./node_modules/kcd-scripts/eslint.js",
5+
"plugin:import/typescript"
66
],
7+
"plugins": ["@typescript-eslint"],
78
"rules": {
89
"babel/new-cap": "off",
910
"func-names": "off",
@@ -12,11 +13,12 @@
1213
"testing-library/no-await-sync-query": "off",
1314
"testing-library/no-dom-import": "off",
1415
"testing-library/prefer-screen-queries": "off",
15-
"@typescript-eslint/no-var-requires": "off"
16+
"no-unused-vars": "off",
17+
"@typescript-eslint/no-unused-vars": ["error"]
1618
},
1719
"overrides": [
1820
{
19-
"files": ["wdio.conf.js", "*/**/*.e2e.js"],
21+
"files": ["wdio.conf.js", "*/**/*.e2e.*"],
2022
"globals": {
2123
"browser": "readonly"
2224
}

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @typescript-eslint/no-implied-eval babel/no-invalid-this */
1+
/* eslint-disable babel/no-invalid-this, no-eval */
22

33
import path from 'path'
44
import fs from 'fs'
@@ -30,7 +30,7 @@ async function injectDOMTestingLibrary(container: Element) {
3030
await container.execute(DOM_TESTING_LIBRARY_UMD)
3131

3232
if (_config) {
33-
await container.execute(function (config) {
33+
await container.execute(function (config: Config) {
3434
window.TestingLibraryDom.configure(config)
3535
}, _config)
3636
}
@@ -136,7 +136,7 @@ async function setupBrowser(browser: BrowserObject | MultiRemoteBrowserObject) {
136136
// add query to scoped to Element
137137
browser.addCommand(
138138
queryName,
139-
function (...args) {
139+
function(...args: any[]) {
140140
// @ts-expect-error
141141
return within(this as Element)[queryName](...args)
142142
},

0 commit comments

Comments
 (0)