@putout/plugin-tape 13.1.0 β†’ 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -40,6 +40,7 @@ npm i @putout/plugin-tape -D
40
40
  "tape/convert-called-with-no-args-to-called-with": "on",
41
41
  "tape/convert-equal-to-called-once": "on",
42
42
  "tape/convert-equal-to-deep-equal": "on",
43
+ "tape/convert-equals-to-equal": "on",
43
44
  "tape/convert-deep-equal-to-equal": "on",
44
45
  "tape/convert-emitter-to-promise": "on",
45
46
  "tape/convert-ok-to-match": "on",
@@ -519,10 +520,7 @@ test('xxx', (t) => {
519
520
  #### βœ… Example of correct code
520
521
 
521
522
  ```js
522
- import {
523
- test,
524
- stub,
525
- } from 'supertape';
523
+ import {test, stub} from 'supertape';
526
524
 
527
525
  test('xxx', (t) => {
528
526
  const a = stub();
@@ -712,6 +710,22 @@ t.deepEqual(error, expected);
712
710
  t.end();
713
711
  ```
714
712
 
713
+ ## convert-equals-to-equal
714
+
715
+ Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9a428ce99c5ec8966363a7a6da5bbba8/7441cbf7c8429b265259e7d67125fa138d7db19b).
716
+
717
+ ### ❌ Example of incorrect code
718
+
719
+ ```js
720
+ t.equals(e.message, 'token should be a string!', 'should throw');
721
+ ```
722
+
723
+ ### βœ… Example of correct code
724
+
725
+ ```js
726
+ t.equal(e.message, 'token should be a string!', 'should throw');
727
+ ```
728
+
715
729
  ## convert-match-regexp-to-string
716
730
 
717
731
  ### ❌ Example of incorrect code
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ module.exports.report = () => `Use 't.equal()' instead of 't.equals()''`;
4
+
5
+ module.exports.replace = () => ({
6
+ 't.equals(__a, __b, __c)': 't.equal(__a, __b, __c)',
7
+ });
package/lib/index.js CHANGED
@@ -34,6 +34,7 @@ const removeStopAll = require('./remove-stop-all');
34
34
  const removeUselessTEnd = require('./remove-useless-t-end');
35
35
  const removeOnly = require('./remove-only');
36
36
  const removeSkip = require('./remove-skip');
37
+ const convertEqualsToEqual = require('./convert-equals-to-equal');
37
38
 
38
39
  module.exports.rules = {
39
40
  'convert-mock-require-to-mock-import': ['off', convertMockRequireToMockImport],
@@ -58,6 +59,7 @@ module.exports.rules = {
58
59
  'convert-equal-to-deep-equal': convertEqualToDeepEqual,
59
60
  'convert-equal-to-ok': convertEqualToOk,
60
61
  'convert-equal-to-called-once': convertEqualToCalledOnce,
62
+ 'convert-equals-to-equal': convertEqualsToEqual,
61
63
  'convert-deep-equal-to-equal': convertDeepEqualToEqual,
62
64
  'add-args': addArgs,
63
65
  declare,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-tape",
3
- "version": "13.1.0",
3
+ "version": "14.0.1",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps with tests",
@@ -32,10 +32,10 @@
32
32
  ],
33
33
  "devDependencies": {
34
34
  "@putout/plugin-putout": "*",
35
- "@putout/test": "^8.0.0",
36
- "c8": "^8.0.0",
37
- "eslint": "^8.0.1",
38
- "eslint-plugin-n": "^16.0.0",
35
+ "@putout/test": "^9.0.0",
36
+ "c8": "^9.0.0",
37
+ "eslint": "^9.0.0-alpha.0",
38
+ "eslint-plugin-n": "^17.0.0-0",
39
39
  "eslint-plugin-putout": "^22.0.0",
40
40
  "lerna": "^6.0.1",
41
41
  "madrun": "^10.0.0",
@@ -43,7 +43,7 @@
43
43
  "nodemon": "^3.0.1"
44
44
  },
45
45
  "peerDependencies": {
46
- "putout": ">=34"
46
+ "putout": ">=35"
47
47
  },
48
48
  "license": "MIT",
49
49
  "engines": {