mirror of
https://github.com/apache/superset.git
synced 2026-08-05 05:22:37 +00:00
feat(build): migrate from Prettier to Oxfmt for performant code formatting (#42434)
This commit is contained in:
@@ -48,7 +48,9 @@ export default function remarkTechArticleSchema() {
|
||||
|
||||
const title = frontmatter.title;
|
||||
const description = frontmatter.description;
|
||||
const keywords = Array.isArray(frontmatter.keywords) ? frontmatter.keywords : [];
|
||||
const keywords = Array.isArray(frontmatter.keywords)
|
||||
? frontmatter.keywords
|
||||
: [];
|
||||
const proficiencyLevel = frontmatter.seo_proficiency || 'Beginner';
|
||||
|
||||
// Create the import statement
|
||||
@@ -110,7 +112,7 @@ export default function remarkTechArticleSchema() {
|
||||
type: 'ExpressionStatement',
|
||||
expression: {
|
||||
type: 'ArrayExpression',
|
||||
elements: keywords.map((k) => ({
|
||||
elements: keywords.map(k => ({
|
||||
type: 'Literal',
|
||||
value: k,
|
||||
})),
|
||||
|
||||
@@ -47,14 +47,18 @@ module.exports = function robotsTxtPlugin(context, options = {}) {
|
||||
lines.push(`User-agent: ${policy.userAgent}`);
|
||||
|
||||
if (policy.allow) {
|
||||
const allows = Array.isArray(policy.allow) ? policy.allow : [policy.allow];
|
||||
const allows = Array.isArray(policy.allow)
|
||||
? policy.allow
|
||||
: [policy.allow];
|
||||
for (const allow of allows) {
|
||||
lines.push(`Allow: ${allow}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (policy.disallow) {
|
||||
const disallows = Array.isArray(policy.disallow) ? policy.disallow : [policy.disallow];
|
||||
const disallows = Array.isArray(policy.disallow)
|
||||
? policy.disallow
|
||||
: [policy.disallow];
|
||||
for (const disallow of disallows) {
|
||||
lines.push(`Disallow: ${disallow}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user