flatlint 1.2.0 → 1.3.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/ChangeLog +10 -0
- package/README.md +12 -3
- package/lib/plugins/remove-useless-round-brace/index.js +9 -0
- package/lib/plugins.js +6 -0
- package/package.json +3 -16
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -28,17 +28,26 @@ npm i flatlint
|
|
|
28
28
|
|
|
29
29
|
</details>
|
|
30
30
|
|
|
31
|
-
<details><summary>forgotten round braces in if statement</summary
|
|
31
|
+
<details><summary>forgotten round braces in if statement</summary>
|
|
32
32
|
|
|
33
|
-
```diff
|
|
33
|
+
```diff
|
|
34
34
|
-if a > 5 {
|
|
35
35
|
+if (a > 5) {
|
|
36
|
-
|
|
36
|
+
alert();
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
</details>
|
|
41
41
|
|
|
42
|
+
<details><summary>remove useless round brace</summary>
|
|
43
|
+
|
|
44
|
+
```diff
|
|
45
|
+
-const a = 5);
|
|
46
|
+
+const a = 5;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
</details>
|
|
50
|
+
|
|
42
51
|
## API
|
|
43
52
|
|
|
44
53
|
```js
|
package/lib/plugins.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import * as wrapAssignmentInParens from './plugins/wrap-assignment-in-parens/index.js';
|
|
2
|
+
import * as addMissingRoundBraces from './plugins/add-missing-round-braces/index.js';
|
|
3
|
+
import * as convertCommaToSemicolon from './plugins/convert-comma-to-semicolon/index.js';
|
|
4
|
+
import * as removeUselessRoundBrace from './plugins/remove-useless-round-brace/index.js';
|
|
2
5
|
|
|
3
6
|
export const plugins = [
|
|
4
7
|
['wrap-assignment-in-parens', wrapAssignmentInParens],
|
|
8
|
+
['add-missing-round-braces', addMissingRoundBraces],
|
|
9
|
+
['convert-comma-to-semicolon', convertCommaToSemicolon],
|
|
10
|
+
['remove-useless-round-brace', removeUselessRoundBrace],
|
|
5
11
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flatlint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "JavaScript tokens-based linter",
|
|
5
5
|
"main": "lib/flatlint.js",
|
|
6
6
|
"type": "module",
|
|
@@ -61,33 +61,20 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@putout/engine-loader": "^15.0.1",
|
|
64
|
-
"@putout/formatter-dump": "^5.0.0",
|
|
65
|
-
"all-object-keys": "^2.0.0",
|
|
66
|
-
"enquirer": "^2.3.6",
|
|
67
|
-
"find-up": "^7.0.0",
|
|
68
|
-
"jessy": "^3.0.0",
|
|
69
64
|
"js-tokens": "^9.0.1",
|
|
70
|
-
"
|
|
71
|
-
"montag": "^1.0.0",
|
|
72
|
-
"once": "^1.4.0",
|
|
73
|
-
"putout": "^37.0.0",
|
|
74
|
-
"try-catch": "^3.0.0",
|
|
75
|
-
"try-to-catch": "^3.0.0",
|
|
76
|
-
"yargs-parser": "^21.0.0"
|
|
65
|
+
"putout": "^37.0.0"
|
|
77
66
|
},
|
|
78
67
|
"devDependencies": {
|
|
68
|
+
"montag": "^1.0.0",
|
|
79
69
|
"@putout/eslint-flat": "^2.0.0",
|
|
80
70
|
"@putout/formatter-json": "^2.0.0",
|
|
81
71
|
"@putout/test": "^11.1.0",
|
|
82
72
|
"c8": "^10.1.2",
|
|
83
|
-
"escover": "^4.0.0",
|
|
84
73
|
"eslint": "^9.7.0",
|
|
85
74
|
"eslint-plugin-putout": "^23.1.0",
|
|
86
75
|
"madrun": "^10.2.2",
|
|
87
|
-
"mock-import": "^4.0.2",
|
|
88
76
|
"mock-require": "^3.0.3",
|
|
89
77
|
"nodemon": "^3.0.1",
|
|
90
|
-
"runsome": "^1.0.0",
|
|
91
78
|
"supertape": "^10.0.0"
|
|
92
79
|
},
|
|
93
80
|
"publishConfig": {
|