Skip to content

Commit b7c28dc

Browse files
committed
Added tsconfig.json. Modified eslint config
1 parent c53b56b commit b7c28dc

6 files changed

+20
-4
lines changed

.eslintrc

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
{
2-
"extends": "./node_modules/kcd-scripts/eslint.js",
2+
"extends": [
3+
"./node_modules/kcd-scripts/eslint.js",
4+
"plugin:@typescript-eslint/recommended"
5+
],
36
"rules": {
47
"max-lines-per-function": "off",
58
"no-constant-condition": "off",
69
"no-await-in-loop": "off",
710
"react-hooks/rules-of-hooks": "off",
8-
"no-console": "off"
9-
}
10-
}
11+
"no-console": "off",
12+
"no-use-before-define": "off",
13+
"@typescript-eslint/no-use-before-define": "warn"
14+
},
15+
}

jest.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line
12
const { jest: jestConfig } = require('kcd-scripts/config')
23

34
module.exports = Object.assign(jestConfig, {

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
"@types/testing-library__react-hooks": "^3.4.0"
4141
},
4242
"devDependencies": {
43+
"@typescript-eslint/eslint-plugin": "^4.9.1",
44+
"@typescript-eslint/parser": "^4.9.1",
4345
"all-contributors-cli": "6.19.0",
4446
"codecov": "3.8.1",
4547
"docz": "2.3.1",

test/autoCleanup.disabled.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ describe('skip auto cleanup (disabled) tests', () => {
88

99
beforeAll(() => {
1010
process.env.RHTL_SKIP_AUTO_CLEANUP = 'true'
11+
// eslint-disable-next-line
1112
renderHook = require('../src').renderHook
1213
})
1314

test/autoCleanup.noAfterEach.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ describe('skip auto cleanup (no afterEach) tests', () => {
99
beforeAll(() => {
1010
// eslint-disable-next-line no-global-assign
1111
afterEach = false
12+
// eslint-disable-next-line
1213
renderHook = require('../').renderHook
1314
})
1415

tsconfig.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./node_modules/kcd-scripts/shared-tsconfig.json",
3+
"compilerOptions": {
4+
"allowJs": true
5+
}
6+
}

0 commit comments

Comments
 (0)