flatlint 3.3.0 → 3.5.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 +13 -0
- package/README.md +9 -0
- package/lib/plugins/convert-assert-to-with/index.js +6 -0
- package/lib/plugins.js +2 -0
- package/package.json +5 -5
package/ChangeLog
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
2025.12.10, v3.5.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- ae78398 flatlint: putout v41.0.2
|
|
5
|
+
- 20b567e flatlint: js-tokens v10.0.0
|
|
6
|
+
- a366b3b flatlint: eslint-plugin-putout v29.0.2
|
|
7
|
+
|
|
8
|
+
2025.11.27, v3.4.0
|
|
9
|
+
|
|
10
|
+
feature:
|
|
11
|
+
- c3ac0fc flatlint: convert-assert-to-with: add
|
|
12
|
+
- e3c9370 flatlint: @putout/operator-keyword v3.0.0
|
|
13
|
+
|
|
1
14
|
2025.09.16, v3.3.0
|
|
2
15
|
|
|
3
16
|
feature:
|
package/README.md
CHANGED
|
@@ -37,6 +37,15 @@ npm i flatlint
|
|
|
37
37
|
|
|
38
38
|
</details>
|
|
39
39
|
|
|
40
|
+
<details><summary>convert <code>assert</code> to <code>with</code></summary>
|
|
41
|
+
|
|
42
|
+
```diff
|
|
43
|
+
-import a from 'a' assert {type: 'json'}
|
|
44
|
+
+import a from 'a' with {type: 'json'}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
40
49
|
<details><summary>convert comma to semicolon</summary>
|
|
41
50
|
|
|
42
51
|
```diff
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const report = () => `Use 'with' instead of 'assert'`;
|
|
2
|
+
export const replace = () => ({
|
|
3
|
+
'import __a from "__b" assert {type: "__c"}': 'import __a from "__b" with {type: "__c"}',
|
|
4
|
+
'import {__a} from "__b" assert {type: "__c"}': 'import {__a} from "__b" with {type: "__c"}',
|
|
5
|
+
'import {__a, __d} from "__b" assert {type: "__c"}': 'import {__a, __d} from "__b" with {type: "__c"}',
|
|
6
|
+
});
|
package/lib/plugins.js
CHANGED
|
@@ -8,6 +8,7 @@ import * as addMissingSemicolon from './plugins/add-missing-semicolon/index.js';
|
|
|
8
8
|
import * as addMissingComma from './plugins/add-missing-comma/index.js';
|
|
9
9
|
import * as addConstToExport from './plugins/add-const-to-export/index.js';
|
|
10
10
|
import * as applyImportOrder from './plugins/apply-import-order/index.js';
|
|
11
|
+
import * as convertAssertToWith from './plugins/convert-assert-to-with/index.js';
|
|
11
12
|
import * as convertCommaToSemicolon from './plugins/convert-comma-to-semicolon/index.js';
|
|
12
13
|
import * as convertFromToRequire from './plugins/convert-from-to-require/index.js';
|
|
13
14
|
import * as removeUselessComma from './plugins/remove-useless-comma/index.js';
|
|
@@ -30,6 +31,7 @@ export const plugins = [
|
|
|
30
31
|
['add-missing-quote', addMissingQuote],
|
|
31
32
|
['add-const-to-export', addConstToExport],
|
|
32
33
|
['apply-import-order', applyImportOrder],
|
|
34
|
+
['convert-assert-to-with', convertAssertToWith],
|
|
33
35
|
['convert-comma-to-semicolon', convertCommaToSemicolon],
|
|
34
36
|
['convert-colon-to-comma', convertColonToComma],
|
|
35
37
|
['convert-colon-to-semicolon', convertColonToSemicolon],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flatlint",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "JavaScript tokens-based linter",
|
|
5
5
|
"main": "lib/flatlint.js",
|
|
6
6
|
"type": "module",
|
|
@@ -78,20 +78,20 @@
|
|
|
78
78
|
"license": "MIT",
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@putout/engine-loader": "^16.0.0",
|
|
81
|
-
"@putout/operator-keyword": "^
|
|
81
|
+
"@putout/operator-keyword": "^3.0.0",
|
|
82
82
|
"debug": "^4.4.0",
|
|
83
|
-
"js-tokens": "^
|
|
83
|
+
"js-tokens": "^10.0.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@putout/test": "^14.0.0",
|
|
87
87
|
"c8": "^10.1.2",
|
|
88
88
|
"eslint": "^9.7.0",
|
|
89
|
-
"eslint-plugin-putout": "^
|
|
89
|
+
"eslint-plugin-putout": "^29.0.2",
|
|
90
90
|
"madrun": "^11.0.0",
|
|
91
91
|
"mock-require": "^3.0.3",
|
|
92
92
|
"montag": "^1.0.0",
|
|
93
93
|
"nodemon": "^3.0.1",
|
|
94
|
-
"putout": "^
|
|
94
|
+
"putout": "^41.0.2",
|
|
95
95
|
"supertape": "^11.0.4"
|
|
96
96
|
},
|
|
97
97
|
"engines": {
|