flatlint 2.14.1 → 3.1.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 CHANGED
@@ -1,3 +1,20 @@
1
+ 2025.04.21, v3.1.0
2
+
3
+ feature:
4
+ - 99bf0ac flatlint: convert-colon-to-comma: add
5
+ - 83c0310 flatlint: putout v40.0.10
6
+ - 3599fea flatlint: convert-comma-to-semicolon: array-colon: false positive
7
+
8
+ 2025.03.28, v3.0.0
9
+
10
+ feature:
11
+ - 7e4ae06 flatlint: drop support of node < 20
12
+ - 5e7e24d flatlint: supertape v11.0.4
13
+ - 04fd6b1 flatlint: putout v39.3.0
14
+ - f2e31d6 flatlint: madrun v11.0.0
15
+ - 597f18b flatlint: eslint-plugin-putout v26.1.0
16
+ - 0e57f96 flatlint: @putout/test v13.0.0
17
+
1
18
  2025.03.18, v2.14.1
2
19
 
3
20
  feature:
package/README.md CHANGED
@@ -67,6 +67,17 @@ module.exports = 2;
67
67
 
68
68
  </details>
69
69
 
70
+ <details><summary>convert colon to comma</summary>
71
+
72
+ ```diff
73
+ export const rules = [
74
+ - ['apply-nesting': applyNesting],
75
+ + ['apply-nesting', applyNesting],
76
+ ];
77
+ ```
78
+
79
+ </details>
80
+
70
81
  <details><summary>convert <code>from</code> to <code>require</code></summary>
71
82
 
72
83
  ```diff
@@ -0,0 +1,4 @@
1
+ export const report = () => `Use ',' instead of ':'`;
2
+ export const replace = () => ({
3
+ '["__a": __b]': '["__a", __b]',
4
+ });
@@ -79,6 +79,11 @@ export const match = () => ({
79
79
  result = true;
80
80
  break;
81
81
  }
82
+
83
+ if (isPunctuator(token, openSquireBrace)) {
84
+ result = false;
85
+ break;
86
+ }
82
87
  }
83
88
 
84
89
  return result;
package/lib/plugins.js CHANGED
@@ -15,6 +15,8 @@ import * as removeUselessDot from './plugins/remove-useless-dot/index.js';
15
15
  import * as removeInvalidCharacter from './plugins/remove-invalid-character/index.js';
16
16
  import * as removeUselessRoundBrace from './plugins/remove-useless-round-brace/index.js';
17
17
  import * as convertSemicolonToComma from './plugins/convert-semicolon-to-comma/index.js';
18
+ import * as convertColonToComma from './plugins/convert-colon-to-comma/index.js';
19
+ import * as convertColonToSemicolon from './plugins/convert-colon-to-semicolon/index.js';
18
20
  import * as wrapAssignmentInParens from './plugins/wrap-assignment-in-parens/index.js';
19
21
 
20
22
  export const plugins = [
@@ -29,6 +31,8 @@ export const plugins = [
29
31
  ['add-const-to-export', addConstToExport],
30
32
  ['apply-import-order', applyImportOrder],
31
33
  ['convert-comma-to-semicolon', convertCommaToSemicolon],
34
+ ['convert-colon-to-comma', convertColonToComma],
35
+ ['convert-colon-to-semicolon', convertColonToSemicolon],
32
36
  ['convert-semicolon-to-comma', convertSemicolonToComma],
33
37
  ['convert-from-to-require', convertFromToRequire],
34
38
  ['remove-useless-comma', removeUselessComma],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "2.14.1",
3
+ "version": "3.1.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",
@@ -76,9 +76,6 @@
76
76
  },
77
77
  "homepage": "https://github.com/coderaiser/flatlint",
78
78
  "license": "MIT",
79
- "engines": {
80
- "node": ">=18"
81
- },
82
79
  "dependencies": {
83
80
  "@putout/engine-loader": "^15.1.1",
84
81
  "@putout/operator-keyword": "^2.0.0",
@@ -87,16 +84,19 @@
87
84
  },
88
85
  "devDependencies": {
89
86
  "@putout/formatter-json": "^2.0.0",
90
- "@putout/test": "^12.0.1",
87
+ "@putout/test": "^13.0.0",
91
88
  "c8": "^10.1.2",
92
89
  "eslint": "^9.7.0",
93
- "eslint-plugin-putout": "^25.0.2",
94
- "madrun": "^10.2.2",
90
+ "eslint-plugin-putout": "^26.1.0",
91
+ "madrun": "^11.0.0",
95
92
  "mock-require": "^3.0.3",
96
93
  "montag": "^1.0.0",
97
94
  "nodemon": "^3.0.1",
98
- "putout": "^38.0.0",
99
- "supertape": "^10.0.0"
95
+ "putout": "^40.0.10",
96
+ "supertape": "^11.0.4"
97
+ },
98
+ "engines": {
99
+ "node": ">=20"
100
100
  },
101
101
  "publishConfig": {
102
102
  "access": "public"