flatlint 1.104.0 → 1.105.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.02.07, v1.105.1
2
+
3
+ fix:
4
+ - 9d76c2c flatlint: convert-comma-to-semicolon: isKeyword: no token
5
+
6
+ 2025.02.06, v1.105.0
7
+
8
+ fix:
9
+ - b308df6 flatlint: types: isTSKeyword
10
+
11
+ feature:
12
+ - 8b7e4c5 flatlint: @putout/operator-keyword v2.0.0
13
+
1
14
  2025.02.05, v1.104.0
2
15
 
3
16
  feature:
@@ -31,9 +31,14 @@ export const isNumericLiteral = ({type}) => type === 'NumericLiteral';
31
31
  export const isNewLine = ({type}) => type === 'LineTerminatorSequence';
32
32
 
33
33
  export const isKeyword = (token, name) => {
34
+ if (!token)
35
+ return false;
36
+
34
37
  const {value} = token;
38
+ const is = keyword.isKeyword(value);
39
+ const isTS = keyword.isTSKeyword(value);
35
40
 
36
- if (!keyword.isKeyword(value))
41
+ if (!is && !isTS)
37
42
  return false;
38
43
 
39
44
  return isIdentifier(token, name);
@@ -231,3 +236,4 @@ export const getPrev = ({tokens, start}) => {
231
236
  return token;
232
237
  }
233
238
  };
239
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.104.0",
3
+ "version": "1.105.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "dependencies": {
83
83
  "@putout/engine-loader": "^15.1.1",
84
- "@putout/operator-keyword": "^1.0.0",
84
+ "@putout/operator-keyword": "^2.0.0",
85
85
  "debug": "^4.4.0",
86
86
  "js-tokens": "^9.0.1"
87
87
  },