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 9def482

Browse files
juhanakristianBraydon Hall
authored and
Braydon Hall
committed
Added tsconfig.json. Modified eslint config
1 parent c53b56b commit 9def482

File tree

6 files changed

+28
-4
lines changed

6 files changed

+28
-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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,26 @@
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",
4648
"docz-theme-default": "1.2.0",
4749
"docz-utils": "2.3.0",
50+
<<<<<<< HEAD
4851
"kcd-scripts": "7.5.2",
4952
"react": "17.0.1",
5053
"react-test-renderer": "17.0.1",
5154
"typescript": "4.1.2",
5255
"eslint": "7.15.0"
56+
=======
57+
"eslint": "^7.15.0",
58+
"kcd-scripts": "^7.5.2",
59+
"react": "17.0.1",
60+
"react-test-renderer": "17.0.1",
61+
"typescript": "^4.1.2"
62+
>>>>>>> b70e5a0 (Added tsconfig.json. Modified eslint config)
5363
},
5464
"peerDependencies": {
5565
"react": ">=16.9.0",

‎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 によって変換されたページ (->オリジナル) /