From dbe33e9a5800db7e156e4fd263174eaed1128a4e Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 25 Mar 2024 13:23:19 -0400 Subject: [PATCH] [ACS-7357] pre-commit linting for code and styles (#9472) * chore: enable lint-staged and prettier for pre-commit * testing hook * update linting config * cleanup --- .husky/pre-commit | 2 +- .lintstagedrc.json | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .lintstagedrc.json diff --git a/.husky/pre-commit b/.husky/pre-commit index 760fc9e6ae..36af219892 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npm run affected:lint +npx lint-staged diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 0000000000..b12ebf776d --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,4 @@ +{ + "*.{ts,js}": ["prettier --write", "eslint"], + "*.{css,scss}": ["prettier --write", "stylelint"] +}