@putout/operator-ignore 5.0.0 → 6.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
@@ -13,18 +13,16 @@ npm i putout @putout/operator-ignore
13
13
 
14
14
  ## API
15
15
 
16
- ### `__ignore`
16
+ ### `ignore`
17
17
 
18
18
  ```js
19
19
  import {operator, ignore} from 'putout';
20
20
 
21
- const {__ignore} = operator;
22
-
23
21
  export const {
24
22
  report,
25
23
  match,
26
24
  replace,
27
- } = ignore(__ignore, {
25
+ } = ignore({
28
26
  name: '.npmignore',
29
27
  field: 'exclude',
30
28
  list: [
@@ -36,18 +34,19 @@ export const {
36
34
  });
37
35
  ```
38
36
 
39
- ### `__json`
37
+ ### `type`
40
38
 
41
39
  ```js
42
40
  import {operator, ignore} from 'putout';
43
41
 
44
- const {__ignore, __json} = operator;
42
+ const {__json} = operator;
45
43
 
46
44
  export const {
47
45
  report,
48
46
  match,
49
47
  replace,
50
- } = ignore(__json, {
48
+ } = ignore({
49
+ type: __json,
51
50
  name: '.nycrc.json',
52
51
  field: 'exclude',
53
52
  list: ['*.config.*'],
package/lib/ignore.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import {types} from '@putout/babel';
2
2
  import {traverseProperties} from '@putout/operate';
3
+ import {__ignore} from '@putout/operator-json';
3
4
 
4
5
  const {stringLiteral} = types;
5
6
  const getValue = ({value}) => value;
6
7
 
7
- export const ignore = (type, {name, property, list}) => {
8
+ export const ignore = ({name, property, list, type = __ignore}) => {
8
9
  const [, collector] = type.split(/[()]/);
9
10
 
10
11
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/operator-ignore",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout operator adds ability to ignore referenced variables that was not defined",
@@ -30,17 +30,17 @@
30
30
  "ignore"
31
31
  ],
32
32
  "devDependencies": {
33
- "@putout/eslint-flat": "^3.0.0",
33
+ "@putout/eslint-flat": "^4.0.0",
34
34
  "@putout/test": "^15.0.0",
35
35
  "c8": "^10.0.0",
36
- "eslint": "^10.0.0-alpha.0",
36
+ "eslint": "^10.0.0",
37
37
  "eslint-plugin-n": "^17.0.0",
38
- "eslint-plugin-putout": "^29.0.0",
38
+ "eslint-plugin-putout": "^30.0.0",
39
39
  "madrun": "^12.0.0",
40
40
  "montag": "^1.2.1",
41
41
  "nodemon": "^3.0.1",
42
42
  "putout": "*",
43
- "supertape": "^11.0.3"
43
+ "supertape": "^12.0.0"
44
44
  },
45
45
  "license": "MIT",
46
46
  "engines": {
@@ -54,6 +54,7 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@putout/babel": "^5.0.0",
57
- "@putout/operate": "^15.0.0"
57
+ "@putout/operate": "^15.0.0",
58
+ "@putout/operator-json": "^3.2.0"
58
59
  }
59
60
  }