@putout/plugin-printer 3.1.0 → 4.0.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.
package/README.md CHANGED
@@ -20,6 +20,7 @@ npm i @putout/plugin-printer -D
20
20
  "printer/apply-breakline": "on",
21
21
  "printer/apply-linebreak": "on",
22
22
  "printer/apply-computed-print": "on",
23
+ "printer/declare": "on",
23
24
  "printer/remove-args": "on"
24
25
  }
25
26
  }
@@ -95,6 +96,23 @@ print.indent(is);
95
96
  print.indent();
96
97
  ```
97
98
 
99
+ ## declare
100
+
101
+ ### ❌ Example of incorrect code
102
+
103
+ ```js
104
+ isIdentifier();
105
+ ```
106
+
107
+ ### ✅ Example of correct code
108
+
109
+ ```js
110
+ const {types} = require('@putout/babel');
111
+ const {isIdentifier} = types;
112
+
113
+ isIdentifier();
114
+ ```
115
+
98
116
  ## License
99
117
 
100
118
  MIT
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ const types = require('@putout/plugin-putout/declare/types');
4
+
5
+ module.exports.declare = () => ({
6
+ types: `import {types} from '@putout/babel'`,
7
+ ...types,
8
+ });
package/lib/index.js CHANGED
@@ -5,6 +5,7 @@ const applyBreakline = require('./apply-breakline');
5
5
  const applyLinebreak = require('./apply-linebreak');
6
6
  const applyComputedPrint = require('./apply-computed-print');
7
7
  const addArgs = require('./add-args');
8
+ const declare = require('./declare');
8
9
 
9
10
  module.exports.rules = {
10
11
  'remove-args': removeArgs,
@@ -12,4 +13,5 @@ module.exports.rules = {
12
13
  'apply-linebreak': applyLinebreak,
13
14
  'apply-computed-print': applyComputedPrint,
14
15
  'add-args': addArgs,
16
+ declare,
15
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-printer",
3
- "version": "3.1.0",
3
+ "version": "4.0.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin adds support of transformations for @putout/printer",
@@ -11,7 +11,7 @@
11
11
  "changelog": false,
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "git://github.com/coderaiser/printer.git"
14
+ "url": "git+https://github.com/coderaiser/printer.git"
15
15
  },
16
16
  "scripts": {
17
17
  "wisdom": "madrun wisdom",
@@ -24,7 +24,9 @@
24
24
  "coverage": "madrun coverage",
25
25
  "report": "madrun report"
26
26
  },
27
- "dependencies": {},
27
+ "dependencies": {
28
+ "@putout/plugin-putout": "*"
29
+ },
28
30
  "keywords": [
29
31
  "putout-plugin",
30
32
  "putout",
@@ -33,22 +35,22 @@
33
35
  ],
34
36
  "devDependencies": {
35
37
  "@putout/plugin-for-of": "*",
36
- "@putout/test": "^7.0.0",
37
- "c8": "^8.0.0",
38
- "eslint": "^8.0.1",
39
- "eslint-plugin-n": "^16.0.0",
40
- "eslint-plugin-putout": "^20.0.0",
38
+ "@putout/test": "^11.0.0",
39
+ "c8": "^10.0.0",
40
+ "eslint": "^9.0.0",
41
+ "eslint-plugin-n": "^17.0.0",
42
+ "eslint-plugin-putout": "^23.0.0",
41
43
  "lerna": "^6.0.1",
42
- "madrun": "^9.0.0",
44
+ "madrun": "^10.0.0",
43
45
  "montag": "^1.2.1",
44
46
  "nodemon": "^3.0.1"
45
47
  },
46
48
  "peerDependencies": {
47
- "putout": ">=32"
49
+ "putout": ">=37"
48
50
  },
49
51
  "license": "MIT",
50
52
  "engines": {
51
- "node": ">=16"
53
+ "node": ">=18"
52
54
  },
53
55
  "publishConfig": {
54
56
  "access": "public"