Skip to content

Commit

Permalink
feat: support ESLint 8.x
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Requires ESLint@^8.0.0-0
  • Loading branch information
MichaelDeBoey committed Sep 6, 2021
1 parent 3383e9f commit 3ccb5fe
Show file tree
Hide file tree
Showing 29 changed files with 6 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
strategy:
matrix:
node: [12.22.0, 12, 14.17.0, 14, '16.0', 16]
eslint: [7.5, 7]
eslint: ['^8.0.0-0']

steps:
- name: Cancel Previous Runs
Expand Down
1 change: 0 additions & 1 deletion lib/rules/await-async-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Enforce promises from async queries to be handled',
category: 'Best Practices',
recommendedConfig: {
dom: 'error',
angular: 'error',
Expand Down
1 change: 0 additions & 1 deletion lib/rules/await-async-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Enforce promises from async utils to be awaited properly',
category: 'Best Practices',
recommendedConfig: {
dom: 'error',
angular: 'error',
Expand Down
1 change: 0 additions & 1 deletion lib/rules/await-fire-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Enforce promises from `fireEvent` methods to be handled',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/consistent-data-testid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'suggestion',
docs: {
description: 'Ensures consistent usage of `data-testid`',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-await-sync-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Disallow unnecessary `await` for sync events',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-await-sync-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Disallow unnecessary `await` for sync queries',
category: 'Best Practices',
recommendedConfig: {
dom: 'error',
angular: 'error',
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Disallow the use of `container` methods',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: 'error',
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Disallow the use of debugging utilities like `debug`',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: 'error',
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-dom-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Disallow importing from DOM Testing Library',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: ['error', 'angular'],
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-manual-cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Disallow the use of `cleanup`',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-node-access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Disallow direct Node access',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: 'error',
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-promise-in-fire-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description:
'Disallow the use of promises passed to a `fireEvent` method',
category: 'Best Practices',
recommendedConfig: {
dom: 'error',
angular: 'error',
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-render-in-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description:
'Disallow the use of `render` in testing frameworks setup functions',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-unnecessary-act.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description:
'Disallow wrapping Testing Library utils or empty callbacks in `act`',
category: 'Possible Errors',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-wait-for-empty-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description:
'Disallow empty callbacks for `waitFor` and `waitForElementToBeRemoved`',
category: 'Best Practices',
recommendedConfig: {
dom: 'error',
angular: 'error',
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-wait-for-multiple-assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description:
'Disallow the use of multiple `expect` calls inside `waitFor`',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-wait-for-side-effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'suggestion',
docs: {
description: 'Disallow the use of side effects in `waitFor`',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/no-wait-for-snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description:
'Ensures no snapshot is generated inside of a `waitFor` call',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/prefer-explicit-assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description:
'Suggest using explicit assertions rather than standalone queries',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/prefer-find-by.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description:
'Suggest using `find(All)By*` query instead of `waitFor` + `get(All)By*` to wait for elements',
category: 'Best Practices',
recommendedConfig: {
dom: 'error',
angular: 'error',
Expand Down
1 change: 0 additions & 1 deletion lib/rules/prefer-presence-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
name: RULE_NAME,
meta: {
docs: {
category: 'Best Practices',
description:
'Ensure appropriate `get*`/`query*` queries are used with their respective matchers',
recommendedConfig: {
Expand Down
1 change: 0 additions & 1 deletion lib/rules/prefer-query-by-disappearance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description:
'Suggest using `queryBy*` queries when waiting for disappearance',
category: 'Possible Errors',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/prefer-screen-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'suggestion',
docs: {
description: 'Suggest using `screen` while querying',
category: 'Best Practices',
recommendedConfig: {
dom: 'error',
angular: 'error',
Expand Down
1 change: 0 additions & 1 deletion lib/rules/prefer-user-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description:
'Suggest using `userEvent` over `fireEvent` for simulating user interactions',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/prefer-wait-for.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'suggestion',
docs: {
description: 'Use `waitFor` instead of deprecated wait methods',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: false,
Expand Down
1 change: 0 additions & 1 deletion lib/rules/render-result-naming-convention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'suggestion',
docs: {
description: 'Enforce a valid naming for return value from `render`',
category: 'Best Practices',
recommendedConfig: {
dom: false,
angular: 'error',
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
"prepare": "is-ci || husky install"
},
"dependencies": {
"@typescript-eslint/experimental-utils": "^4.30.0"
"@typescript-eslint/experimental-utils": "^5.0.0-0"
},
"devDependencies": {
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@types/jest": "^27.0.1",
"@types/node": "^12.20.23",
"@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.30.0",
"@typescript-eslint/eslint-plugin": "^5.0.0-0",
"@typescript-eslint/parser": "^5.0.0-0",
"cpy-cli": "^3.1.1",
"eslint": "^7.32.0",
"eslint": "^8.0.0-0",
"eslint-config-kentcdodds": "^19.1.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.24.2",
Expand All @@ -72,7 +72,7 @@
"typescript": "^4.4.2"
},
"peerDependencies": {
"eslint": "^7.5.0"
"eslint": "^8.0.0-0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0",
Expand Down
1 change: 0 additions & 1 deletion tests/fake-rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default createTestingLibraryRule<Options, MessageIds>({
type: 'problem',
docs: {
description: 'Fake rule to test rule maker and detection helpers',
category: 'Possible Errors',
recommendedConfig: {
dom: false,
angular: false,
Expand Down

0 comments on commit 3ccb5fe

Please sign in to comment.