Fix some lgtm alerts (#12084)
This commit is contained in:
1 parent
f29a7565e9
commit
53da86c34d
4 files changed
+10
-9
No files matched your search
@@ -33,7 +33,7 @@ async function bump({
|
||||
} else {
|
||||
pkg.version = semver.inc(version, "minor") + "-dev";
|
||||
}
|
||||
await writeJson("package.json", pkg, { spaces: 2 });
|
||||
await writeJson("package.json", pkg);
|
||||
}
|
||||
|
||||
export default async function bumpPrettier(params) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
async function bump({ version }) {
|
||||
const pkg = await readJson("package.json");
|
||||
pkg.version = version;
|
||||
await writeJson("package.json", pkg, { spaces: 2 });
|
||||
await writeJson("package.json", pkg);
|
||||
|
||||
// Update github issue templates
|
||||
processFile(".github/ISSUE_TEMPLATE/formatting.md", (content) =>
|
||||
|
||||
@@ -31,7 +31,7 @@ const {
|
||||
} = require("./utils.js");
|
||||
const getNodeContent = require("./get-node-content.js");
|
||||
|
||||
function printEmbeddedAttributeValue(node, originalTextToDoc, options) {
|
||||
function printEmbeddedAttributeValue(node, htmlTextToDoc, options) {
|
||||
const isKeyMatched = (patterns) =>
|
||||
new RegExp(patterns.join("|")).test(node.fullName);
|
||||
const getValue = () => unescapeQuoteEntities(node.value);
|
||||
@@ -67,11 +67,11 @@ function printEmbeddedAttributeValue(node, originalTextToDoc, options) {
|
||||
const printMaybeHug = (doc) => (shouldHug ? printHug(doc) : printExpand(doc));
|
||||
|
||||
const attributeTextToDoc = (code, opts) =>
|
||||
originalTextToDoc(
|
||||
code,
|
||||
{ __onHtmlBindingRoot, __embeddedInHtml: true, ...opts },
|
||||
{ stripTrailingHardline: true }
|
||||
);
|
||||
htmlTextToDoc(code, {
|
||||
__onHtmlBindingRoot,
|
||||
__embeddedInHtml: true,
|
||||
...opts,
|
||||
});
|
||||
|
||||
if (
|
||||
node.fullName === "srcset" &&
|
||||
|
||||
@@ -63,7 +63,8 @@ function throwErrorForInvalidAbstractProperty(tsNode, esTreeNode) {
|
||||
function throwErrorForInvalidNodes(ast, options) {
|
||||
const { esTreeNodeToTSNodeMap, tsNodeToESTreeNodeMap } =
|
||||
options.tsParseResult;
|
||||
ast = visitNode(ast, (node) => {
|
||||
|
||||
visitNode(ast, (node) => {
|
||||
const tsNode = esTreeNodeToTSNodeMap.get(node);
|
||||
if (!tsNode) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user