eslint-plugin-putout 14.0.0 → 14.0.1
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.
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# add-newline-before-function-call
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This rule aims to add newline before `function call` and `assignment`. Part of [`eslint-plugin-putout`](https://github.com/coderaiser/putout/tree/master/packages/eslint-plugin-putout#rules).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Examples of **incorrect** code for this rule:
|
|
5
|
+
## ❌ Example of incorrect code
|
|
8
6
|
|
|
9
7
|
```js
|
|
10
8
|
export function parse() {
|
|
@@ -18,7 +16,7 @@ export function calc() {
|
|
|
18
16
|
}
|
|
19
17
|
```
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
## ✅ Example of correct code
|
|
22
20
|
|
|
23
21
|
```js
|
|
24
22
|
export function parse() {
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# add-newlines-between-types-in-union
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This rule aims to add newlines between types in union. Part of [`eslint-plugin-putout`](https://github.com/coderaiser/putout/tree/master/packages/eslint-plugin-putout#rules).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Examples of **incorrect** code for this rule:
|
|
5
|
+
## ❌ Example of incorrect code
|
|
8
6
|
|
|
9
7
|
```js
|
|
10
8
|
const a = string | number | object | boolean;
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
## ✅ Example of correct code
|
|
14
12
|
|
|
15
13
|
```js
|
|
16
14
|
const a = string
|
package/lib/putout/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Putout
|
|
1
|
+
# Putout
|
|
2
2
|
|
|
3
|
-
🐊[
|
|
3
|
+
Run 🐊[**Putout**](https://github.com/coderaiser/putout#built-in-transforms) rules from [**ESLint**](https://eslint.org/).
|
|
4
4
|
|
|
5
|
-
And can be [configured](https://eslint.org/docs/user-guide/configuring#configuring-rules) according to [
|
|
5
|
+
And can be [configured](https://eslint.org/docs/user-guide/configuring#configuring-rules) according to [**Putout** configuration](https://github.com/coderaiser/putout#configuration).
|
|
6
6
|
|
|
7
7
|
For example, if you want to disable the rule [remove-unused-variables](https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-unused-variables) you can use:
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-putout",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "eslint plugin for putout",
|
|
6
6
|
"release": false,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@babel/eslint-parser": "^7.15.0",
|
|
39
39
|
"@babel/plugin-syntax-class-properties": "^7.12.1",
|
|
40
40
|
"@babel/traverse": "^7.16.3",
|
|
41
|
-
"@putout/engine-parser": "^
|
|
41
|
+
"@putout/engine-parser": "^5.0.0",
|
|
42
42
|
"@putout/eslint-config": "^6.0.0",
|
|
43
43
|
"@typescript-eslint/eslint-plugin": "^5.5.0",
|
|
44
44
|
"@typescript-eslint/parser": "^5.4.0",
|