pickier 0.1.14 → 0.1.15
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/dist/bin/cli.js +30 -3
- package/dist/src/index.js +29 -2
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -5996,10 +5996,13 @@ var init_config = __esm(async () => {
|
|
|
5996
5996
|
"**/.claude/**",
|
|
5997
5997
|
"**/.github/**",
|
|
5998
5998
|
"**/*.test.ts",
|
|
5999
|
-
"**/*.spec.ts"
|
|
5999
|
+
"**/*.spec.ts",
|
|
6000
|
+
"**/*.lock",
|
|
6001
|
+
"**/package-lock.json",
|
|
6002
|
+
"**/pnpm-lock.yaml"
|
|
6000
6003
|
],
|
|
6001
6004
|
lint: {
|
|
6002
|
-
extensions: ["ts", "js", "html", "css", "json", "jsonc", "md", "yaml", "yml", "stx"
|
|
6005
|
+
extensions: ["ts", "js", "html", "css", "json", "jsonc", "md", "yaml", "yml", "stx"],
|
|
6003
6006
|
reporter: "stylish",
|
|
6004
6007
|
cache: false,
|
|
6005
6008
|
maxWarnings: -1
|
|
@@ -17233,10 +17236,17 @@ var init_blanks_around_headings = __esm(() => {
|
|
|
17233
17236
|
check: (text, ctx) => {
|
|
17234
17237
|
const issues = [];
|
|
17235
17238
|
const lines = text.split(/\r?\n/);
|
|
17239
|
+
let inFencedCodeBlock = false;
|
|
17236
17240
|
for (let i = 0;i < lines.length; i++) {
|
|
17237
17241
|
const line = lines[i];
|
|
17238
17242
|
const prevLine = i > 0 ? lines[i - 1] : "";
|
|
17239
17243
|
const nextLine = i + 1 < lines.length ? lines[i + 1] : "";
|
|
17244
|
+
if (/^(`{3,}|~{3,})/.test(line.trim())) {
|
|
17245
|
+
inFencedCodeBlock = !inFencedCodeBlock;
|
|
17246
|
+
continue;
|
|
17247
|
+
}
|
|
17248
|
+
if (inFencedCodeBlock)
|
|
17249
|
+
continue;
|
|
17240
17250
|
const isAtxHeading = /^#{1,6}\s/.test(line);
|
|
17241
17251
|
const isSetextHeading = i + 1 < lines.length && /^(=+|-+)\s*$/.test(nextLine) && line.trim().length > 0;
|
|
17242
17252
|
if (isAtxHeading) {
|
|
@@ -17290,10 +17300,20 @@ var init_blanks_around_headings = __esm(() => {
|
|
|
17290
17300
|
fix: (text) => {
|
|
17291
17301
|
const lines = text.split(/\r?\n/);
|
|
17292
17302
|
const result = [];
|
|
17303
|
+
let inFencedCodeBlock = false;
|
|
17293
17304
|
for (let i = 0;i < lines.length; i++) {
|
|
17294
17305
|
const line = lines[i];
|
|
17295
17306
|
const prevLine = i > 0 ? lines[i - 1] : "";
|
|
17296
17307
|
const nextLine = i + 1 < lines.length ? lines[i + 1] : "";
|
|
17308
|
+
if (/^(`{3,}|~{3,})/.test(line.trim())) {
|
|
17309
|
+
inFencedCodeBlock = !inFencedCodeBlock;
|
|
17310
|
+
result.push(line);
|
|
17311
|
+
continue;
|
|
17312
|
+
}
|
|
17313
|
+
if (inFencedCodeBlock) {
|
|
17314
|
+
result.push(line);
|
|
17315
|
+
continue;
|
|
17316
|
+
}
|
|
17297
17317
|
const isAtxHeading = /^#{1,6}\s/.test(line);
|
|
17298
17318
|
const isSetextHeading = i + 1 < lines.length && /^(=+|-+)\s*$/.test(nextLine) && line.trim().length > 0;
|
|
17299
17319
|
if (isAtxHeading || isSetextHeading) {
|
|
@@ -19452,9 +19472,16 @@ var init_single_title = __esm(() => {
|
|
|
19452
19472
|
const issues = [];
|
|
19453
19473
|
const lines = text.split(/\r?\n/);
|
|
19454
19474
|
let firstH1Line = -1;
|
|
19475
|
+
let inFencedCodeBlock = false;
|
|
19455
19476
|
for (let i = 0;i < lines.length; i++) {
|
|
19456
19477
|
const line = lines[i];
|
|
19457
19478
|
const nextLine = i + 1 < lines.length ? lines[i + 1] : "";
|
|
19479
|
+
if (/^(`{3,}|~{3,})/.test(line.trim())) {
|
|
19480
|
+
inFencedCodeBlock = !inFencedCodeBlock;
|
|
19481
|
+
continue;
|
|
19482
|
+
}
|
|
19483
|
+
if (inFencedCodeBlock)
|
|
19484
|
+
continue;
|
|
19458
19485
|
let isH1 = false;
|
|
19459
19486
|
if (/^#\s/.test(line)) {
|
|
19460
19487
|
isH1 = true;
|
|
@@ -32419,7 +32446,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
32419
32446
|
module.exports = {
|
|
32420
32447
|
name: "pickier",
|
|
32421
32448
|
type: "module",
|
|
32422
|
-
version: "0.1.
|
|
32449
|
+
version: "0.1.15",
|
|
32423
32450
|
description: "Format, lint and more in a fraction of seconds.",
|
|
32424
32451
|
author: "Chris Breuer <chris@stacksjs.org>",
|
|
32425
32452
|
license: "MIT",
|
package/dist/src/index.js
CHANGED
|
@@ -5120,10 +5120,13 @@ var init_config = __esm(async () => {
|
|
|
5120
5120
|
"**/.claude/**",
|
|
5121
5121
|
"**/.github/**",
|
|
5122
5122
|
"**/*.test.ts",
|
|
5123
|
-
"**/*.spec.ts"
|
|
5123
|
+
"**/*.spec.ts",
|
|
5124
|
+
"**/*.lock",
|
|
5125
|
+
"**/package-lock.json",
|
|
5126
|
+
"**/pnpm-lock.yaml"
|
|
5124
5127
|
],
|
|
5125
5128
|
lint: {
|
|
5126
|
-
extensions: ["ts", "js", "html", "css", "json", "jsonc", "md", "yaml", "yml", "stx"
|
|
5129
|
+
extensions: ["ts", "js", "html", "css", "json", "jsonc", "md", "yaml", "yml", "stx"],
|
|
5127
5130
|
reporter: "stylish",
|
|
5128
5131
|
cache: false,
|
|
5129
5132
|
maxWarnings: -1
|
|
@@ -16882,10 +16885,17 @@ var init_blanks_around_headings = __esm(() => {
|
|
|
16882
16885
|
check: (text, ctx) => {
|
|
16883
16886
|
const issues = [];
|
|
16884
16887
|
const lines = text.split(/\r?\n/);
|
|
16888
|
+
let inFencedCodeBlock = false;
|
|
16885
16889
|
for (let i = 0;i < lines.length; i++) {
|
|
16886
16890
|
const line = lines[i];
|
|
16887
16891
|
const prevLine = i > 0 ? lines[i - 1] : "";
|
|
16888
16892
|
const nextLine = i + 1 < lines.length ? lines[i + 1] : "";
|
|
16893
|
+
if (/^(`{3,}|~{3,})/.test(line.trim())) {
|
|
16894
|
+
inFencedCodeBlock = !inFencedCodeBlock;
|
|
16895
|
+
continue;
|
|
16896
|
+
}
|
|
16897
|
+
if (inFencedCodeBlock)
|
|
16898
|
+
continue;
|
|
16889
16899
|
const isAtxHeading = /^#{1,6}\s/.test(line);
|
|
16890
16900
|
const isSetextHeading = i + 1 < lines.length && /^(=+|-+)\s*$/.test(nextLine) && line.trim().length > 0;
|
|
16891
16901
|
if (isAtxHeading) {
|
|
@@ -16939,10 +16949,20 @@ var init_blanks_around_headings = __esm(() => {
|
|
|
16939
16949
|
fix: (text) => {
|
|
16940
16950
|
const lines = text.split(/\r?\n/);
|
|
16941
16951
|
const result = [];
|
|
16952
|
+
let inFencedCodeBlock = false;
|
|
16942
16953
|
for (let i = 0;i < lines.length; i++) {
|
|
16943
16954
|
const line = lines[i];
|
|
16944
16955
|
const prevLine = i > 0 ? lines[i - 1] : "";
|
|
16945
16956
|
const nextLine = i + 1 < lines.length ? lines[i + 1] : "";
|
|
16957
|
+
if (/^(`{3,}|~{3,})/.test(line.trim())) {
|
|
16958
|
+
inFencedCodeBlock = !inFencedCodeBlock;
|
|
16959
|
+
result.push(line);
|
|
16960
|
+
continue;
|
|
16961
|
+
}
|
|
16962
|
+
if (inFencedCodeBlock) {
|
|
16963
|
+
result.push(line);
|
|
16964
|
+
continue;
|
|
16965
|
+
}
|
|
16946
16966
|
const isAtxHeading = /^#{1,6}\s/.test(line);
|
|
16947
16967
|
const isSetextHeading = i + 1 < lines.length && /^(=+|-+)\s*$/.test(nextLine) && line.trim().length > 0;
|
|
16948
16968
|
if (isAtxHeading || isSetextHeading) {
|
|
@@ -19101,9 +19121,16 @@ var init_single_title = __esm(() => {
|
|
|
19101
19121
|
const issues = [];
|
|
19102
19122
|
const lines = text.split(/\r?\n/);
|
|
19103
19123
|
let firstH1Line = -1;
|
|
19124
|
+
let inFencedCodeBlock = false;
|
|
19104
19125
|
for (let i = 0;i < lines.length; i++) {
|
|
19105
19126
|
const line = lines[i];
|
|
19106
19127
|
const nextLine = i + 1 < lines.length ? lines[i + 1] : "";
|
|
19128
|
+
if (/^(`{3,}|~{3,})/.test(line.trim())) {
|
|
19129
|
+
inFencedCodeBlock = !inFencedCodeBlock;
|
|
19130
|
+
continue;
|
|
19131
|
+
}
|
|
19132
|
+
if (inFencedCodeBlock)
|
|
19133
|
+
continue;
|
|
19107
19134
|
let isH1 = false;
|
|
19108
19135
|
if (/^#\s/.test(line)) {
|
|
19109
19136
|
isH1 = true;
|