flatlint 3.0.0 → 3.1.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.
package/ChangeLog CHANGED
@@ -1,3 +1,16 @@
1
+ 2025.06.02, v3.1.1
2
+
3
+ feature:
4
+ - 0b3e1ca flatlint: eslint-plugin-putout v27.1.0
5
+ - 97a1c08 flatlint: @putout/engine-loader v16.0.0
6
+
7
+ 2025.04.21, v3.1.0
8
+
9
+ feature:
10
+ - 99bf0ac flatlint: convert-colon-to-comma: add
11
+ - 83c0310 flatlint: putout v40.0.10
12
+ - 3599fea flatlint: convert-comma-to-semicolon: array-colon: false positive
13
+
1
14
  2025.03.28, v3.0.0
2
15
 
3
16
  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": "3.0.0",
3
+ "version": "3.1.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",
@@ -77,7 +77,7 @@
77
77
  "homepage": "https://github.com/coderaiser/flatlint",
78
78
  "license": "MIT",
79
79
  "dependencies": {
80
- "@putout/engine-loader": "^15.1.1",
80
+ "@putout/engine-loader": "^16.0.0",
81
81
  "@putout/operator-keyword": "^2.0.0",
82
82
  "debug": "^4.4.0",
83
83
  "js-tokens": "^9.0.1"
@@ -87,12 +87,12 @@
87
87
  "@putout/test": "^13.0.0",
88
88
  "c8": "^10.1.2",
89
89
  "eslint": "^9.7.0",
90
- "eslint-plugin-putout": "^26.1.0",
90
+ "eslint-plugin-putout": "^27.1.0",
91
91
  "madrun": "^11.0.0",
92
92
  "mock-require": "^3.0.3",
93
93
  "montag": "^1.0.0",
94
94
  "nodemon": "^3.0.1",
95
- "putout": "^39.3.0",
95
+ "putout": "^40.0.10",
96
96
  "supertape": "^11.0.4"
97
97
  },
98
98
  "engines": {