@putout/plugin-putout 23.5.0 → 23.7.0

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.
@@ -1,13 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  const {types, operator} = require('putout');
4
- const {getBindingPath} = operator;
5
4
  const {
6
- ObjectPattern,
5
+ objectPattern,
7
6
  isIdentifier,
8
- ObjectProperty,
7
+ objectProperty,
9
8
  } = types;
10
9
 
10
+ const {getBindingPath} = operator;
11
+
11
12
  const SHORTHAND = true;
12
13
  const COMPUTED = false;
13
14
 
@@ -18,10 +19,10 @@ module.exports.report = ({node}) => {
18
19
 
19
20
  module.exports.fix = ({path, node}) => {
20
21
  const [first] = path.node.params;
21
- const property = ObjectProperty(node, node, COMPUTED, SHORTHAND);
22
+ const property = objectProperty(node, node, COMPUTED, SHORTHAND);
22
23
 
23
24
  if (isIdentifier(first)) {
24
- path.node.params[0] = ObjectPattern([property]);
25
+ path.node.params[0] = objectPattern([property]);
25
26
  return;
26
27
  }
27
28
 
package/lib/index.js CHANGED
@@ -7,6 +7,7 @@ const applyRemove = require('./apply-remove');
7
7
  const applyInsertBefore = require('./apply-insert-before');
8
8
  const applyInsertAfter = require('./apply-insert-after');
9
9
  const applyDeclare = require('./apply-declare');
10
+ const checkDeclare = require('./check-declare');
10
11
  const checkReplaceCode = require('./check-replace-code');
11
12
  const checkMatch = require('./check-match');
12
13
  const convertPutoutTestToCreateTest = require('./convert-putout-test-to-create-test');
@@ -61,6 +62,7 @@ const applyVars = require('./apply-vars');
61
62
  const declareTemplateVariables = require('./declare-template-variables');
62
63
  const declarePathVariable = require('./declare-path-variable');
63
64
  const applyParens = require('./apply-parens');
65
+ const applyLowercaseToNodeBuilders = require('./apply-lowercase-to-node-builders');
64
66
 
65
67
  module.exports.rules = {
66
68
  'apply-processors-destructuring': applyProcessorsDestructuring,
@@ -70,6 +72,7 @@ module.exports.rules = {
70
72
  'apply-insert-before': applyInsertBefore,
71
73
  'apply-insert-after': applyInsertAfter,
72
74
  'apply-declare': applyDeclare,
75
+ 'check-declare': checkDeclare,
73
76
  'check-replace-code': checkReplaceCode,
74
77
  'check-match': checkMatch,
75
78
  'convert-putout-test-to-create-test': convertPutoutTestToCreateTest,
@@ -124,4 +127,5 @@ module.exports.rules = {
124
127
  'declare-template-variables': declareTemplateVariables,
125
128
  'declare-path-variable': declarePathVariable,
126
129
  'apply-parens': applyParens,
130
+ 'apply-lowercase-to-node-builders': applyLowercaseToNodeBuilders,
127
131
  };
@@ -16,10 +16,10 @@ const TRANSFORM = `
16
16
  `;
17
17
 
18
18
  const {
19
- Identifier,
20
19
  isIdentifier,
21
20
  isObjectExpression,
22
21
  isMemberExpression,
22
+ identifier,
23
23
  } = types;
24
24
 
25
25
  module.exports.report = () => 'Move require on top level';
@@ -65,7 +65,7 @@ function declareRequire({__a, __b}, path) {
65
65
  const name = justCamelCase(shortName);
66
66
 
67
67
  const requireNode = buildRequire({
68
- NAME: Identifier(name),
68
+ NAME: identifier(name),
69
69
  REQUIRE: __b,
70
70
  });
71
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "23.5.0",
3
+ "version": "23.7.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps with plugins development",
@@ -45,12 +45,12 @@
45
45
  "@putout/eslint-flat": "^2.0.0",
46
46
  "@putout/plugin-nodejs": "*",
47
47
  "@putout/plugin-tape": "*",
48
- "@putout/test": "^11.0.0",
48
+ "@putout/test": "^12.0.0",
49
49
  "c8": "^10.0.0",
50
50
  "chalk": "^5.3.0",
51
51
  "eslint": "^9.0.0",
52
52
  "eslint-plugin-n": "^17.0.0",
53
- "eslint-plugin-putout": "^24.0.0",
53
+ "eslint-plugin-putout": "^25.0.1",
54
54
  "madrun": "^10.0.0",
55
55
  "montag": "^1.2.1",
56
56
  "nodemon": "^3.0.1",