From a08404693cd386811a8c4a8da10a5c952fe43984 Mon Sep 17 00:00:00 2001 From: Nathan Brahms Date: Tue, 20 Feb 2024 14:30:10 -0800 Subject: [PATCH] Configure and run prettier on root --- .eslintrc.js | 9 ++++++++- .prettierignore | 1 + .prettierrc.yaml | 2 +- .vscode/launch.json | 2 +- README.md | 2 +- jest.config.js | 6 +++--- p0 | 6 +++--- 7 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 .prettierignore diff --git a/.eslintrc.js b/.eslintrc.js index 0ce1784..3248f80 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -47,7 +47,14 @@ module.exports = { // Allow console.log() statements "no-console": "off", }, - ignorePatterns: [".eslintrc.js", "prettier.config.js", "jest.config.js", "public/**", "build/**", "node_modules/**"], + ignorePatterns: [ + ".eslintrc.js", + "prettier.config.js", + "jest.config.js", + "public/**", + "build/**", + "node_modules/**", + ], overrides: [], parserOptions: { ecmaVersion: "latest", diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..bfe3b8d --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +tsconfig.json \ No newline at end of file diff --git a/.prettierrc.yaml b/.prettierrc.yaml index 0b6da5a..03f716f 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -1,3 +1,3 @@ plugins: -- '@trivago/prettier-plugin-sort-imports' + - "@trivago/prettier-plugin-sort-imports" trailingComma: es5 diff --git a/.vscode/launch.json b/.vscode/launch.json index 6f3c990..8f30e65 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,4 +12,4 @@ "webRoot": "${workspaceFolder}" } ] -} \ No newline at end of file +} diff --git a/README.md b/README.md index 1ef088a..f2645b6 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# p0cli \ No newline at end of file +# p0cli diff --git a/jest.config.js b/jest.config.js index 736f5d8..5eb9351 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,6 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', - testEnvironment: 'node', + preset: "ts-jest", + testEnvironment: "node", modulePathIgnorePatterns: ["/build"], -}; \ No newline at end of file +}; diff --git a/p0 b/p0 index 8049649..db60547 100755 --- a/p0 +++ b/p0 @@ -5,12 +5,12 @@ process.emit = function (name, data, ...args) { if ( name === `warning` && typeof data === `object` && - data.name === `ExperimentalWarning` - && data.message.startsWith(`The Fetch API is an experimental feature.`) + data.name === `ExperimentalWarning` && + data.message.startsWith(`The Fetch API is an experimental feature.`) ) { return false; } return originalEmit.apply(process, arguments); }; -require(`${__dirname}/build/index.js`).main(); \ No newline at end of file +require(`${__dirname}/build/index.js`).main();