Skip to content

Commit f141e6e

Browse files
committed
docs(putout) Putout -> **Putout**
1 parent 599d798 commit f141e6e

129 files changed

Lines changed: 173 additions & 173 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module.exports.replace = () => ({
9595

9696
## 🚚 Installation
9797

98-
To install 🐊`Putout` as a development dependency, run:
98+
To install 🐊**Putout** as a development dependency, run:
9999

100100
```
101101
npm i putout -D
@@ -109,7 +109,7 @@ Make sure that you are running a relatively recent (≥16) version of Node.
109109
>
110110
> **(c) Antoine de Saint-Exupéry**
111111
112-
🐊`Putout` tries to be clear and likes a lot to explain things. So when you write `putout --help` most likely you will hear gladly purr :
112+
🐊**Putout** tries to be clear and likes a lot to explain things. So when you write `putout --help` most likely you will hear gladly purr :
113113

114114
```
115115
Usage: putout [options] [path]
@@ -155,10 +155,10 @@ npx putout lib test --fix
155155

156156
### Environment variables
157157

158-
🐊`Putout` supports the following environment variables:
158+
🐊**Putout** supports the following environment variables:
159159

160-
- `PUTOUT_CONFIG_FILE` - path to 🐊`Putout` config file;
161-
- `PUTOUT_FILES` - files that should be processed by 🐊`Putout`, divided by ",";
160+
- `PUTOUT_CONFIG_FILE` - path to 🐊**Putout** config file;
161+
- `PUTOUT_FILES` - files that should be processed by 🐊**Putout**, divided by ",";
162162

163163
Example:
164164

@@ -170,9 +170,9 @@ PUTOUT_FILES=lib,test putout --fix
170170

171171
When you need to change `.putout.json` you can do it not only editing the file, but also with help of `Ruler`.
172172

173-
`Ruler` can `enable` one rule with `putout --enable [rule]` or `disable` all rules 🐊`Putout` able to find using `putout --disable-all`.
173+
`Ruler` can `enable` one rule with `putout --enable [rule]` or `disable` all rules 🐊**Putout** able to find using `putout --disable-all`.
174174

175-
*☝️Remember, `Ruler` should never be used with `--fix`, because unclear things makes 🐊 `Putout` angry and you can find him barking at you:*
175+
*☝️Remember, `Ruler` should never be used with `--fix`, because unclear things makes 🐊 **Putout** angry and you can find him barking at you:*
176176

177177
```
178178
🐊 `--fix` cannot be used with ruler toggler (`--enable`, `--disable`)
@@ -301,7 +301,7 @@ Happy coding 🎈!
301301

302302
## 🏛 Architecture
303303

304-
`Putout` consists of a couple simple parts, here is a workflow representation:
304+
**Putout** consists of a couple simple parts, here is a workflow representation:
305305

306306
![putout](https://github.com/coderaiser/putout/blob/master/images/putout.png)
307307

@@ -325,7 +325,7 @@ And here is a CLI scheme:
325325
326326
![Ashvattha](https://github.com/coderaiser/putout/blob/master/images/ashvattha.jpeg)
327327

328-
On the bottom level of 🐊`Putout` layes down `Syntax Tree`. This is data structure that makes possible to do [crazy transformations in a simplest possible way](https://dev.to/viveknayyar/revealing-the-magic-of-ast-by-writing-babel-plugins-1h01). It used mostly in compilers development.
328+
On the bottom level of 🐊**Putout** layes down `Syntax Tree`. This is data structure that makes possible to do [crazy transformations in a simplest possible way](https://dev.to/viveknayyar/revealing-the-magic-of-ast-by-writing-babel-plugins-1h01). It used mostly in compilers development.
329329

330330
You can read about it in [Babel Plugin Handbook](https://github.com/jamiebuilds/babel-handbook/blob/master/translations/en/plugin-handbook.md). To understand how things works from the inside take a look at [Super Tiny Compiler](https://github.com/jamiebuilds/the-super-tiny-compiler).
331331

@@ -362,7 +362,7 @@ It looks this way in [ESTree](https://github.com/estree/estree) JavaScript synta
362362
>
363363
> **(c) Yamamoto Tsunetomo "Hagakure"**
364364
365-
🐊`Putout` based on [Babel AST](https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md). It has a couple differences from `ESTree` which are perfectly handled by [estree-to-babel](https://github.com/coderaiser/estree-to-babel) especially when 🐊`Putout` running as [a plugin for `ESLint`](#integration-with-eslint).
365+
🐊**Putout** based on [Babel AST](https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md). It has a couple differences from `ESTree` which are perfectly handled by [estree-to-babel](https://github.com/coderaiser/estree-to-babel) especially when 🐊**Putout** running as [a plugin for `ESLint`](#integration-with-eslint).
366366

367367
### 🌴 Laws of the Jungle
368368

@@ -384,7 +384,7 @@ It looks this way in [ESTree](https://github.com/estree/estree) JavaScript synta
384384

385385
### Processors
386386

387-
With help of [processors](https://github.com/coderaiser/putout/blob/master/packages/engine-processor) 🐊`Putout` can be extended to read any file format and parse `JavaScript` from there.
387+
With help of [processors](https://github.com/coderaiser/putout/blob/master/packages/engine-processor) 🐊**Putout** can be extended to read any file format and parse `JavaScript` from there.
388388

389389
Here is a list of built-int processors:
390390

@@ -484,7 +484,7 @@ As you see, `places` is empty, but the code is changed: there is no `hi` variabl
484484

485485
#### No fix
486486

487-
From the beginning, 🐊`Putout` developed with ability to split the main process into two concepts: `find` (find places that could be fixed) and `fix` (apply the fixes to the files).
487+
From the beginning, 🐊**Putout** developed with ability to split the main process into two concepts: `find` (find places that could be fixed) and `fix` (apply the fixes to the files).
488488
It is therefore easy to find sections that could be fixed.
489489
In the following example reduntand variables are found without making changes to the source file:
490490

@@ -1904,7 +1904,7 @@ ESLINT_FORMATTER=pretty putout -f eslint lib
19041904

19051905
## 🦉 Configuration
19061906

1907-
To configure 🐊`Putout` add section `putout` to your `package.json` file or create `.putout.json` file and override any of [default options](/packages/putout/putout.json).
1907+
To configure 🐊**Putout** add section `putout` to your `package.json` file or create `.putout.json` file and override any of [default options](/packages/putout/putout.json).
19081908

19091909
### Rules
19101910

@@ -1979,7 +1979,7 @@ When you need to ignore some routes no matter what, you can use `ignore` section
19791979

19801980
### Plugins
19811981

1982-
There are two types of plugin names supported by 🐊`Putout`, their names in npm start with a prefix:
1982+
There are two types of plugin names supported by 🐊**Putout**, their names in npm start with a prefix:
19831983

19841984
- `@putout/plugin-` for official plugins
19851985
- `putout-plugin-` for user plugins
@@ -2005,15 +2005,15 @@ Add `putout` as a `peerDependency` to your `packages.json` (>= of version you de
20052005
>
20062006
> **(c) Yamamoto Tsunetomo "Hagakure"**
20072007
2008-
🐊`Putout` plugins are the simplest possible way to transform `AST` and this is for a reason.
2008+
🐊**Putout** plugins are the simplest possible way to transform `AST` and this is for a reason.
20092009

20102010
And the reason is `JavaScript`-compatible language 🦎[`PutoutScript`](https://github.com/coderaiser/putout/blob/master/docs/putout-script.md#-putoutscript) which adds additional meaning to identifiers used in `AST`-template.
20112011

20122012
Let's dive into plugin types that you can use for you next code transformation.
20132013

20142014
### Replacer
20152015

2016-
The simplest 🐊`Putout` plugin type, consits of 2 functions:
2016+
The simplest 🐊**Putout** plugin type, consits of 2 functions:
20172017

20182018
- `report` - report error message to `putout` cli;
20192019
- `replace` - replace `key` template into `value` template;
@@ -2188,7 +2188,7 @@ To see a more sophisticated example look at [@putout/remove-console](https://git
21882188

21892189
### 🤷‍♂️ What if I don't want to publish a plugin?
21902190

2191-
If you don't want to publish a `plugin` you developed, you can pass it to 🐊`Putout` as an `object` described earler. Here is [how it can look like](https://github.com/coderaiser/mock-import/blob/v1.0.8/lib/convert-imports/index.js#L19-L33):
2191+
If you don't want to publish a `plugin` you developed, you can pass it to 🐊**Putout** as an `object` described earler. Here is [how it can look like](https://github.com/coderaiser/mock-import/blob/v1.0.8/lib/convert-imports/index.js#L19-L33):
21922192

21932193
```js
21942194
putout('const a = 5', {
@@ -2241,9 +2241,9 @@ coderaiser@cloudcmd:~$ cat a.js
22412241
const t = [1, 2];
22422242
```
22432243

2244-
Using 🐊`Putout` as a runner for `babel` `plugins` you can not only change file content, but also see what exactly will be changed. You can use your already written `babel` `plugins` or reuse work in progress plugins made for `babel`,
2244+
Using 🐊**Putout** as a runner for `babel` `plugins` you can not only change file content, but also see what exactly will be changed. You can use your already written `babel` `plugins` or reuse work in progress plugins made for `babel`,
22452245

2246-
☝️ *Remember 🐊`Putout` `plugins` gave more accurate information about changing places, and works faster (no need to find information about changes in transformed file).*
2246+
☝️ *Remember 🐊**Putout** `plugins` gave more accurate information about changing places, and works faster (no need to find information about changes in transformed file).*
22472247

22482248
### Babel plugins list
22492249

@@ -2317,11 +2317,11 @@ putout --rulesdir ./rules
23172317

23182318
This way you can keep rules specific for your project and run them on each lint.
23192319

2320-
☝️ *Remember: if you want to exclude file from loading, add prefix `not-rule-` and 🐊`Putout` will ignore it (in the same way as he does for `node_modules`).*
2320+
☝️ *Remember: if you want to exclude file from loading, add prefix `not-rule-` and 🐊**Putout** will ignore it (in the same way as he does for `node_modules`).*
23212321

23222322
## 🦕 Integration with ESLint
23232323

2324-
If you see that 🐊`Putout` brokes formatting of your code, use eslint plugin [eslint-plugin-putout](https://github.com/coderaiser/putout/tree/master/packages/eslint-plugin-putout#eslint-plugin-putout--).
2324+
If you see that 🐊**Putout** brokes formatting of your code, use eslint plugin [eslint-plugin-putout](https://github.com/coderaiser/putout/tree/master/packages/eslint-plugin-putout#eslint-plugin-putout--).
23252325

23262326
Install `eslint-plugin-putout` with:
23272327

@@ -2342,7 +2342,7 @@ Then create `.eslintrc.json`:
23422342
}
23432343
```
23442344

2345-
And use with 🐊`Putout` this way:
2345+
And use with 🐊**Putout** this way:
23462346

23472347
```sh
23482348
putout --fix lib
@@ -2360,11 +2360,11 @@ You can even use only `ESlint`, because `putout` bundled to `eslint-plugin-putou
23602360
eslint --fix lib
23612361
```
23622362

2363-
Applies 🐊`Putout` transformations for you :).
2363+
Applies 🐊**Putout** transformations for you :).
23642364

23652365
### `ESLint` API
23662366

2367-
`ESLint` begins his work as a formatter when 🐊`Putout` done his transformations. That's why it used a lot in different parts of application, for testing purpose and using `API` in a simplest possible way. You can access it with:
2367+
`ESLint` begins his work as a formatter when 🐊**Putout** done his transformations. That's why it used a lot in different parts of application, for testing purpose and using `API` in a simplest possible way. You can access it with:
23682368

23692369
```js
23702370
import {eslint} from 'putout/eslint';
@@ -2380,9 +2380,9 @@ const [source, places] = await eslint({
23802380
});
23812381
```
23822382

2383-
Isn't it looks similar to 🐊`Putout` way? It definitely is! But... It has a couple differences you should remember:
2383+
Isn't it looks similar to 🐊**Putout** way? It definitely is! But... It has a couple differences you should remember:
23842384

2385-
- ☝️ *[🐊`Putout` returns object with `code` and `places` properties](https://github.com/coderaiser/putout#plugins).*
2385+
- ☝️ *[🐊**Putout** returns object with `code` and `places` properties](https://github.com/coderaiser/putout#plugins).*
23862386
- ☝️ *`ESLint` has a `name` property that is used to calculate configuration file.*
23872387

23882388
And you can even override any of ESLint ⚙️ options with help of `config` property:
@@ -2400,7 +2400,7 @@ const [source, places] = await eslint({
24002400
});
24012401
```
24022402

2403-
If you want to apply 🐊`Putout` transformations using `putout/putout` `ESLint` rule, enable `putout` with the same called flag:
2403+
If you want to apply 🐊**Putout** transformations using `putout/putout` `ESLint` rule, enable `putout` with the same called flag:
24042404

24052405
```js
24062406
const [source, places] = await eslint({
@@ -2416,13 +2416,13 @@ const [source, places] = await eslint({
24162416
});
24172417
```
24182418

2419-
It is disabled by default, because `ESLint` always runs after 🐊`Putout` transformations, so there is no need to traverse tree again.
2419+
It is disabled by default, because `ESLint` always runs after 🐊**Putout** transformations, so there is no need to traverse tree again.
24202420

24212421
This `API` doesn't suppose to came in 🌴 Public Space, anyways it is already used in [`eslint-plugin-putout`](https://github.com/coderaiser/putout/tree/master/packages/eslint-plugin-putout) to [test plugins](https://github.com/coderaiser/putout/blob/master/packages/eslint-plugin-putout/test/test-lint.mjs#L24-L28), so why not :)? Anyways it's signature didn't changed from the beginning.
24222422

24232423
## ☄️ Integration with Babel
24242424

2425-
🐊 `Putout` can be used as [babel plugin](/packages/babel-plugin-putout).
2425+
🐊 **Putout** can be used as [babel plugin](/packages/babel-plugin-putout).
24262426
Just create `.babelrc.json` file with configuration you need.
24272427

24282428
```json
@@ -2439,7 +2439,7 @@ Just create `.babelrc.json` file with configuration you need.
24392439

24402440
## 🐈 Integration with Yarn PnP
24412441

2442-
Since 🐊`Putout` has dynamic nature of loading:
2442+
Since 🐊**Putout** has dynamic nature of loading:
24432443

24442444
- `plugins`;
24452445
- `processors`;
@@ -2456,7 +2456,7 @@ PUTOUT_YARN_PNP=eslint-config-hardcore eslint .
24562456

24572457
## ⛓ Using Putout as Loader
24582458

2459-
🐊`Putout` can be used as [loader](https://nodejs.org/dist/latest-v17.x/docs/api/esm.html#loaders) this way:
2459+
🐊**Putout** can be used as [loader](https://nodejs.org/dist/latest-v17.x/docs/api/esm.html#loaders) this way:
24602460

24612461
```sh
24622462
node --no-deprecation --loader putout your-file.js
@@ -2474,7 +2474,7 @@ You can also transform input files using `Babel`. For example if you need to tra
24742474

24752475
## 🚪Exit Codes
24762476

2477-
🐊`Putout` can have one of next [exit codes](https://github.com/coderaiser/putout/blob/master/packages/putout/lib/cli/exit-codes.mjs):
2477+
🐊**Putout** can have one of next [exit codes](https://github.com/coderaiser/putout/blob/master/packages/putout/lib/cli/exit-codes.mjs):
24782478

24792479
| Code | Name | Description | Example|
24802480
|------|------|-----------------|-------------|
@@ -2526,7 +2526,7 @@ Do you use `putout` in your application as well? Please open a Pull Request to i
25262526

25272527
## 📻 Versioning Policy
25282528

2529-
`Putout` follows semantic versioning ([semver](https://semver.org)) principles, with version numbers being on the format **major**.**minor**.**patch**:
2529+
**Putout** follows semantic versioning ([semver](https://semver.org)) principles, with version numbers being on the format **major**.**minor**.**patch**:
25302530

25312531
- **patch**: `bug fix`, `dependency update` (`17.0.0 -> 17.0.1`).
25322532
- **minor**: `new features`, `new rules` or `fixes` (`17.0.0 -> 17.1.0`).
@@ -2536,7 +2536,7 @@ Do you use `putout` in your application as well? Please open a Pull Request to i
25362536

25372537
You can contribute by proposing a feature, fixing a bug or a typo in the documentation.
25382538
If you wish to play with code 🔥, [you can](https://github.com/coderaiser/putout/blob/master/CONTRIBUTING.md) 💪!
2539-
🐊 `Putout` rejoice and wag its tail when see new contributions 👾.
2539+
🐊 **Putout** rejoice and wag its tail when see new contributions 👾.
25402540

25412541
## 🍄 License
25422542

codemods/apply-filter-boolean/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-filter-boolean.svg?style=flat&longCache=true
44
[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-filter-boolean "npm"
55

6-
🐊[`Putout`](https://github.com/coderaiser/putout) plugin adds ability to apply `filter(Boolean)`. Better use [@putout/plugin-remove-useless-functions](https://github.com/coderaiser/putout/tree/v21.6.0/packages/plugin-remove-useless-functions).
6+
🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to apply `filter(Boolean)`. Better use [@putout/plugin-remove-useless-functions](https://github.com/coderaiser/putout/tree/v21.6.0/packages/plugin-remove-useless-functions).
77

88
## Install
99

codemods/apply-replace-all/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-replace-all.svg?style=flat&longCache=true
44
[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-replace-all "npm"
55

6-
🐊[`Putout`](https://github.com/coderaiser/putout) plugin adds ability to find and remove `useless functions`.
6+
🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and remove `useless functions`.
77

88
## Install
99

codemods/convert-any-to-primitive/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-any-to-primitive.svg?style=flat&longCache=true
44
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-any-to-primitive "npm"
55

6-
🐊[`Putout`](https://github.com/coderaiser/putout) plugin adds ability to convert `any` to primitive.
6+
🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `any` to primitive.
77
Moved to [`@putout/plugin-typescript`](https://github.com/coderaiser/putout/tree/v24.0.2/packages/plugin-typescript).
88

99
## Install

codemods/cut-useless-functions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-useless-functions.svg?style=flat&longCache=true
44
[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-useless-functions "npm"
55

6-
🐊[`Putout`](https://github.com/coderaiser/putout) plugin adds ability to find and remove `useless functions`.
6+
🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and remove `useless functions`.
77

88
## Install
99

codemods/madrun/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-madrun.svg?style=flat&longCache=true
44
[NPMURL]: https://npmjs.org/package/@putout/plugin-madrun"npm"
55

6-
🐊[`Putout`](https://github.com/coderaiser/putout) plugin adds ability to fix issues with [madrun](https://github.com/coderaiser/madrun) config file.
6+
🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to fix issues with [madrun](https://github.com/coderaiser/madrun) config file.
77

88
Contains old transformations, need have more examples and tests for `putout`.
99

packages/engine-loader/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/engine-loader.svg?style=flat&longCache=true
44
[NPMURL]: https://npmjs.org/package/@putout/engine-loader"npm"
55

6-
Load 🐊[`Putout`](https://github.com/coderaiser/putout) `Plugins` and `Processors`.
6+
Load 🐊[**Putout**](https://github.com/coderaiser/putout) `Plugins` and `Processors`.
77

88
## Install
99

packages/engine-parser/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/engine-parser.svg?style=flat&longCache=true
44
[NPMURL]: https://npmjs.org/package/@putout/engine-parser"npm"
55

6-
🐊[`Putout`](https://github.com/coderaiser/putout) engine that parses input.
6+
🐊[**Putout**](https://github.com/coderaiser/putout) engine that parses input.
77

88
## Install
99

packages/engine-processor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/engine-loader.svg?style=flat&longCache=true
44
[NPMURL]: https://npmjs.org/package/@putout/engine-loader"npm"
55

6-
🐊[`Putout`](https://github.com/coderaiser/putout) processor that runns all engines according to supported file types.
6+
🐊[**Putout**](https://github.com/coderaiser/putout) processor that runns all engines according to supported file types.
77

88
```
99
npm i @putout/engine-processor

packages/engine-processor/test/processor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ test('putout: engine-processor: markdown: no fix: return processed places', asyn
235235
//
236236
// Which is hard to maintain.
237237
// So we should choose between "robotic" format 🤖 and change file with no errors found but
238-
// easy to maintain plugins similar to ones 🐊`Putout` has.
238+
// easy to maintain plugins similar to ones 🐊**Putout** has.
239239
// Or hard to maitain one big blob of processing with one message but change only on --fix.
240240
test('putout: engine-processor: markdown: no places no fix', async (t) => {
241241
const name = join(__dirname, 'fixture', 'no-places-no-change.md');

0 commit comments

Comments
 (0)