Skip to content

Commit 5723a49

Browse files
committed
chore: putout: actions: lint ☘️
1 parent 72e511f commit 5723a49

28 files changed

Lines changed: 104 additions & 103 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ are also supported. Here is how it looks like:
5757
- [🛴 Codemods](#-codemods)
5858
- [⏣ Integration with ESLint](#-integration-with-eslint)
5959
- [☄️ Integration with Babel](#%EF%B8%8F-integration-with-babel)
60-
- [🐈 Integration with Yarn PnP](#-integration-with-yarn-pnp)
60+
- [🐈 Integration with Yarn OnP](#-integration-with-yarn-pnp)
6161
- [⛓ Using Putout as Loader](#-using-putout-as-loader)
6262
- [🚪 Exit Codes](#exit-codes)
6363
- [🦔 Real-world uses](#-real-world-uses)
@@ -2836,7 +2836,7 @@ Just create `.babelrc.json` file with configuration you need.
28362836
}
28372837
```
28382838

2839-
## 🐈 Integration with Yarn PnP
2839+
## 🐈 Integration with Yarn OnP
28402840

28412841
Since 🐊**Putout** has dynamic nature of loading:
28422842

codemods/cut-useless-functions/test/cut-useless-function.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,57 @@ const test = createTest(import.meta.url, {
88
],
99
});
1010

11-
test('cut usless functions: report', (t) => {
11+
test('cut useless functions: report', (t) => {
1212
t.report('block', 'Useless functions should be avoided');
1313
t.end();
1414
});
1515

16-
test('cut usless functions: transform: block', (t) => {
16+
test('cut useless functions: transform: block', (t) => {
1717
t.transform('block');
1818
t.end();
1919
});
2020

21-
test('cut usless functions: transform: fn', (t) => {
21+
test('cut useless functions: transform: fn', (t) => {
2222
t.transform('fn');
2323
t.end();
2424
});
2525

26-
test('cut usless functions: no transform: method', (t) => {
26+
test('cut useless functions: no transform: method', (t) => {
2727
t.noTransform('method');
2828
t.end();
2929
});
3030

31-
test('cut usless functions: no transform: method block', (t) => {
31+
test('cut useless functions: no transform: method block', (t) => {
3232
t.noTransform('method-block');
3333
t.end();
3434
});
3535

36-
test('cut usless functions: no transform: different args', (t) => {
36+
test('cut useless functions: no transform: different args', (t) => {
3737
t.noTransform('different-args');
3838
t.end();
3939
});
4040

41-
test('cut usless functions: transform: curry', (t) => {
41+
test('cut useless functions: transform: curry', (t) => {
4242
t.transform('curry');
4343
t.end();
4444
});
4545

46-
test('cut usless functions: no transform: identifier', (t) => {
46+
test('cut useless functions: no transform: identifier', (t) => {
4747
t.noTransform('identifier');
4848
t.end();
4949
});
5050

51-
test('cut usless functions: no transform: identifier: block', (t) => {
51+
test('cut useless functions: no transform: identifier: block', (t) => {
5252
t.noTransform('identifier-block');
5353
t.end();
5454
});
5555

56-
test('cut usless functions: no transform: regexp', (t) => {
56+
test('cut useless functions: no transform: regexp', (t) => {
5757
t.noTransform('regexp');
5858
t.end();
5959
});
6060

61-
test('cut usless functions: transform: call', (t) => {
61+
test('cut useless functions: transform: call', (t) => {
6262
t.transform('call');
6363
t.end();
6464
});

docs/putout-script.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ In that case you can use `__` in place of the name of the function to match name
8181
function say(a) {
8282
return 'hello 🐊';
8383
}
84+
8485
const talk = function(a) {
8586
return 'hello 🐊';
8687
};
@@ -196,10 +197,10 @@ Template variables look like `__a`, `__b`, etc. They begin with a `__` and can o
196197
Template variable `__imports` can be used to match imports. For example, `import __imports` matches:
197198

198199
```js
199-
import fs from 'fs/promises';
200+
import fs from 'node:fs/promises';
200201
```
201202

202-
## Reoccuring template variable
203+
## Reoccurring template variable
203204

204205
Re-using template variables shows their true power. Detect assignment of sum of duplicate nodes:
205206

docs/syntax-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ readFile('./hello.js', 'utf8');
122122

123123
</details>
124124

125-
<details><summary>remove illigal<code>strict-mode</code></summary>
125+
<details><summary>remove illegal<code>strict-mode</code></summary>
126126

127127
```diff
128128
function x1(...a) {

docs/the-book-of-ast.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ But the most interesting thing is **const**, because it is a [**Statement**](#ex
142142
friend.
143143

144144
```js
145-
if (fruit === '🍎') // 🌳(🍎)
146-
eat('🍎'); // 🦏 ❤️ 🍎
145+
if (fruit === '🍎')
146+
// 🌳(🍎)
147+
eat('🍎');
148+
// 🦏 ❤️ 🍎
147149
```
148150

149151
"An apple can grow on a branch, but branch cannot grow on apple, the same goes to **Expressions** and **Statements**", continued 🐊**Putout**.
@@ -158,7 +160,6 @@ if (fruit === '🍎') // 🌳(🍎)
158160

159161
```ts
160162
type ArrayExpression = (elements: null[] | Expression[] | SpreadElement[]) => Node;
161-
162163
type ArrayPattern = (elements: null[] | PatternLike[]) => Node;
163164
```
164165

@@ -194,7 +195,6 @@ const [owl] = birds;
194195

195196
```ts
196197
type ObjectExpression = (properties: ObjectMethod[] | ObjectProperty[] | SpreadElement[]) => Node;
197-
198198
type ObjectPattern = (properties: RestElement[] | ObjectProperty[]) => Node;
199199
```
200200

@@ -254,8 +254,7 @@ say(...[
254254
'🥕',
255255
]);
256256

257-
function say(...vegatables) {
258-
}
257+
function say(...vegatables) {}
259258
```
260259

261260
"Tell me please something about it!".

packages/cli-validate-args/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "2.0.0",
44
"type": "module",
55
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6-
"description": "validate args, sugest closest variant",
6+
"description": "validate args, suggest closest variant",
77
"homepage": "https://github.com/coderaiser/putout/tree/master/packages/cli-validate-args#readme",
88
"main": "lib/validate-args.js",
99
"release": false,

packages/engine-loader/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ So when someone using your plugin, he needs to enable it:
5353

5454
## Env Variables
5555

56-
When you need to get things working with Yarn PnP, and using custom `plugins` `formatters` or `processors`, add env variable
56+
When you need to get things working with Yarn OnP, and using custom `plugins` `formatters` or `processors`, add env variable
5757
`PUTOUT_YARN_PNP` with name of a package that contains dependencies you need.
5858

5959
## API

packages/engine-loader/lib/load/load.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {stopAll, reRequire} = mockRequire;
99

1010
const {assign} = Object;
1111

12-
test('putout: engine-loader: load: yarn PnP support', (t) => {
12+
test('putout: engine-loader: load: yarn OnP support', (t) => {
1313
const customRequire = stub().returns('plugin');
1414

1515
assign(customRequire, {

packages/engine-runner/test/traverse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ test('putout: runner: uplist: removed node', async (t) => {
339339
`;
340340

341341
const remove = 'remove-unreferenced-variables';
342-
const merge = ['merge-variabels', mergeVariables];
342+
const merge = ['merge-variables', mergeVariables];
343343

344344
const plugins = [remove, merge];
345345

packages/operate/lib/properties/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const {
44
isObjectExpression,
55
isObjectPattern,
66
} = require('@putout/babel').types;
7+
78
const {extract} = require('../extract');
89
const {traverseProperties} = require('./traverse-properties');
910

0 commit comments

Comments
 (0)