From c8c6b0cf776e5897d7b00e1b6fac16dff047dd81 Mon Sep 17 00:00:00 2001 From: JounQin Date: Mon, 20 Jun 2022 20:31:21 +0800 Subject: [PATCH] fix(lint-staged): do not run prettier on .nvmrc --- .changeset/sharp-kangaroos-tap.md | 8 ++++++++ .nvmrc | 1 + packages/lint-staged/base.js | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/sharp-kangaroos-tap.md create mode 100644 .nvmrc diff --git a/.changeset/sharp-kangaroos-tap.md b/.changeset/sharp-kangaroos-tap.md new file mode 100644 index 00000000..9458d517 --- /dev/null +++ b/.changeset/sharp-kangaroos-tap.md @@ -0,0 +1,8 @@ +--- +'@1stg/app-config': patch +'@1stg/common-config': patch +'@1stg/lib-config': patch +'@1stg/lint-staged': patch +--- + +fix(lint-staged): do not run prettier on .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..b009dfb9 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +lts/* diff --git a/packages/lint-staged/base.js b/packages/lint-staged/base.js index a180b321..0230d726 100644 --- a/packages/lint-staged/base.js +++ b/packages/lint-staged/base.js @@ -2,7 +2,7 @@ const { isPkgAvailable } = require('@pkgr/utils') const config = [ '*.{*sh,env,env.*,gql,html,json,properties,pug,rb,svelte,vue,toml,yaml,yml}', - '.*rc', + '.!(nvm)rc', 'Dockerfile', ].reduce( (acc, files) =>