diff --git a/eslint.config.js b/eslint.config.js index 5c4fdbd60..89894e1dd 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -11,6 +11,7 @@ import eslintPluginRegexp from "eslint-plugin-regexp"; import eslintPluginSimpleImportSort from "eslint-plugin-simple-import-sort"; import eslintPluginUnicorn from "eslint-plugin-unicorn"; import globals from "globals"; +import eslintConfigNodeStyleText from "node-style-text/eslint-config"; import eslintPluginPrettierInternalRules from "./scripts/tools/eslint-plugin-prettier-internal-rules/index.js"; const toPath = (file) => url.fileURLToPath(new URL(file, import.meta.url)); @@ -45,6 +46,7 @@ const configs = [ eslintPluginRegexp.configs["flat/recommended"], eslintPluginUnicorn.configs["flat/recommended"], eslintConfigPrettier, + eslintConfigNodeStyleText, { languageOptions: { globals: { ...globals.builtin, ...globals.node }, diff --git a/package.json b/package.json index d18bd12f7..da6f64e7e 100644 --- a/package.json +++ b/package.json @@ -159,7 +159,7 @@ "knip": "5.64.2", "magic-string": "0.30.19", "nano-spawn": "2.0.0", - "node-style-text": "1.0.0", + "node-style-text": "2.1.1", "npm-run-all2": "8.0.4", "prettier": "3.6.2", "pretty-bytes": "7.1.0", diff --git a/scripts/build/build.js b/scripts/build/build.js index c65c14d0b..2db789581 100644 --- a/scripts/build/build.js +++ b/scripts/build/build.js @@ -171,9 +171,7 @@ async function run() { } console.log( - styleText.inverse( - `[${index + 1}/${packagesToBuild.length}] Building package '${packageConfig.packageName}'`, - ), + styleText.inverse`[${index + 1}/${packagesToBuild.length}] Building package '${packageConfig.packageName}'`, ); const startTime = performance.now(); diff --git a/scripts/release/package.json b/scripts/release/package.json index 13441c725..b39da484e 100644 --- a/scripts/release/package.json +++ b/scripts/release/package.json @@ -8,7 +8,7 @@ "enquirer": "2.4.1", "fast-glob": "3.3.3", "nano-spawn": "2.0.0", - "node-style-text": "1.0.0", + "node-style-text": "2.1.1", "outdent": "0.8.0", "semver": "7.7.3" }, diff --git a/scripts/release/steps/post-publish-steps.js b/scripts/release/steps/post-publish-steps.js index 988fde2b2..9ff840c54 100644 --- a/scripts/release/steps/post-publish-steps.js +++ b/scripts/release/steps/post-publish-steps.js @@ -57,11 +57,9 @@ export default async function postPublishSteps({ dry, next }) { console.log( outdent` - ${styleText.yellow.bold( - `The following ${ - steps.length === 1 ? "step is" : "steps are" - } optional.`, - )} + ${styleText.yellow.bold`The following ${ + steps.length === 1 ? "step is" : "steps are" + } optional.`} ${steps.join("\n\n")} `, diff --git a/scripts/release/steps/show-instructions-after-npm-publish.js b/scripts/release/steps/show-instructions-after-npm-publish.js index 428e8bd23..ba23e6440 100644 --- a/scripts/release/steps/show-instructions-after-npm-publish.js +++ b/scripts/release/steps/show-instructions-after-npm-publish.js @@ -39,7 +39,7 @@ export default async function showInstructionsAfterNpmPublish({ next, }) { if (next) { - console.log(`${styleText.green.bold(`Prettier ${version} published!`)}`); + console.log(`${styleText.green.bold`Prettier ${version} published!`}`); await waitForEnter(); return; } @@ -47,7 +47,7 @@ export default async function showInstructionsAfterNpmPublish({ const releaseUrl = getReleaseUrl(version, previousVersion); console.log( outdent` - ${styleText.green.bold(`Prettier ${version} published!`)} + ${styleText.green.bold`Prettier ${version} published!`} ${styleText.yellow.bold("Some manual steps are necessary.")} diff --git a/scripts/release/yarn.lock b/scripts/release/yarn.lock index 2af9c16c3..e4c9bf305 100644 --- a/scripts/release/yarn.lock +++ b/scripts/release/yarn.lock @@ -152,10 +152,10 @@ __metadata: languageName: node linkType: hard -"node-style-text@npm:1.0.0": - version: 1.0.0 - resolution: "node-style-text@npm:1.0.0" - checksum: 10/98c66d0bb040d648200edcb2ecafec3ed23b5b0b336e9982100b0d1e4b8b8cf0864680d1c07598f7694f9e9de4a54d9d5ac370c7f06f22b31bc8883dcfc6a244 +"node-style-text@npm:2.1.1": + version: 2.1.1 + resolution: "node-style-text@npm:2.1.1" + checksum: 10/e81069a3819900b5c3176f84e258f30915afe8a2166e52d3f2ebeb29c23bacd5f83e82257189426c66bb4ccb232e592b4feb9f09a617180ab568085f02171b02 languageName: node linkType: hard @@ -194,7 +194,7 @@ __metadata: enquirer: "npm:2.4.1" fast-glob: "npm:3.3.3" nano-spawn: "npm:2.0.0" - node-style-text: "npm:1.0.0" + node-style-text: "npm:2.1.1" outdent: "npm:0.8.0" semver: "npm:7.7.3" languageName: unknown diff --git a/yarn.lock b/yarn.lock index e9120d3d8..38a8afc51 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6729,10 +6729,10 @@ __metadata: languageName: node linkType: hard -"node-style-text@npm:1.0.0": - version: 1.0.0 - resolution: "node-style-text@npm:1.0.0" - checksum: 10/98c66d0bb040d648200edcb2ecafec3ed23b5b0b336e9982100b0d1e4b8b8cf0864680d1c07598f7694f9e9de4a54d9d5ac370c7f06f22b31bc8883dcfc6a244 +"node-style-text@npm:2.1.1": + version: 2.1.1 + resolution: "node-style-text@npm:2.1.1" + checksum: 10/e81069a3819900b5c3176f84e258f30915afe8a2166e52d3f2ebeb29c23bacd5f83e82257189426c66bb4ccb232e592b4feb9f09a617180ab568085f02171b02 languageName: node linkType: hard @@ -7402,7 +7402,7 @@ __metadata: minimist: "npm:1.2.8" n-readlines: "npm:1.0.1" nano-spawn: "npm:2.0.0" - node-style-text: "npm:1.0.0" + node-style-text: "npm:2.1.1" npm-run-all2: "npm:8.0.4" outdent: "npm:0.8.0" oxc-parser: "npm:0.94.0"