flatlint 1.74.0 → 1.75.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
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
isIdentifier,
|
|
5
5
|
isPunctuator,
|
|
6
6
|
openSquireBrace,
|
|
7
|
+
spread,
|
|
7
8
|
} from '#types';
|
|
8
9
|
|
|
9
10
|
export const report = () => 'Remove useless coma';
|
|
@@ -46,6 +47,9 @@ export const match = () => ({
|
|
|
46
47
|
for (const current of path.getAllPrev()) {
|
|
47
48
|
if (isPunctuator(current, colon))
|
|
48
49
|
return false;
|
|
50
|
+
|
|
51
|
+
if (isPunctuator(current, spread))
|
|
52
|
+
return false;
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
return true;
|
package/lib/types/types.js
CHANGED
|
@@ -151,6 +151,8 @@ export const more = Punctuator('>');
|
|
|
151
151
|
export const assign = Punctuator('=');
|
|
152
152
|
export const openRoundBrace = Punctuator('(');
|
|
153
153
|
export const or = Punctuator('||');
|
|
154
|
+
export const spread = Punctuator('...');
|
|
155
|
+
export const rest = Punctuator('...');
|
|
154
156
|
export const semicolon = Punctuator(';');
|
|
155
157
|
export const openCurlyBrace = Punctuator('{');
|
|
156
158
|
export const closeCurlyBrace = Punctuator('}');
|