From baf3b2996491cfc613cfcc3ac572804df63f0be8 Mon Sep 17 00:00:00 2001 From: Luigi Barbato Date: Sun, 11 Dec 2022 21:45:20 +0100 Subject: [PATCH] feat: add prettier ignore rules --- .lintstagedrc.js | 3 ++- .prettierignore | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .prettierignore diff --git a/.lintstagedrc.js b/.lintstagedrc.js index caa6c80..06f3584 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -5,7 +5,8 @@ const buildEslintCommand = (filenames) => .map((f) => path.relative(process.cwd(), f)) .join(" --file ")}`; -const buildPrettierCommand = "npx prettier --write ."; +const buildPrettierCommand = + "npx prettier --write . --ignore-unknown --ignore-path .prettierignore"; module.exports = { "*.{js,jsx,ts,tsx}": [buildEslintCommand, buildPrettierCommand], diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..317b723 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +node_modules +**/.next/** +**/_next/** +**/dist/** +**/__tmp__/** +lerna.json +.github \ No newline at end of file