Skip to content

Commit

Permalink
Resolve lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jan 31, 2023
1 parent 9de741a commit 25a79e0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
},
"eslintConfig": {
"extends": "./node_modules/kcd-scripts/eslint.js",
"parserOptions": {
"ecmaVersion": 2022
},
"globals": {
"globalThis": "readonly"
},
Expand All @@ -76,6 +79,7 @@
"import/no-unassigned-import": "off",
"import/named": "off",
"testing-library/no-container": "off",
"testing-library/no-debugging-utils": "off",
"testing-library/no-dom-import": "off",
"testing-library/no-unnecessary-act": "off",
"testing-library/prefer-user-event": "off"
Expand Down
3 changes: 2 additions & 1 deletion src/__tests__/cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('fake timers and missing act warnings', () => {
let cancelled = false
Promise.resolve().then(() => {
microTaskSpy()
// eslint-disable-next-line jest/no-if -- false positive
// eslint-disable-next-line jest/no-if, jest/no-conditional-in-test -- false positive
if (!cancelled) {
setDeferredCounter(counter)
}
Expand Down Expand Up @@ -96,6 +96,7 @@ describe('fake timers and missing act warnings', () => {
let cancelled = false
setTimeout(() => {
deferredStateUpdateSpy()
// eslint-disable-next-line jest/no-conditional-in-test -- false-positive
if (!cancelled) {
setDeferredCounter(counter)
}
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,4 @@ test('allows same arguments as prettyDOM', () => {
/*
eslint
no-console: "off",
testing-library/no-debug: "off",
*/
2 changes: 1 addition & 1 deletion src/__tests__/renderHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test('allows rerendering', () => {
const [left, setLeft] = React.useState('left')
const [right, setRight] = React.useState('right')

// eslint-disable-next-line jest/no-if
// eslint-disable-next-line jest/no-if, jest/no-conditional-in-test -- false-positive
switch (branch) {
case 'left':
return [left, setLeft]
Expand Down
2 changes: 1 addition & 1 deletion tests/toWarnDev.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SOFTWARE.
*/
/* eslint-disable no-unsafe-finally */
/* eslint-disable no-negated-condition */
/* eslint-disable @babel/no-invalid-this */
/* eslint-disable no-invalid-this */
/* eslint-disable prefer-template */
/* eslint-disable func-names */
/* eslint-disable complexity */
Expand Down
1 change: 0 additions & 1 deletion types/test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ export function testRenderHookProps() {
eslint
testing-library/prefer-explicit-assert: "off",
testing-library/no-wait-for-empty-callback: "off",
testing-library/no-debug: "off",
testing-library/prefer-screen-queries: "off"
*/

Expand Down

0 comments on commit 25a79e0

Please sign in to comment.