Skip to content

Commit

Permalink
fix: disable eslint-plugin-testing-library temporarily
Browse files Browse the repository at this point in the history
- still incompatible with eslint v8 - see testing-library/eslint-plugin-testing-library#499
  • Loading branch information
ljosberinn committed Oct 22, 2021
1 parent d72f1d5 commit 51f836e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 226 deletions.
224 changes: 0 additions & 224 deletions src/__tests__/overrides/__snapshots__/jest.test.js.snap
Expand Up @@ -17,7 +17,6 @@ Object {
},
"plugins": Array [
"jest",
"testing-library",
],
"rules": Object {
"import/no-namespace": "off",
Expand Down Expand Up @@ -76,32 +75,6 @@ Object {
"require-unicode-regexp": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/await-fire-event": "off",
"testing-library/consistent-data-testid": "off",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-container": "warn",
"testing-library/no-debug": "error",
"testing-library/no-dom-import": "off",
"testing-library/no-manual-cleanup": "error",
"testing-library/no-node-access": "warn",
"testing-library/no-promise-in-fire-event": "error",
"testing-library/no-render-in-setup": "off",
"testing-library/no-unnecessary-act": "error",
"testing-library/no-wait-for-empty-callback": "error",
"testing-library/no-wait-for-multiple-assertions": "error",
"testing-library/no-wait-for-side-effects": "error",
"testing-library/no-wait-for-snapshot": "error",
"testing-library/prefer-explicit-assert": "warn",
"testing-library/prefer-find-by": "warn",
"testing-library/prefer-presence-queries": "error",
"testing-library/prefer-query-by-disappearance": "error",
"testing-library/prefer-screen-queries": "error",
"testing-library/prefer-user-event": "error",
"testing-library/prefer-wait-for": "warn",
"testing-library/render-result-naming-convention": "off",
},
"settings": Object {
"jest": Object {
Expand All @@ -128,7 +101,6 @@ Object {
},
"plugins": Array [
"jest",
"testing-library",
],
"rules": Object {
"import/no-namespace": "off",
Expand Down Expand Up @@ -187,32 +159,7 @@ Object {
"require-unicode-regexp": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/await-fire-event": "off",
"testing-library/consistent-data-testid": "off",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-container": "warn",
"testing-library/no-debug": "error",
"testing-library/no-dom-import": "off",
"testing-library/no-manual-cleanup": "off",
"testing-library/no-node-access": "warn",
"testing-library/no-promise-in-fire-event": "error",
"testing-library/no-render-in-setup": "off",
"testing-library/no-unnecessary-act": "error",
"testing-library/no-wait-for-empty-callback": "error",
"testing-library/no-wait-for-multiple-assertions": "error",
"testing-library/no-wait-for-side-effects": "error",
"testing-library/no-wait-for-snapshot": "error",
"testing-library/prefer-explicit-assert": "warn",
"testing-library/prefer-find-by": "warn",
"testing-library/prefer-presence-queries": "error",
"testing-library/prefer-query-by-disappearance": "error",
"testing-library/prefer-screen-queries": "error",
"testing-library/prefer-user-event": "error",
"testing-library/prefer-wait-for": "warn",
"testing-library/render-result-naming-convention": "off",
},
"settings": Object {
"jest": Object {
Expand Down Expand Up @@ -338,7 +285,6 @@ Object {
"plugins": Array [
"jest",
"jest-dom",
"testing-library",
],
"rules": Object {
"@typescript-eslint/explicit-member-accessibility": "off",
Expand Down Expand Up @@ -416,35 +362,6 @@ Object {
"require-unicode-regexp": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/await-fire-event": "off",
"testing-library/consistent-data-testid": "off",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-container": "warn",
"testing-library/no-debug": "error",
"testing-library/no-dom-import": Array [
"warn",
"react",
],
"testing-library/no-manual-cleanup": "error",
"testing-library/no-node-access": "warn",
"testing-library/no-promise-in-fire-event": "error",
"testing-library/no-render-in-setup": "off",
"testing-library/no-unnecessary-act": "error",
"testing-library/no-wait-for-empty-callback": "error",
"testing-library/no-wait-for-multiple-assertions": "error",
"testing-library/no-wait-for-side-effects": "error",
"testing-library/no-wait-for-snapshot": "error",
"testing-library/prefer-explicit-assert": "warn",
"testing-library/prefer-find-by": "warn",
"testing-library/prefer-presence-queries": "error",
"testing-library/prefer-query-by-disappearance": "error",
"testing-library/prefer-screen-queries": "error",
"testing-library/prefer-user-event": "error",
"testing-library/prefer-wait-for": "warn",
"testing-library/render-result-naming-convention": "off",
},
"settings": Object {
"jest": Object {
Expand Down Expand Up @@ -476,7 +393,6 @@ Object {
"plugins": Array [
"jest",
"jest-dom",
"testing-library",
],
"rules": Object {
"@typescript-eslint/explicit-member-accessibility": "off",
Expand Down Expand Up @@ -554,35 +470,6 @@ Object {
"require-unicode-regexp": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/await-fire-event": "off",
"testing-library/consistent-data-testid": "off",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-container": "warn",
"testing-library/no-debug": "error",
"testing-library/no-dom-import": Array [
"warn",
"react",
],
"testing-library/no-manual-cleanup": "error",
"testing-library/no-node-access": "warn",
"testing-library/no-promise-in-fire-event": "error",
"testing-library/no-render-in-setup": "off",
"testing-library/no-unnecessary-act": "error",
"testing-library/no-wait-for-empty-callback": "error",
"testing-library/no-wait-for-multiple-assertions": "error",
"testing-library/no-wait-for-side-effects": "error",
"testing-library/no-wait-for-snapshot": "error",
"testing-library/prefer-explicit-assert": "warn",
"testing-library/prefer-find-by": "warn",
"testing-library/prefer-presence-queries": "error",
"testing-library/prefer-query-by-disappearance": "error",
"testing-library/prefer-screen-queries": "error",
"testing-library/prefer-user-event": "error",
"testing-library/prefer-wait-for": "warn",
"testing-library/render-result-naming-convention": "off",
},
"settings": Object {
"jest": Object {
Expand Down Expand Up @@ -613,7 +500,6 @@ Object {
"plugins": Array [
"jest",
"jest-dom",
"testing-library",
],
"rules": Object {
"import/no-namespace": "off",
Expand Down Expand Up @@ -685,35 +571,6 @@ Object {
"require-unicode-regexp": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/await-fire-event": "off",
"testing-library/consistent-data-testid": "off",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-container": "warn",
"testing-library/no-debug": "error",
"testing-library/no-dom-import": Array [
"warn",
"react",
],
"testing-library/no-manual-cleanup": "error",
"testing-library/no-node-access": "warn",
"testing-library/no-promise-in-fire-event": "error",
"testing-library/no-render-in-setup": "off",
"testing-library/no-unnecessary-act": "error",
"testing-library/no-wait-for-empty-callback": "error",
"testing-library/no-wait-for-multiple-assertions": "error",
"testing-library/no-wait-for-side-effects": "error",
"testing-library/no-wait-for-snapshot": "error",
"testing-library/prefer-explicit-assert": "warn",
"testing-library/prefer-find-by": "warn",
"testing-library/prefer-presence-queries": "error",
"testing-library/prefer-query-by-disappearance": "error",
"testing-library/prefer-screen-queries": "error",
"testing-library/prefer-user-event": "error",
"testing-library/prefer-wait-for": "warn",
"testing-library/render-result-naming-convention": "off",
},
"settings": Object {
"jest": Object {
Expand Down Expand Up @@ -744,7 +601,6 @@ Object {
"plugins": Array [
"jest",
"jest-dom",
"testing-library",
],
"rules": Object {
"@typescript-eslint/explicit-member-accessibility": "off",
Expand Down Expand Up @@ -820,32 +676,6 @@ Object {
"require-unicode-regexp": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/await-fire-event": "off",
"testing-library/consistent-data-testid": "off",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-container": "warn",
"testing-library/no-debug": "error",
"testing-library/no-dom-import": "off",
"testing-library/no-manual-cleanup": "error",
"testing-library/no-node-access": "warn",
"testing-library/no-promise-in-fire-event": "error",
"testing-library/no-render-in-setup": "off",
"testing-library/no-unnecessary-act": "error",
"testing-library/no-wait-for-empty-callback": "error",
"testing-library/no-wait-for-multiple-assertions": "error",
"testing-library/no-wait-for-side-effects": "error",
"testing-library/no-wait-for-snapshot": "error",
"testing-library/prefer-explicit-assert": "warn",
"testing-library/prefer-find-by": "warn",
"testing-library/prefer-presence-queries": "error",
"testing-library/prefer-query-by-disappearance": "error",
"testing-library/prefer-screen-queries": "error",
"testing-library/prefer-user-event": "error",
"testing-library/prefer-wait-for": "warn",
"testing-library/render-result-naming-convention": "off",
},
"settings": Object {
"jest": Object {
Expand Down Expand Up @@ -873,7 +703,6 @@ Object {
"plugins": Array [
"jest",
"jest-dom",
"testing-library",
],
"rules": Object {
"import/no-namespace": "off",
Expand Down Expand Up @@ -943,32 +772,6 @@ Object {
"require-unicode-regexp": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/await-fire-event": "off",
"testing-library/consistent-data-testid": "off",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-container": "warn",
"testing-library/no-debug": "error",
"testing-library/no-dom-import": "off",
"testing-library/no-manual-cleanup": "error",
"testing-library/no-node-access": "warn",
"testing-library/no-promise-in-fire-event": "error",
"testing-library/no-render-in-setup": "off",
"testing-library/no-unnecessary-act": "error",
"testing-library/no-wait-for-empty-callback": "error",
"testing-library/no-wait-for-multiple-assertions": "error",
"testing-library/no-wait-for-side-effects": "error",
"testing-library/no-wait-for-snapshot": "error",
"testing-library/prefer-explicit-assert": "warn",
"testing-library/prefer-find-by": "warn",
"testing-library/prefer-presence-queries": "error",
"testing-library/prefer-query-by-disappearance": "error",
"testing-library/prefer-screen-queries": "error",
"testing-library/prefer-user-event": "error",
"testing-library/prefer-wait-for": "warn",
"testing-library/render-result-naming-convention": "off",
},
"settings": Object {
"jest": Object {
Expand Down Expand Up @@ -1279,7 +1082,6 @@ Object {
},
"plugins": Array [
"jest",
"testing-library",
],
"rules": Object {
"import/no-namespace": "off",
Expand Down Expand Up @@ -1338,32 +1140,6 @@ Object {
"require-unicode-regexp": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-identical-functions": "off",
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/await-fire-event": "off",
"testing-library/consistent-data-testid": "off",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-container": "warn",
"testing-library/no-debug": "error",
"testing-library/no-dom-import": "off",
"testing-library/no-manual-cleanup": "error",
"testing-library/no-node-access": "warn",
"testing-library/no-promise-in-fire-event": "error",
"testing-library/no-render-in-setup": "off",
"testing-library/no-unnecessary-act": "error",
"testing-library/no-wait-for-empty-callback": "error",
"testing-library/no-wait-for-multiple-assertions": "error",
"testing-library/no-wait-for-side-effects": "error",
"testing-library/no-wait-for-snapshot": "error",
"testing-library/prefer-explicit-assert": "warn",
"testing-library/prefer-find-by": "warn",
"testing-library/prefer-presence-queries": "error",
"testing-library/prefer-query-by-disappearance": "error",
"testing-library/prefer-screen-queries": "error",
"testing-library/prefer-user-event": "error",
"testing-library/prefer-wait-for": "warn",
"testing-library/render-result-naming-convention": "off",
},
"settings": Object {
"jest": Object {
Expand Down
4 changes: 2 additions & 2 deletions src/overrides/jest.js
Expand Up @@ -57,14 +57,14 @@ const createJestOverride = ({
const plugins = [
'jest',
hasJestDom && 'jest-dom',
hasTestingLibrary && 'testing-library',
// hasTestingLibrary && 'testing-library',
...customPlugins,
].filter(Boolean);

const rules = {
...jestRules,
...(hasJestDom ? jestDomRules : null),
...(hasTestingLibrary ? getTestingLibraryRules({ react }) : null),
// ...(hasTestingLibrary ? getTestingLibraryRules({ react }) : null),
...getTestOverrides({ typescript, react }),
...customRules,
};
Expand Down

0 comments on commit 51f836e

Please sign in to comment.