flatlint 1.66.0 → 1.67.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 +5 -0
- package/lib/runner/path.js +4 -0
- package/lib/types/types.js +1 -0
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/lib/runner/path.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
isWhiteSpace,
|
|
7
7
|
isTemplateTail,
|
|
8
8
|
isTemplateMiddle,
|
|
9
|
+
isNoSubstitutionTemplate,
|
|
9
10
|
} from '#types';
|
|
10
11
|
|
|
11
12
|
export const createPath = ({tokens, start, end}) => ({
|
|
@@ -90,6 +91,9 @@ const createIsInsideTemplate = ({tokens, end}) => () => {
|
|
|
90
91
|
if (isTemplateTail(current))
|
|
91
92
|
return true;
|
|
92
93
|
|
|
94
|
+
if (isNoSubstitutionTemplate(current))
|
|
95
|
+
return true;
|
|
96
|
+
|
|
93
97
|
return isTemplateMiddle(current);
|
|
94
98
|
};
|
|
95
99
|
|
package/lib/types/types.js
CHANGED
|
@@ -3,6 +3,7 @@ const maybeArray = (a) => isArray(a) ? a : [a];
|
|
|
3
3
|
const isString = (a) => typeof a === 'string';
|
|
4
4
|
|
|
5
5
|
export const isTemplateMiddle = (a) => a?.type === 'TemplateMiddle';
|
|
6
|
+
export const isNoSubstitutionTemplate = (a) => a?.type === 'NoSubstitutionTemplate';
|
|
6
7
|
export const isTemplateTail = (a) => a?.type === 'TemplateTail';
|
|
7
8
|
export const isWhiteSpace = ({type}) => type === 'WhiteSpace';
|
|
8
9
|
export const isIdentifier = (token, newToken) => {
|