Skip to content

Commit

Permalink
fix(deps): update dependency eslint-plugin-unicorn to v45
Browse files Browse the repository at this point in the history
- adopt new rules
  • Loading branch information
ljosberinn committed Jan 6, 2023
1 parent 40ef897 commit 498395f
Show file tree
Hide file tree
Showing 17 changed files with 140 additions and 23 deletions.
2 changes: 1 addition & 1 deletion __tests__/plugins/__snapshots__/eslint-core.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ exports[`createEslintCoreRules defaults 1`] = `
"no-multi-spaces": "off",
"no-multi-str": "off",
"no-multiple-empty-lines": "off",
"no-negated-condition": "error",
"no-negated-condition": "off",
"no-nested-ternary": "off",
"no-new": "error",
"no-new-func": "error",
Expand Down
36 changes: 36 additions & 0 deletions __tests__/plugins/__snapshots__/unicorn.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ exports[`String.prototype.replaceAll detection with both criteria 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "off",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -40,6 +41,7 @@ exports[`String.prototype.replaceAll detection with both criteria 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -93,6 +95,7 @@ exports[`String.prototype.replaceAll detection with both criteria 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -151,6 +154,7 @@ exports[`String.prototype.replaceAll detection with lib esnext 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -160,6 +164,7 @@ exports[`String.prototype.replaceAll detection with lib esnext 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -213,6 +218,7 @@ exports[`String.prototype.replaceAll detection with lib esnext 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -271,6 +277,7 @@ exports[`String.prototype.replaceAll detection with react 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "off",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -280,6 +287,7 @@ exports[`String.prototype.replaceAll detection with react 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "warn",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -333,6 +341,7 @@ exports[`String.prototype.replaceAll detection with react 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -391,6 +400,7 @@ exports[`topLevelAwait detection with both criteria 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -400,6 +410,7 @@ exports[`topLevelAwait detection with both criteria 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -453,6 +464,7 @@ exports[`topLevelAwait detection with both criteria 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -511,6 +523,7 @@ exports[`topLevelAwait detection with entirely invalid target 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -520,6 +533,7 @@ exports[`topLevelAwait detection with entirely invalid target 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -573,6 +587,7 @@ exports[`topLevelAwait detection with entirely invalid target 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -631,6 +646,7 @@ exports[`topLevelAwait detection with invalid ScriptTarget 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -640,6 +656,7 @@ exports[`topLevelAwait detection with invalid ScriptTarget 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -693,6 +710,7 @@ exports[`topLevelAwait detection with invalid ScriptTarget 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -751,6 +769,7 @@ exports[`topLevelAwait detection with invalid module 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -760,6 +779,7 @@ exports[`topLevelAwait detection with invalid module 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -813,6 +833,7 @@ exports[`topLevelAwait detection with invalid module 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -871,6 +892,7 @@ exports[`topLevelAwait detection with invalid string target 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -880,6 +902,7 @@ exports[`topLevelAwait detection with invalid string target 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -933,6 +956,7 @@ exports[`topLevelAwait detection with invalid string target 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -991,6 +1015,7 @@ exports[`topLevelAwait detection with invalid target 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -1000,6 +1025,7 @@ exports[`topLevelAwait detection with invalid target 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -1053,6 +1079,7 @@ exports[`topLevelAwait detection with invalid target 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -1111,6 +1138,7 @@ exports[`with @types/node 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -1120,6 +1148,7 @@ exports[`with @types/node 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "warn",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -1174,6 +1203,7 @@ exports[`with @types/node 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -1232,6 +1262,7 @@ exports[`with react 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "off",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -1241,6 +1272,7 @@ exports[`with react 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "warn",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -1294,6 +1326,7 @@ exports[`with react 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
Expand Down Expand Up @@ -1352,6 +1385,7 @@ exports[`with typescript 1`] = `
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -1361,6 +1395,7 @@ exports[`with typescript 1`] = `
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -1414,6 +1449,7 @@ exports[`with typescript 1`] = `
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-string-slice": "error",
Expand Down
5 changes: 4 additions & 1 deletion integration/cra-js/eslint-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@
"no-mixed-spaces-and-tabs": "off",
"no-multi-assign": "error",
"no-multiple-empty-lines": "off",
"no-negated-condition": "error",
"no-negated-condition": "off",
"no-nested-ternary": "off",
"no-new-object": "error",
"no-plusplus": "off",
Expand Down Expand Up @@ -843,6 +843,7 @@
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "off",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -852,6 +853,7 @@
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "warn",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -905,6 +907,7 @@
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
Expand Down
5 changes: 4 additions & 1 deletion integration/cra-ts/eslint-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@
"no-mixed-spaces-and-tabs": "off",
"no-multi-assign": "error",
"no-multiple-empty-lines": "off",
"no-negated-condition": "error",
"no-negated-condition": "off",
"no-nested-ternary": "off",
"no-new-object": "error",
"no-plusplus": "off",
Expand Down Expand Up @@ -1092,6 +1092,7 @@
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "off",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -1101,6 +1102,7 @@
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -1155,6 +1157,7 @@
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
Expand Down
5 changes: 4 additions & 1 deletion integration/jest/eslint-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@
"no-mixed-spaces-and-tabs": "off",
"no-multi-assign": "error",
"no-multiple-empty-lines": "off",
"no-negated-condition": "error",
"no-negated-condition": "off",
"no-nested-ternary": "off",
"no-new-object": "error",
"no-plusplus": "off",
Expand Down Expand Up @@ -802,6 +802,7 @@
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-keyword-prefix": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-negated-condition": "warn",
"unicorn/no-nested-ternary": "off",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
Expand All @@ -811,6 +812,7 @@
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "warn",
"unicorn/no-this-assignment": "warn",
"unicorn/no-typeof-undefined": "warn",
"unicorn/no-unnecessary-await": "off",
"unicorn/no-unreadable-array-destructuring": "warn",
"unicorn/no-unreadable-iife": "warn",
Expand Down Expand Up @@ -864,6 +866,7 @@
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "warn",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
Expand Down
Loading

0 comments on commit 498395f

Please sign in to comment.