Skip to content

Commit

Permalink
feature: @putout/plugin-declare: isArray: move out to @putout/plugin-…
Browse files Browse the repository at this point in the history
…types
  • Loading branch information
coderaiser committed Apr 21, 2024
1 parent 844e20d commit 3b043c3
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 27 deletions.
17 changes: 0 additions & 17 deletions packages/plugin-declare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to declare variable that was not defined before, including:

- is types: `isFn`, `isString`, `isNumber`, `isObject`, `isBool`, `isUndefined`, `isSymbol` and `isNull`;
- [maybe](https://github.com/coderaiser/putout/tree/master/packages/plugin-maybe#readme): `maybeArray`, `maybeFn`, `maybeEmptyArray`;
- wrap: `not`,`id`, `returns`;
- fresh-import: `freshImport`, `freshImportDefault`;
Expand Down Expand Up @@ -57,7 +56,6 @@ Use options:
"parse",
"stringify",
"defineProperty",
"isArray",
"noop",
"join",
"keys",
Expand Down Expand Up @@ -136,21 +134,6 @@ const object = {};
const allValues = values(object);
```

## `isArray`

### ❌ Example of incorrect code

```js
isArray(array);
```

### ✅ Example of correct code

```js
const {isArray} = Array;
isArray(array);
```

## `noop`

### ❌ Example of incorrect code
Expand Down
2 changes: 0 additions & 2 deletions packages/plugin-declare/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ module.exports.declare = () => ({
...wrap,
...freshImport,
...fixtures,
isArray: 'const {isArray} = Array',

parse: 'const {parse} = JSON',
stringify: 'const {stringify} = JSON',

Expand Down
5 changes: 0 additions & 5 deletions packages/plugin-declare/test/declare.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ test('putout: plugin: declare: transform: assign', (t) => {
t.end();
});

test('putout: plugin: declare: transform: is-array', (t) => {
t.transform('is-array');
t.end();
});

test('putout: plugin: declare: transform: keys', (t) => {
t.transform('keys');
t.end();
Expand Down
2 changes: 0 additions & 2 deletions packages/plugin-declare/test/fixture/is-array-fix.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/plugin-declare/test/fixture/is-array.js

This file was deleted.

0 comments on commit 3b043c3

Please sign in to comment.