flatlint 4.0.3 → 4.0.5

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
+ 2026.01.01, v4.0.5
2
+
3
+ feature:
4
+ - 14a4a47 flatlint: parser: NoSubstitutionTemplate: lines count
5
+
6
+ 2026.01.01, v4.0.4
7
+
8
+ feature:
9
+ - f062bd2 flatlint: convert-semicolon-to-comma: improve support
10
+
1
11
  2026.01.01, v4.0.3
2
12
 
3
13
  fix:
@@ -2,6 +2,7 @@ import tokenize from 'js-tokens';
2
2
  import {
3
3
  isMultilineComment,
4
4
  isNewLine,
5
+ isNoSubstitutionTemplate,
5
6
  isStringLiteral,
6
7
  isWhiteSpace,
7
8
  } from '#types';
@@ -67,6 +68,9 @@ function getTokensWithLocation(tokens) {
67
68
  if (isMultilineComment(token))
68
69
  line += token.value.split('\n').length - 1;
69
70
 
71
+ if (isNoSubstitutionTemplate(token))
72
+ line += token.value.split('\n').length - 1;
73
+
70
74
  result.push({
71
75
  ...token,
72
76
  line,
@@ -1,4 +1,5 @@
1
1
  import {
2
+ quote,
2
3
  closeSquareBrace,
3
4
  colon,
4
5
  dot,
@@ -89,9 +90,12 @@ export const match = () => ({
89
90
  '__a];': (vars, path) => {
90
91
  return path.isNextPunctuator(closeSquareBrace);
91
92
  },
92
- '=> __a.__b(__c, __d);'(vars, path) {
93
+ '=> __a.__b(__c, __d);': (vars, path) => {
93
94
  return path.isNextPunctuator(closeCurlyBrace);
94
95
  },
96
+ '";': (vars, path) => {
97
+ return path.isNextPunctuator(quote);
98
+ },
95
99
  });
96
100
 
97
101
  export const replace = () => ({
@@ -100,4 +104,5 @@ export const replace = () => ({
100
104
  ');': '),',
101
105
  '__a];': '__a],',
102
106
  '=> __a.__b(__c, __d);': '=> __a.__b(__c, __d),',
107
+ '";': '",',
103
108
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "4.0.3",
3
+ "version": "4.0.5",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",