Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b7c28dc

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

File tree

6 files changed

+20
-4
lines changed

6 files changed

+20
-4
lines changed

‎.eslintrc

Lines changed: 9 additions & 4 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 6 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /