flatlint 1.99.0 → 1.100.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.02.04, v1.100.0
2
+
3
+ feature:
4
+ - 0ac4ca5 flatlint: remove-useless-dot: add
5
+
1
6
  2025.02.04, v1.99.0
2
7
 
3
8
  feature:
package/README.md CHANGED
@@ -201,6 +201,15 @@ t.equal(expected, []);
201
201
 
202
202
  </details>
203
203
 
204
+ <details><summary>remove useless dot</summary>
205
+
206
+ ```diff
207
+ -fn([].);
208
+ +fn([].);
209
+ ```
210
+
211
+ </details>
212
+
204
213
  <details><summary>remove invalid character</summary>
205
214
 
206
215
  ```diff
@@ -23,9 +23,7 @@ export const match = () => ({
23
23
  'if (__a(__args)': (vars, path) => {
24
24
  return path.isNextKeyword();
25
25
  },
26
- '{__a} = __expr;': (vars, path) => {
27
- return !path.isPrevDeclarationKeyword();
28
- },
26
+ '{__a} = __expr;': (vars, path) => !path.isPrevDeclarationKeyword(),
29
27
  '{__a} = __expr': (vars, path) => {
30
28
  return path.isNextKeyword();
31
29
  },
@@ -9,7 +9,7 @@ import {
9
9
  spread,
10
10
  } from '#types';
11
11
 
12
- export const report = () => 'Remove useless coma';
12
+ export const report = () => `Remove useless ','`;
13
13
 
14
14
  export const match = () => ({
15
15
  '__a(__args) {},': (vars, path) => {
@@ -0,0 +1,5 @@
1
+ export const report = () => `Remove useless '.'`;
2
+
3
+ export const replace = () => ({
4
+ '.)': ')',
5
+ });
package/lib/plugins.js CHANGED
@@ -10,6 +10,7 @@ import * as addConstToExport from './plugins/add-const-to-export/index.js';
10
10
  import * as convertCommaToSemicolon from './plugins/convert-comma-to-semicolon/index.js';
11
11
  import * as convertFromToRequire from './plugins/convert-from-to-require/index.js';
12
12
  import * as removeUselessComma from './plugins/remove-useless-comma/index.js';
13
+ import * as removeUselessDot from './plugins/remove-useless-dot/index.js';
13
14
  import * as removeInvalidCharacter from './plugins/remove-invalid-character/index.js';
14
15
  import * as removeUselessRoundBrace from './plugins/remove-useless-round-brace/index.js';
15
16
  import * as convertSemicolonToComma from './plugins/convert-semicolon-to-comma/index.js';
@@ -30,6 +31,7 @@ export const plugins = [
30
31
  ['convert-semicolon-to-comma', convertSemicolonToComma],
31
32
  ['convert-from-to-require', convertFromToRequire],
32
33
  ['remove-useless-round-brace', removeUselessRoundBrace],
34
+ ['remove-useless-dot', removeUselessDot],
33
35
  ['remove-invalid-character', removeInvalidCharacter],
34
36
  ['wrap-assignment-in-parens', wrapAssignmentInParens],
35
37
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.99.0",
3
+ "version": "1.100.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",