flatlint 1.37.0 → 1.38.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,8 @@
1
+ 2025.01.11, v1.38.0
2
+
3
+ feature:
4
+ - 911478f flatlint: remove-invalid-character: add
5
+
1
6
  2025.01.10, v1.37.0
2
7
 
3
8
  feature:
package/README.md CHANGED
@@ -19,7 +19,7 @@ npm i flatlint
19
19
 
20
20
  </details>
21
21
 
22
- <details><summary>Convert <code>,</code> to <code>;</code> at the end of statement</summary>
22
+ <details><summary>convert <code>,</code> to <code>;</code> at the end of statement</summary>
23
23
 
24
24
  ```diff
25
25
  -const a = 5,
@@ -36,7 +36,7 @@ function x() {
36
36
 
37
37
  </details>
38
38
 
39
- <details><summary>Convert <code>from</code> to <code>require</code></summary>
39
+ <details><summary>convert <code>from</code> to <code>require</code></summary>
40
40
 
41
41
  ```diff
42
42
  -const a = from 'a';
@@ -125,6 +125,23 @@ function x() {
125
125
 
126
126
  </details>
127
127
 
128
+ <details><summary>remove invalid character</summary>
129
+
130
+ ```diff
131
+ -const {¬
132
+ - is,¬
133
+ - isArgsStr,¬
134
+ - isTypeParamsStr,¬
135
+ -} = require('./is');¬
136
+ +const {
137
+ + is,
138
+ + isArgsStr,
139
+ + isTypeParamsStr,
140
+ +} = require('./is');
141
+ ```
142
+
143
+ </details>
144
+
128
145
  <details><summary>add missing quote</summary>
129
146
 
130
147
  ```diff
@@ -0,0 +1,6 @@
1
+ export const report = () => 'Remove invalid character';
2
+
3
+ export const replace = () => ({
4
+ '¬': '',
5
+ ';¬': ';',
6
+ });
package/lib/plugins.js CHANGED
@@ -7,6 +7,7 @@ import * as convertCommaToSemicolon from './plugins/convert-comma-to-semicolon/i
7
7
  import * as convertFromToRequire from './plugins/convert-from-to-require/index.js';
8
8
  import * as removeUselessRoundBrace from './plugins/remove-useless-round-brace/index.js';
9
9
  import * as removeUselessComma from './plugins/remove-useless-comma/index.js';
10
+ import * as removeInvalidCharacter from './plugins/remove-invalid-character/index.js';
10
11
  import * as addConstToExport from './plugins/add-const-to-export/index.js';
11
12
 
12
13
  export const plugins = [
@@ -20,4 +21,5 @@ export const plugins = [
20
21
  ['convert-from-to-require', convertFromToRequire],
21
22
  ['remove-useless-round-brace', removeUselessRoundBrace],
22
23
  ['remove-useless-comma', removeUselessComma],
24
+ ['remove-invalid-character', removeInvalidCharacter],
23
25
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.37.0",
3
+ "version": "1.38.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",