diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 000000000..d0a778429 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged \ No newline at end of file diff --git a/lxl-web/.husky/pre-commit b/lxl-web/.husky/pre-commit deleted file mode 100755 index fb2c60dd8..000000000 --- a/lxl-web/.husky/pre-commit +++ /dev/null @@ -1 +0,0 @@ -cd ./lxl-web && npx lint-staged diff --git a/lxl-web/.lintstagedrc b/lxl-web/.lintstagedrc new file mode 100644 index 000000000..96c7de25e --- /dev/null +++ b/lxl-web/.lintstagedrc @@ -0,0 +1,7 @@ +{ + "*.{js,ts,svelte,css,scss,postcss,md,json}": [ + "prettier --write --plugin-search-dir=.", + "prettier --check --plugin-search-dir=." + ], + "*.{js,ts,svelte}": "eslint" +} diff --git a/lxl-web/package.json b/lxl-web/package.json index 2e226c506..96893b13a 100644 --- a/lxl-web/package.json +++ b/lxl-web/package.json @@ -17,13 +17,6 @@ "test:unit": "vitest", "prepare": "cd .. && husky lxl-web/.husky" }, - "lint-staged": { - "*.{js,ts,svelte,css,scss,postcss,md,json}": [ - "prettier --write --plugin-search-dir=.", - "prettier --check --plugin-search-dir=." - ], - "*.{js,ts,svelte}": "eslint" - }, "devDependencies": { "@axe-core/playwright": "^4.9.1", "@floating-ui/dom": "^1.6.10", @@ -43,10 +36,8 @@ "eslint-plugin-svelte": "^2.43.0", "estree-walker": "^3.0.3", "globals": "^15.9.0", - "husky": "^9.1.4", "jmespath": "^0.16.0", "js-cookie": "^3.0.5", - "lint-staged": "^15.2.9", "lxljs": "^1.1.0", "magic-string": "^0.30.11", "mdsvex": "^0.12.3", diff --git a/package-lock.json b/package-lock.json index c1cbe2a9b..e20258661 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,11 @@ "packages/*", "lxl-web", "lxljs" - ] + ], + "devDependencies": { + "husky": "^9.1.6", + "lint-staged": "^15.2.10" + } }, "lxl-web": { "version": "0.0.1", @@ -37,10 +41,8 @@ "eslint-plugin-svelte": "^2.43.0", "estree-walker": "^3.0.3", "globals": "^15.9.0", - "husky": "^9.1.4", "jmespath": "^0.16.0", "js-cookie": "^3.0.5", - "lint-staged": "^15.2.9", "lxljs": "^1.1.0", "magic-string": "^0.30.11", "mdsvex": "^0.12.3", @@ -38178,7 +38180,6 @@ "eslint-config-prettier": "^9.1.0", "globals": "^15.12.0", "husky": "^9.1.6", - "lint-staged": "^15.2.10", "prettier": "^3.3.3", "rollup": "^2.60.2", "rollup-plugin-dts": "^4.0.1", @@ -38288,8 +38289,6 @@ "eslint-plugin-svelte": "^2.36.0", "esm-env": "^1.1.4", "globals": "^15.0.0", - "husky": "^9.1.6", - "lint-staged": "^15.2.10", "prettier": "^3.3.2", "prettier-plugin-css-order": "^2.1.2", "prettier-plugin-svelte": "^3.2.6", diff --git a/package.json b/package.json index edf58eab9..80528f26f 100644 --- a/package.json +++ b/package.json @@ -6,5 +6,9 @@ "packages/*", "lxl-web", "lxljs" - ] + ], + "devDependencies": { + "husky": "^9.1.6", + "lint-staged": "^15.2.10" + } } diff --git a/packages/codemirror-lang-lxlquery/.husky/pre-commit b/packages/codemirror-lang-lxlquery/.husky/pre-commit deleted file mode 100644 index e251359ae..000000000 --- a/packages/codemirror-lang-lxlquery/.husky/pre-commit +++ /dev/null @@ -1 +0,0 @@ -cd ./packages/codemirror-lang-lxlquery && npx lint-staged diff --git a/packages/codemirror-lang-lxlquery/.lintstagedrc b/packages/codemirror-lang-lxlquery/.lintstagedrc new file mode 100644 index 000000000..c22038c04 --- /dev/null +++ b/packages/codemirror-lang-lxlquery/.lintstagedrc @@ -0,0 +1,7 @@ +{ + "*.{js,ts,md,json}": [ + "prettier --write --plugin-search-dir=.", + "prettier --check --plugin-search-dir=." + ], + "*.{js,ts}": "eslint" +} diff --git a/packages/codemirror-lang-lxlquery/package.json b/packages/codemirror-lang-lxlquery/package.json index cb7e66038..d8586c166 100644 --- a/packages/codemirror-lang-lxlquery/package.json +++ b/packages/codemirror-lang-lxlquery/package.json @@ -8,13 +8,6 @@ "lint": "eslint . && prettier --check .", "format": "prettier --write ." }, - "lint-staged": { - "*.{js,ts,md,json}": [ - "prettier --write --plugin-search-dir=.", - "prettier --check --plugin-search-dir=." - ], - "*.{js,ts}": "eslint" - }, "type": "module", "main": "dist/index.cjs", "module": "dist/index.js", @@ -35,7 +28,6 @@ "eslint-config-prettier": "^9.1.0", "globals": "^15.12.0", "husky": "^9.1.6", - "lint-staged": "^15.2.10", "prettier": "^3.3.3", "rollup": "^2.60.2", "rollup-plugin-dts": "^4.0.1", diff --git a/packages/supersearch/.husky/pre-commit b/packages/supersearch/.husky/pre-commit deleted file mode 100644 index f82b10ae6..000000000 --- a/packages/supersearch/.husky/pre-commit +++ /dev/null @@ -1 +0,0 @@ -cd ./packages/supersearch && npx lint-staged diff --git a/packages/supersearch/.lintstagedrc b/packages/supersearch/.lintstagedrc new file mode 100644 index 000000000..96c7de25e --- /dev/null +++ b/packages/supersearch/.lintstagedrc @@ -0,0 +1,7 @@ +{ + "*.{js,ts,svelte,css,scss,postcss,md,json}": [ + "prettier --write --plugin-search-dir=.", + "prettier --check --plugin-search-dir=." + ], + "*.{js,ts,svelte}": "eslint" +} diff --git a/packages/supersearch/package.json b/packages/supersearch/package.json index d5ec06342..bd01bd506 100644 --- a/packages/supersearch/package.json +++ b/packages/supersearch/package.json @@ -16,13 +16,6 @@ "format": "prettier --write .", "prepare": "cd ../../ && husky && cd ./packages/supersearch && npm run package" }, - "lint-staged": { - "*.{js,ts,svelte,css,scss,postcss,md,json}": [ - "prettier --write --plugin-search-dir=.", - "prettier --check --plugin-search-dir=." - ], - "*.{js,ts,svelte}": "eslint" - }, "files": [ "dist", "!dist/**/*.test.*", @@ -59,8 +52,6 @@ "eslint-plugin-svelte": "^2.36.0", "esm-env": "^1.1.4", "globals": "^15.0.0", - "husky": "^9.1.6", - "lint-staged": "^15.2.10", "prettier": "^3.3.2", "prettier-plugin-css-order": "^2.1.2", "prettier-plugin-svelte": "^3.2.6",