diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 0000000..c32e484 --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,3 @@ +{ + "*.{ts,json,md,yml}": ["prettier --write", "git add"] +} diff --git a/.nano-staged.json b/.nano-staged.json deleted file mode 100644 index d1a9520..0000000 --- a/.nano-staged.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "*.{ts,json,md,yml}": "prettier --write" -} diff --git a/package-lock.json b/package-lock.json index e5d878e..d23ad2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "devDependencies": { "@types/node": "^20.19.43", "@vitest/coverage-v8": "^4.1.10", - "nano-staged": "^1.0.2", + "lint-staged": "^17.1.0", "postcss": "^8.5.20", "prettier": "^3.9.5", "rimraf": "^6.1.3", @@ -1145,6 +1145,30 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/lint-staged": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-17.1.0.tgz", + "integrity": "sha512-d7UQRu/9ZPgfu4+hu/k0wny5GEaIxo+2jb2LJqQDkE7cHRTm1HGqNUDq5UOwsGPpjpaNAFmgAsYo3TR+i9cSJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^4.0.5", + "string-argv": "^0.3.2", + "tinyexec": "^1.2.4" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": ">=22.22.1" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + }, + "optionalDependencies": { + "yaml": "^2.9.0" + } + }, "node_modules/magic-string": { "version": "0.30.21", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", @@ -1206,19 +1230,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/nano-staged": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nano-staged/-/nano-staged-1.0.2.tgz", - "integrity": "sha512-Fytar3zHLY99nlMfqPPbraxZodqQAHPpdPRyYaplL+lB9DCR6pUrafxbG+Btz4+7fO5Rm/+DO4ZeDO/nLSUMhw==", - "dev": true, - "license": "MIT", - "bin": { - "nano-staged": "lib/bin.js" - }, - "engines": { - "node": "^22 || >= 24" - } - }, "node_modules/nanoid": { "version": "3.3.16", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", @@ -1496,6 +1507,16 @@ "dev": true, "license": "MIT" }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -1766,6 +1787,23 @@ "engines": { "node": ">=8" } + }, + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "dev": true, + "license": "ISC", + "optional": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } } } } diff --git a/package.json b/package.json index f355828..0ff2042 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/node": "^20.19.43", "@vitest/coverage-v8": "^4.1.10", - "nano-staged": "^1.0.2", + "lint-staged": "^17.1.0", "postcss": "^8.5.20", "prettier": "^3.9.5", "rimraf": "^6.1.3", @@ -51,7 +51,7 @@ "pretest": "prettier --check .", "test": "vitest run", "test:watch": "vitest", - "precommit": "nano-staged", + "precommit": "lint-staged", "prettier": "prettier --write ." } }