@savvy-web/lint-staged 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/376.js +6 -4
- package/package.json +2 -2
package/376.js
CHANGED
|
@@ -1101,7 +1101,7 @@ const HUSKY_HOOK_PATH = ".husky/pre-commit";
|
|
|
1101
1101
|
const POST_CHECKOUT_HOOK_PATH = ".husky/post-checkout";
|
|
1102
1102
|
const POST_MERGE_HOOK_PATH = ".husky/post-merge";
|
|
1103
1103
|
const DEFAULT_CONFIG_PATH = "lib/configs/lint-staged.config.ts";
|
|
1104
|
-
const MARKDOWNLINT_CONFIG_PATH = "
|
|
1104
|
+
const MARKDOWNLINT_CONFIG_PATH = "lib/configs/.markdownlint-cli2.jsonc";
|
|
1105
1105
|
const JSONC_FORMAT = {
|
|
1106
1106
|
tabSize: 1,
|
|
1107
1107
|
insertSpaces: false
|
|
@@ -1207,10 +1207,9 @@ function generateConfigContent(preset) {
|
|
|
1207
1207
|
* lint-staged configuration
|
|
1208
1208
|
* Generated by savvy-lint init
|
|
1209
1209
|
*/
|
|
1210
|
-
import type { Configuration } from "lint-staged";
|
|
1211
1210
|
import { Preset } from "@savvy-web/lint-staged";
|
|
1212
1211
|
|
|
1213
|
-
export default Preset.${preset}()
|
|
1212
|
+
export default Preset.${preset}();
|
|
1214
1213
|
`;
|
|
1215
1214
|
}
|
|
1216
1215
|
function writeMarkdownlintConfig(fs, preset, force) {
|
|
@@ -1218,6 +1217,9 @@ function writeMarkdownlintConfig(fs, preset, force) {
|
|
|
1218
1217
|
const configExists = yield* fs.exists(MARKDOWNLINT_CONFIG_PATH);
|
|
1219
1218
|
const fullTemplate = JSON.stringify(MARKDOWNLINT_TEMPLATE, null, "\t");
|
|
1220
1219
|
if (!configExists) {
|
|
1220
|
+
yield* fs.makeDirectory("lib/configs", {
|
|
1221
|
+
recursive: true
|
|
1222
|
+
});
|
|
1221
1223
|
yield* fs.writeFileString(MARKDOWNLINT_CONFIG_PATH, `${fullTemplate}\n`);
|
|
1222
1224
|
yield* Effect.log(`${CHECK_MARK} Created ${MARKDOWNLINT_CONFIG_PATH}`);
|
|
1223
1225
|
return;
|
|
@@ -1519,7 +1521,7 @@ const rootCommand = Command.make("savvy-lint").pipe(Command.withSubcommands([
|
|
|
1519
1521
|
]));
|
|
1520
1522
|
const cli = Command.run(rootCommand, {
|
|
1521
1523
|
name: "savvy-lint",
|
|
1522
|
-
version: "0.3.
|
|
1524
|
+
version: "0.3.2"
|
|
1523
1525
|
});
|
|
1524
1526
|
function runCli() {
|
|
1525
1527
|
const main = Effect.suspend(()=>cli(process.argv)).pipe(Effect.provide(NodeContext.layer));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/lint-staged",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Composable, configurable lint-staged handlers for pre-commit hooks. Provides reusable handlers for Biome, Markdown, YAML, TypeScript, and more.",
|
|
6
6
|
"keywords": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"types": "./index.d.ts",
|
|
35
35
|
"import": "./index.js"
|
|
36
36
|
},
|
|
37
|
-
"./biome/silk.jsonc": "./silk.jsonc"
|
|
37
|
+
"./biome/silk.jsonc": "./biome/silk.jsonc"
|
|
38
38
|
},
|
|
39
39
|
"bin": {
|
|
40
40
|
"savvy-lint": "./bin/savvy-lint.js"
|