flatlint 1.7.3 → 1.9.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,13 @@
1
+ 2024.12.31, v1.9.0
2
+
3
+ feature:
4
+ - e3e32a4 flatlint: add const to export
5
+
6
+ 2024.12.31, v1.8.0
7
+
8
+ feature:
9
+ - abe1724 flatlint: remove-useless-round-brace: import
10
+
1
11
  2024.12.30, v1.7.3
2
12
 
3
13
  feature:
package/README.md CHANGED
@@ -39,6 +39,15 @@ npm i flatlint
39
39
 
40
40
  </details>
41
41
 
42
+ <details><summary>add <code>const</code> to <code>export</code></summary>
43
+
44
+ ```diff
45
+ -export x = 5;
46
+ +export const x = 5;
47
+ ```
48
+
49
+ </details>
50
+
42
51
  <details><summary>add missing squire brace</summary>
43
52
 
44
53
  ```diff
@@ -53,6 +62,9 @@ npm i flatlint
53
62
  ```diff
54
63
  -const a = 5);
55
64
  +const a = 5;
65
+
66
+ -import a from 'a');
67
+ +import a from 'a';
56
68
  ```
57
69
 
58
70
  </details>
@@ -0,0 +1,5 @@
1
+ export const report = () => `Add 'const' to 'export'`;
2
+
3
+ export const replace = () => ({
4
+ 'export __a = __b': 'export const __a = __b',
5
+ });
@@ -6,5 +6,6 @@ export function replace() {
6
6
  return {
7
7
  'const __a = __b)': 'const __a = __b',
8
8
  'const __a = "__b")': 'const __a = "__b"',
9
+ 'import __a from "__b")': 'import __a from "__b"',
9
10
  };
10
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.7.3",
3
+ "version": "1.9.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",