Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Dec 23, 2020
1 parent c854348 commit 41d5f14
Show file tree
Hide file tree
Showing 48 changed files with 26 additions and 1,695 deletions.
11 changes: 8 additions & 3 deletions index.js
Expand Up @@ -5,11 +5,16 @@ const createDeprecatedRules = require('./rules/utils/create-deprecated-rules');

const deprecatedRules = createDeprecatedRules({
// {ruleId: ReplacementRuleId | ReplacementRuleId[]}, if no replacement, use `{ruleId: []}`
'no-array-instanceof': 'unicorn/no-instanceof-array',
'no-fn-reference-in-iterator': 'unicorn/no-array-callback-reference',
'no-reduce': 'unicorn/no-array-reduce',
'prefer-exponentiation-operator': 'prefer-exponentiation-operator',
'prefer-dataset': 'unicorn/prefer-node-dataset',
'prefer-flat-map': 'unicorn/prefer-array-flat-map',
'prefer-replace-all': 'unicorn/prefer-string-replace-all',
'prefer-starts-ends-with': 'unicorn/prefer-string-starts-ends-with',
'prefer-text-content': 'unicorn/prefer-node-text-content',
'prefer-trim-start-end': 'unicorn/prefer-string-trim-start-end',
'regex-shorthand': 'unicorn/better-regex'
});

Expand Down Expand Up @@ -70,7 +75,7 @@ module.exports = {
'unicorn/prefer-add-event-listener': 'error',
'unicorn/prefer-array-find': 'error',
// TODO: Enable this by default when targeting Node.js 12.
'unicorn/prefer-flat-map': 'off',
'unicorn/prefer-array-flat-map': 'off',
'unicorn/prefer-date-now': 'error',
'unicorn/prefer-default-parameters': 'error',
'unicorn/prefer-event-key': 'error',
Expand All @@ -89,9 +94,9 @@ module.exports = {
'unicorn/prefer-set-has': 'error',
'unicorn/prefer-spread': 'error',
// TODO: Enable this by default when targeting Node.js 16.
'unicorn/prefer-starts-replace-all': 'off',
'unicorn/prefer-starts-starts-ends-with': 'error',
'unicorn/prefer-string-replace-all': 'off',
'unicorn/prefer-string-slice': 'error',
'unicorn/prefer-string-starts-ends-with': 'error',
'unicorn/prefer-string-trim-start-end': 'error',
'unicorn/prefer-ternary': 'error',
'unicorn/prefer-type-error': 'error',
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -89,8 +89,8 @@ Configure it in `package.json`.
"unicorn/prefer-set-has": "error",
"unicorn/prefer-spread": "error",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prefer-string-starts-ends-with": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/prefer-string-starts-ends-with": "error",
"unicorn/prefer-string-trim-start-end": "error",
"unicorn/prefer-ternary": "off",
"unicorn/prefer-type-error": "error",
Expand Down
101 changes: 0 additions & 101 deletions test/snapshots/consistent-function-scoping.js.md

This file was deleted.

Binary file removed test/snapshots/consistent-function-scoping.js.snap
Binary file not shown.
33 changes: 0 additions & 33 deletions test/snapshots/empty-brace-spaces.js.md

This file was deleted.

Binary file removed test/snapshots/empty-brace-spaces.js.snap
Binary file not shown.
191 changes: 0 additions & 191 deletions test/snapshots/error-message.js.md

This file was deleted.

Binary file removed test/snapshots/error-message.js.snap
Binary file not shown.

0 comments on commit 41d5f14

Please sign in to comment.