pickier 0.1.20 → 0.1.22

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.
Files changed (294) hide show
  1. package/README.md +80 -459
  2. package/dist/ast.d.ts +4 -15
  3. package/dist/bin/cli.js +22521 -17217
  4. package/dist/config.d.ts +1 -1
  5. package/dist/format.d.ts +1 -1
  6. package/dist/formatter.d.ts +1 -1
  7. package/dist/index.d.ts +2 -2
  8. package/dist/linter.d.ts +3 -3
  9. package/dist/plugins/eslint.d.ts +1 -1
  10. package/dist/plugins/general.d.ts +1 -1
  11. package/dist/plugins/index.d.ts +1 -1
  12. package/dist/plugins/lockfile.d.ts +1 -1
  13. package/dist/plugins/markdown.d.ts +1 -1
  14. package/dist/plugins/node.d.ts +1 -1
  15. package/dist/plugins/perfectionist.d.ts +1 -1
  16. package/dist/plugins/pickier.d.ts +1 -1
  17. package/dist/plugins/publint.d.ts +1 -2
  18. package/dist/plugins/quality.d.ts +1 -1
  19. package/dist/plugins/regexp.d.ts +1 -1
  20. package/dist/plugins/shell.d.ts +2 -0
  21. package/dist/plugins/spell.d.ts +3 -0
  22. package/dist/plugins/style.d.ts +1 -1
  23. package/dist/plugins/ts.d.ts +1 -1
  24. package/dist/plugins/unused-imports.d.ts +1 -1
  25. package/dist/plugins/utils.d.ts +2 -1
  26. package/dist/rules/general/_template-tracking.d.ts +31 -0
  27. package/dist/rules/general/array-callback-return.d.ts +1 -1
  28. package/dist/rules/general/constructor-super.d.ts +1 -1
  29. package/dist/rules/general/for-direction.d.ts +1 -1
  30. package/dist/rules/general/getter-return.d.ts +1 -1
  31. package/dist/rules/general/no-async-promise-executor.d.ts +1 -1
  32. package/dist/rules/general/no-compare-neg-zero.d.ts +1 -1
  33. package/dist/rules/general/no-cond-assign.d.ts +1 -1
  34. package/dist/rules/general/no-const-assign.d.ts +1 -1
  35. package/dist/rules/general/no-constant-condition.d.ts +1 -1
  36. package/dist/rules/general/no-constructor-return.d.ts +1 -1
  37. package/dist/rules/general/no-dupe-class-members.d.ts +1 -1
  38. package/dist/rules/general/no-dupe-keys.d.ts +1 -1
  39. package/dist/rules/general/no-duplicate-case.d.ts +1 -1
  40. package/dist/rules/general/no-empty-pattern.d.ts +1 -1
  41. package/dist/rules/general/no-fallthrough.d.ts +1 -1
  42. package/dist/rules/general/no-irregular-whitespace.d.ts +1 -1
  43. package/dist/rules/general/no-loss-of-precision.d.ts +1 -1
  44. package/dist/rules/general/no-new.d.ts +1 -1
  45. package/dist/rules/general/no-promise-executor-return.d.ts +1 -1
  46. package/dist/rules/general/no-redeclare.d.ts +1 -1
  47. package/dist/rules/general/no-regex-spaces.d.ts +1 -1
  48. package/dist/rules/general/no-self-assign.d.ts +1 -1
  49. package/dist/rules/general/no-self-compare.d.ts +1 -1
  50. package/dist/rules/general/no-sparse-arrays.d.ts +1 -1
  51. package/dist/rules/general/no-undef.d.ts +1 -1
  52. package/dist/rules/general/no-unreachable.d.ts +1 -1
  53. package/dist/rules/general/no-unsafe-negation.d.ts +1 -1
  54. package/dist/rules/general/no-unused-vars.d.ts +1 -1
  55. package/dist/rules/general/no-useless-catch.d.ts +1 -1
  56. package/dist/rules/general/prefer-const.d.ts +1 -1
  57. package/dist/rules/general/prefer-object-spread.d.ts +1 -1
  58. package/dist/rules/general/prefer-template.d.ts +1 -1
  59. package/dist/rules/general/use-isnan.d.ts +1 -1
  60. package/dist/rules/general/valid-typeof.d.ts +1 -1
  61. package/dist/rules/imports/first.d.ts +1 -1
  62. package/dist/rules/imports/import-dedupe.d.ts +1 -1
  63. package/dist/rules/imports/named.d.ts +1 -1
  64. package/dist/rules/imports/no-cycle.d.ts +1 -1
  65. package/dist/rules/imports/no-duplicate-imports.d.ts +1 -1
  66. package/dist/rules/imports/no-import-dist.d.ts +1 -1
  67. package/dist/rules/imports/no-import-node-modules-by-path.d.ts +1 -1
  68. package/dist/rules/imports/no-unresolved.d.ts +1 -1
  69. package/dist/rules/lockfile/index.d.ts +1 -1
  70. package/dist/rules/lockfile/parser.d.ts +1 -1
  71. package/dist/rules/lockfile/validate-host.d.ts +1 -2
  72. package/dist/rules/lockfile/validate-https.d.ts +1 -1
  73. package/dist/rules/lockfile/validate-integrity.d.ts +1 -1
  74. package/dist/rules/lockfile/validate-package-names.d.ts +1 -1
  75. package/dist/rules/lockfile/validate-scheme.d.ts +1 -1
  76. package/dist/rules/markdown/_fence-tracking.d.ts +32 -0
  77. package/dist/rules/markdown/_shared.d.ts +9 -0
  78. package/dist/rules/markdown/blanks-around-fences.d.ts +1 -1
  79. package/dist/rules/markdown/blanks-around-headings.d.ts +1 -1
  80. package/dist/rules/markdown/blanks-around-lists.d.ts +1 -1
  81. package/dist/rules/markdown/blanks-around-tables.d.ts +1 -1
  82. package/dist/rules/markdown/code-block-style.d.ts +1 -1
  83. package/dist/rules/markdown/code-fence-style.d.ts +1 -1
  84. package/dist/rules/markdown/commands-show-output.d.ts +1 -1
  85. package/dist/rules/markdown/descriptive-link-text.d.ts +1 -1
  86. package/dist/rules/markdown/emphasis-style.d.ts +1 -1
  87. package/dist/rules/markdown/fenced-code-language.d.ts +1 -1
  88. package/dist/rules/markdown/first-line-heading.d.ts +1 -1
  89. package/dist/rules/markdown/heading-increment.d.ts +1 -1
  90. package/dist/rules/markdown/heading-start-left.d.ts +1 -1
  91. package/dist/rules/markdown/heading-style.d.ts +1 -1
  92. package/dist/rules/markdown/hr-style.d.ts +1 -1
  93. package/dist/rules/markdown/line-length.d.ts +1 -1
  94. package/dist/rules/markdown/link-fragments.d.ts +1 -1
  95. package/dist/rules/markdown/link-image-reference-definitions.d.ts +1 -1
  96. package/dist/rules/markdown/link-image-style.d.ts +1 -1
  97. package/dist/rules/markdown/list-indent.d.ts +1 -1
  98. package/dist/rules/markdown/list-marker-space.d.ts +1 -1
  99. package/dist/rules/markdown/no-alt-text.d.ts +1 -1
  100. package/dist/rules/markdown/no-bare-urls.d.ts +1 -1
  101. package/dist/rules/markdown/no-blanks-blockquote.d.ts +1 -1
  102. package/dist/rules/markdown/no-duplicate-heading.d.ts +1 -1
  103. package/dist/rules/markdown/no-emphasis-as-heading.d.ts +5 -1
  104. package/dist/rules/markdown/no-empty-links.d.ts +1 -1
  105. package/dist/rules/markdown/no-hard-tabs.d.ts +1 -1
  106. package/dist/rules/markdown/no-inline-html.d.ts +1 -1
  107. package/dist/rules/markdown/no-missing-space-atx.d.ts +1 -1
  108. package/dist/rules/markdown/no-missing-space-closed-atx.d.ts +1 -1
  109. package/dist/rules/markdown/no-multiple-blanks.d.ts +1 -1
  110. package/dist/rules/markdown/no-multiple-space-atx.d.ts +1 -1
  111. package/dist/rules/markdown/no-multiple-space-blockquote.d.ts +1 -1
  112. package/dist/rules/markdown/no-multiple-space-closed-atx.d.ts +1 -1
  113. package/dist/rules/markdown/no-reversed-links.d.ts +1 -1
  114. package/dist/rules/markdown/no-space-in-code.d.ts +1 -1
  115. package/dist/rules/markdown/no-space-in-emphasis.d.ts +1 -1
  116. package/dist/rules/markdown/no-space-in-links.d.ts +1 -1
  117. package/dist/rules/markdown/no-trailing-punctuation.d.ts +1 -1
  118. package/dist/rules/markdown/no-trailing-spaces.d.ts +1 -1
  119. package/dist/rules/markdown/ol-prefix.d.ts +1 -1
  120. package/dist/rules/markdown/proper-names.d.ts +1 -1
  121. package/dist/rules/markdown/reference-links-images.d.ts +10 -1
  122. package/dist/rules/markdown/required-headings.d.ts +1 -1
  123. package/dist/rules/markdown/single-title.d.ts +1 -1
  124. package/dist/rules/markdown/single-trailing-newline.d.ts +1 -1
  125. package/dist/rules/markdown/strong-style.d.ts +1 -1
  126. package/dist/rules/markdown/table-column-count.d.ts +1 -1
  127. package/dist/rules/markdown/table-column-style.d.ts +1 -1
  128. package/dist/rules/markdown/table-pipe-style.d.ts +1 -1
  129. package/dist/rules/markdown/ul-indent.d.ts +10 -1
  130. package/dist/rules/markdown/ul-style.d.ts +1 -1
  131. package/dist/rules/node/prefer-global-buffer.d.ts +1 -1
  132. package/dist/rules/node/prefer-global-process.d.ts +1 -1
  133. package/dist/rules/publint/bin-file-not-executable.d.ts +1 -1
  134. package/dist/rules/publint/deprecated-field-jsnext.d.ts +1 -1
  135. package/dist/rules/publint/exports-default-should-be-last.d.ts +1 -1
  136. package/dist/rules/publint/exports-fallback-array-use.d.ts +1 -1
  137. package/dist/rules/publint/exports-missing-root-entrypoint.d.ts +1 -1
  138. package/dist/rules/publint/exports-module-should-be-esm.d.ts +1 -1
  139. package/dist/rules/publint/exports-module-should-precede-require.d.ts +1 -1
  140. package/dist/rules/publint/exports-types-should-be-first.d.ts +1 -1
  141. package/dist/rules/publint/exports-value-invalid.d.ts +1 -1
  142. package/dist/rules/publint/field-invalid-value-type.d.ts +1 -1
  143. package/dist/rules/publint/file-does-not-exist.d.ts +1 -1
  144. package/dist/rules/publint/file-invalid-format.d.ts +1 -1
  145. package/dist/rules/publint/has-module-but-no-exports.d.ts +1 -1
  146. package/dist/rules/publint/imports-default-should-be-last.d.ts +1 -1
  147. package/dist/rules/publint/imports-key-invalid.d.ts +1 -1
  148. package/dist/rules/publint/imports-module-should-precede-require.d.ts +1 -1
  149. package/dist/rules/publint/imports-value-invalid.d.ts +1 -1
  150. package/dist/rules/publint/index.d.ts +13 -11
  151. package/dist/rules/publint/local-dependency.d.ts +1 -1
  152. package/dist/rules/publint/module-should-be-esm.d.ts +1 -1
  153. package/dist/rules/publint/use-type.d.ts +1 -1
  154. package/dist/rules/publint/utils.d.ts +2 -2
  155. package/dist/rules/quality/complexity.d.ts +1 -1
  156. package/dist/rules/quality/default-case.d.ts +1 -1
  157. package/dist/rules/quality/eqeqeq.d.ts +1 -1
  158. package/dist/rules/quality/max-depth.d.ts +1 -1
  159. package/dist/rules/quality/max-lines-per-function.d.ts +1 -1
  160. package/dist/rules/quality/no-alert.d.ts +1 -1
  161. package/dist/rules/quality/no-await-in-loop.d.ts +1 -1
  162. package/dist/rules/quality/no-caller.d.ts +1 -1
  163. package/dist/rules/quality/no-case-declarations.d.ts +1 -1
  164. package/dist/rules/quality/no-else-return.d.ts +1 -1
  165. package/dist/rules/quality/no-empty-function.d.ts +1 -1
  166. package/dist/rules/quality/no-empty.d.ts +1 -1
  167. package/dist/rules/quality/no-eval.d.ts +1 -1
  168. package/dist/rules/quality/no-extend-native.d.ts +1 -1
  169. package/dist/rules/quality/no-extra-boolean-cast.d.ts +1 -1
  170. package/dist/rules/quality/no-global-assign.d.ts +1 -1
  171. package/dist/rules/quality/no-implied-eval.d.ts +1 -1
  172. package/dist/rules/quality/no-iterator.d.ts +1 -1
  173. package/dist/rules/quality/no-lonely-if.d.ts +1 -1
  174. package/dist/rules/quality/no-new-func.d.ts +1 -1
  175. package/dist/rules/quality/no-new-wrappers.d.ts +1 -1
  176. package/dist/rules/quality/no-new.d.ts +1 -1
  177. package/dist/rules/quality/no-octal.d.ts +1 -1
  178. package/dist/rules/quality/no-param-reassign.d.ts +1 -1
  179. package/dist/rules/quality/no-proto.d.ts +1 -1
  180. package/dist/rules/quality/no-return-assign.d.ts +1 -1
  181. package/dist/rules/quality/no-sequences.d.ts +1 -1
  182. package/dist/rules/quality/no-shadow.d.ts +1 -1
  183. package/dist/rules/quality/no-throw-literal.d.ts +1 -1
  184. package/dist/rules/quality/no-use-before-define.d.ts +1 -1
  185. package/dist/rules/quality/no-useless-call.d.ts +1 -1
  186. package/dist/rules/quality/no-useless-concat.d.ts +1 -1
  187. package/dist/rules/quality/no-useless-escape.d.ts +1 -1
  188. package/dist/rules/quality/no-useless-rename.d.ts +1 -1
  189. package/dist/rules/quality/no-useless-return.d.ts +1 -1
  190. package/dist/rules/quality/no-var.d.ts +1 -1
  191. package/dist/rules/quality/no-with.d.ts +1 -1
  192. package/dist/rules/quality/prefer-arrow-callback.d.ts +1 -1
  193. package/dist/rules/quality/require-await.d.ts +1 -1
  194. package/dist/rules/regexp/no-super-linear-backtracking.d.ts +1 -1
  195. package/dist/rules/regexp/no-unused-capturing-group.d.ts +1 -1
  196. package/dist/rules/regexp/no-useless-lazy.d.ts +1 -1
  197. package/dist/rules/shell/_shared.d.ts +24 -0
  198. package/dist/rules/shell/command-substitution.d.ts +6 -0
  199. package/dist/rules/shell/consistent-case-terminators.d.ts +9 -0
  200. package/dist/rules/shell/function-style.d.ts +6 -0
  201. package/dist/rules/shell/heredoc-indent.d.ts +7 -0
  202. package/dist/rules/shell/indent.d.ts +2 -0
  203. package/dist/rules/shell/keyword-spacing.d.ts +10 -0
  204. package/dist/rules/shell/no-broken-redirect.d.ts +7 -0
  205. package/dist/rules/shell/no-cd-without-check.d.ts +6 -0
  206. package/dist/rules/shell/no-eval.d.ts +6 -0
  207. package/dist/rules/shell/no-exit-in-subshell.d.ts +7 -0
  208. package/dist/rules/shell/no-ls-parsing.d.ts +7 -0
  209. package/dist/rules/shell/no-trailing-semicolons.d.ts +6 -0
  210. package/dist/rules/shell/no-trailing-whitespace.d.ts +5 -0
  211. package/dist/rules/shell/no-useless-cat.d.ts +6 -0
  212. package/dist/rules/shell/no-variable-in-single-quotes.d.ts +7 -0
  213. package/dist/rules/shell/operator-spacing.d.ts +11 -0
  214. package/dist/rules/shell/prefer-double-brackets.d.ts +6 -0
  215. package/dist/rules/shell/prefer-printf.d.ts +6 -0
  216. package/dist/rules/shell/quote-variables.d.ts +2 -0
  217. package/dist/rules/shell/set-options.d.ts +8 -0
  218. package/dist/rules/shell/shebang.d.ts +2 -0
  219. package/dist/rules/sort/exports.d.ts +1 -1
  220. package/dist/rules/sort/heritage-clauses.d.ts +1 -1
  221. package/dist/rules/sort/imports.d.ts +1 -1
  222. package/dist/rules/sort/keys.d.ts +1 -1
  223. package/dist/rules/sort/named-imports.d.ts +1 -1
  224. package/dist/rules/sort/objects.d.ts +1 -1
  225. package/dist/rules/sort/tailwind-classes.d.ts +5 -0
  226. package/dist/rules/style/array-bracket-spacing.d.ts +1 -1
  227. package/dist/rules/style/arrow-parens.d.ts +1 -1
  228. package/dist/rules/style/arrow-spacing.d.ts +1 -1
  229. package/dist/rules/style/block-spacing.d.ts +1 -1
  230. package/dist/rules/style/brace-style.d.ts +1 -1
  231. package/dist/rules/style/comma-dangle.d.ts +1 -1
  232. package/dist/rules/style/comma-spacing.d.ts +1 -1
  233. package/dist/rules/style/comma-style.d.ts +1 -1
  234. package/dist/rules/style/computed-property-spacing.d.ts +1 -1
  235. package/dist/rules/style/consistent-chaining.d.ts +1 -1
  236. package/dist/rules/style/consistent-list-newline.d.ts +1 -1
  237. package/dist/rules/style/curly.d.ts +1 -1
  238. package/dist/rules/style/dot-location.d.ts +1 -1
  239. package/dist/rules/style/function-call-spacing.d.ts +1 -1
  240. package/dist/rules/style/generator-star-spacing.d.ts +1 -1
  241. package/dist/rules/style/if-newline.d.ts +1 -1
  242. package/dist/rules/style/indent-binary-ops.d.ts +1 -1
  243. package/dist/rules/style/indent-unindent.d.ts +1 -1
  244. package/dist/rules/style/key-spacing.d.ts +1 -1
  245. package/dist/rules/style/keyword-spacing.d.ts +1 -1
  246. package/dist/rules/style/lines-between-class-members.d.ts +1 -1
  247. package/dist/rules/style/max-statements-per-line.d.ts +1 -1
  248. package/dist/rules/style/multiline-ternary.d.ts +1 -1
  249. package/dist/rules/style/new-parens.d.ts +1 -1
  250. package/dist/rules/style/no-extra-parens.d.ts +1 -1
  251. package/dist/rules/style/no-floating-decimal.d.ts +1 -1
  252. package/dist/rules/style/no-mixed-operators.d.ts +1 -1
  253. package/dist/rules/style/no-mixed-spaces-and-tabs.d.ts +1 -1
  254. package/dist/rules/style/no-multi-spaces.d.ts +1 -1
  255. package/dist/rules/style/no-multiple-empty-lines.d.ts +1 -1
  256. package/dist/rules/style/no-tabs.d.ts +1 -1
  257. package/dist/rules/style/no-trailing-spaces.d.ts +1 -1
  258. package/dist/rules/style/no-whitespace-before-property.d.ts +1 -1
  259. package/dist/rules/style/object-curly-spacing.d.ts +1 -1
  260. package/dist/rules/style/operator-linebreak.d.ts +1 -1
  261. package/dist/rules/style/padded-blocks.d.ts +1 -1
  262. package/dist/rules/style/quote-props.d.ts +1 -1
  263. package/dist/rules/style/rest-spread-spacing.d.ts +1 -1
  264. package/dist/rules/style/semi-spacing.d.ts +1 -1
  265. package/dist/rules/style/space-before-blocks.d.ts +1 -1
  266. package/dist/rules/style/space-before-function-paren.d.ts +1 -1
  267. package/dist/rules/style/space-in-parens.d.ts +1 -1
  268. package/dist/rules/style/space-infix-ops.d.ts +1 -1
  269. package/dist/rules/style/space-unary-ops.d.ts +1 -1
  270. package/dist/rules/style/spaced-comment.d.ts +1 -1
  271. package/dist/rules/style/switch-colon-spacing.d.ts +1 -1
  272. package/dist/rules/style/template-curly-spacing.d.ts +1 -1
  273. package/dist/rules/style/template-tag-spacing.d.ts +1 -1
  274. package/dist/rules/style/top-level-function.d.ts +1 -1
  275. package/dist/rules/style/wrap-iife.d.ts +1 -1
  276. package/dist/rules/style/yield-star-spacing.d.ts +1 -1
  277. package/dist/rules/ts/member-delimiter-style.d.ts +1 -1
  278. package/dist/rules/ts/no-explicit-any.d.ts +1 -1
  279. package/dist/rules/ts/no-floating-promises.d.ts +1 -1
  280. package/dist/rules/ts/no-misused-promises.d.ts +1 -1
  281. package/dist/rules/ts/no-require-imports.d.ts +1 -1
  282. package/dist/rules/ts/no-top-level-await.d.ts +1 -1
  283. package/dist/rules/ts/no-ts-export-equal.d.ts +1 -1
  284. package/dist/rules/ts/no-unsafe-assignment.d.ts +1 -1
  285. package/dist/rules/ts/prefer-nullish-coalescing.d.ts +1 -1
  286. package/dist/rules/ts/prefer-optional-chain.d.ts +1 -1
  287. package/dist/rules/ts/type-annotation-spacing.d.ts +1 -1
  288. package/dist/rules/ts/type-generic-spacing.d.ts +1 -1
  289. package/dist/rules/ts/type-named-tuple-spacing.d.ts +1 -1
  290. package/dist/run.d.ts +1 -1
  291. package/dist/src/index.js +20387 -17154
  292. package/dist/types.d.ts +21 -4
  293. package/dist/utils.d.ts +36 -11
  294. package/package.json +16 -8
package/dist/config.d.ts CHANGED
@@ -2,4 +2,4 @@ import type { PickierConfig } from './types';
2
2
  export declare function getConfig(): Promise<PickierConfig>;
3
3
  export declare const defaultConfig: PickierConfig;
4
4
  // For backwards compatibility - synchronous access with default fallback
5
- export declare const config: PickierConfig;
5
+ export declare const config: PickierConfig;
package/dist/format.d.ts CHANGED
@@ -3,4 +3,4 @@ export declare function formatCode(src: string, cfg: PickierConfig, filePath: st
3
3
  export declare function detectQuoteIssues(line: string, preferred: 'single' | 'double'): number[];
4
4
  export declare function hasIndentIssue(leading: string, indentSize: number, indentStyle?: 'spaces' | 'tabs', lineContent?: string): boolean;
5
5
  export declare function formatImports(source: string): string;
6
- declare type ImportKind = 'value' | 'type' | 'side-effect'
6
+ declare type ImportKind = 'value' | 'type' | 'side-effect';
@@ -3,4 +3,4 @@ export declare function applyPluginFixes(filePath: string, content: string, cfg:
3
3
  export declare function applyFixes(filePath: string, content: string, cfg: PickierConfig): string;
4
4
  export declare function formatVerbose(issues: LintIssue[]): string;
5
5
  export declare function formatStylish(issues: LintIssue[]): string;
6
- export declare function runFormat(globs: string[], options: FormatOptions): Promise<number>;
6
+ export declare function runFormat(globs: string[], options: FormatOptions): Promise<number>;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export type { RunOptions } from './run';
2
2
  export { config, defaultConfig } from './config';
3
3
  export * from './format';
4
- export { runFormat } from './formatter';
5
4
  export { lintText, runLint, runLintProgrammatic } from './linter';
5
+ export { runFormat } from './formatter';
6
6
  export { runUnified as run } from './run';
7
7
  export * from './types';
8
- export * from './utils';
8
+ export * from './utils';
package/dist/linter.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { LintIssue, LintOptions, PickierConfig } from './types';
2
2
  // Programmatic single-text lint with optional cancellation
3
- export declare function lintText(text: string, cfg: PickierConfig, filePath?: any, signal?: AbortSignal): Promise<LintIssue[]>;
3
+ export declare function lintText(text: string, cfg: PickierConfig, filePath?: string, signal?: AbortSignal): Promise<LintIssue[]>;
4
4
  // Programmatic batch lint returning structured result, with optional cancellation
5
5
  export declare function runLintProgrammatic(globs: string[], options: LintOptions, signal?: AbortSignal): Promise<{ errors: number, warnings: number, issues: LintIssue[] }>;
6
- export declare function applyPlugins(filePath: string, content: string, cfg: PickierConfig): Promise<Array<any>>;
6
+ export declare function applyPlugins(filePath: string, content: string, cfg: PickierConfig): Promise<Array<any>> /* PluginLintIssue[] */;
7
7
  // Optimized version that accepts pre-computed directive and comment data
8
8
  export declare function scanContentOptimized(filePath: string, content: string, cfg: PickierConfig, suppress: DisableDirectives, commentLines: Set<number>): LintIssue[];
9
9
  export declare function scanContent(filePath: string, content: string, cfg: PickierConfig): LintIssue[];
@@ -16,4 +16,4 @@ declare interface DisableDirectives {
16
16
  sortedDisableLines: number[]
17
17
  sortedEnableLines: number[]
18
18
  }
19
- declare type SuppressMap = Map<number, Set<string>>
19
+ declare type SuppressMap = Map<number, Set<string>>;
@@ -1,2 +1,2 @@
1
1
  import type { PickierPlugin } from '../types';
2
- export declare const eslintPlugin: PickierPlugin;
2
+ export declare const eslintPlugin: PickierPlugin;
@@ -1,2 +1,2 @@
1
1
  import type { PickierPlugin } from '../types';
2
- export declare const generalPlugin: PickierPlugin;
2
+ export declare const generalPlugin: PickierPlugin;
@@ -1,2 +1,2 @@
1
1
  import type { PickierPlugin } from '../types';
2
- export declare function getAllPlugins(): PickierPlugin[];
2
+ export declare function getAllPlugins(): PickierPlugin[];
@@ -19,4 +19,4 @@ import type { PickierPlugin } from '../types';
19
19
  * 4. Weak Integrity Hashes - Using SHA1/SHA256 instead of SHA512 (collision attacks)
20
20
  * 5. Unauthorized URL Schemes - Using file://, data://, git+http://, etc.
21
21
  */
22
- export declare const lockfilePlugin: PickierPlugin;
22
+ export declare const lockfilePlugin: PickierPlugin;
@@ -1,2 +1,2 @@
1
1
  import type { PickierPlugin } from '../types';
2
- export declare const markdownPlugin: PickierPlugin;
2
+ export declare const markdownPlugin: PickierPlugin;
@@ -1,2 +1,2 @@
1
1
  import type { PickierPlugin } from '../types';
2
- export declare const nodePlugin: PickierPlugin;
2
+ export declare const nodePlugin: PickierPlugin;
@@ -3,4 +3,4 @@ import type { PickierPlugin } from '../types';
3
3
  * Perfectionist plugin - provides compatibility with perfectionist ESLint plugin
4
4
  * These rules are aliases to existing Pickier rules under different namespaces
5
5
  */
6
- export declare const perfectionistPlugin: PickierPlugin;
6
+ export declare const perfectionistPlugin: PickierPlugin;
@@ -1,2 +1,2 @@
1
1
  import type { PickierPlugin } from '../types';
2
- export declare const pickierPlugin: PickierPlugin;
2
+ export declare const pickierPlugin: PickierPlugin;
@@ -1,4 +1,3 @@
1
- import { } from '../rules/publint';
2
1
  import type { PickierPlugin } from '../types';
3
2
  /**
4
3
  * publint plugin for pickier.
@@ -8,4 +7,4 @@ import type { PickierPlugin } from '../types';
8
7
  *
9
8
  * Ported from publint (https://publint.dev).
10
9
  */
11
- export declare const publintPlugin: PickierPlugin;
10
+ export declare const publintPlugin: PickierPlugin;
@@ -1,2 +1,2 @@
1
1
  import type { PickierPlugin } from '../types';
2
- export declare const qualityPlugin: PickierPlugin;
2
+ export declare const qualityPlugin: PickierPlugin;
@@ -1,2 +1,2 @@
1
1
  import type { PickierPlugin } from '../types';
2
- export declare const regexpPlugin: PickierPlugin;
2
+ export declare const regexpPlugin: PickierPlugin;
@@ -0,0 +1,2 @@
1
+ import type { PickierPlugin } from '../types';
2
+ export declare const shellPlugin: PickierPlugin;
@@ -0,0 +1,3 @@
1
+ import type { PickierPlugin } from '../types';
2
+ // ── Plugin export ───────────────────────────────────────────────
3
+ export declare const spellPlugin: PickierPlugin;
@@ -1,2 +1,2 @@
1
1
  import type { PickierPlugin } from '../types';
2
- export declare const stylePlugin: PickierPlugin;
2
+ export declare const stylePlugin: PickierPlugin;
@@ -1,2 +1,2 @@
1
1
  import type { PickierPlugin } from '../types';
2
- export declare const tsPlugin: PickierPlugin;
2
+ export declare const tsPlugin: PickierPlugin;
@@ -3,4 +3,4 @@ import type { PickierPlugin } from '../types';
3
3
  * unused-imports plugin - provides compatibility with unused-imports ESLint plugin
4
4
  * These rules are aliases to existing Pickier rules under different namespaces
5
5
  */
6
- export declare const unusedImportsPlugin: PickierPlugin;
6
+ export declare const unusedImportsPlugin: PickierPlugin;
@@ -1,3 +1,4 @@
1
1
  import type { RuleModule } from '../types';
2
2
  export declare function codeOnly(rule: RuleModule): RuleModule;
3
- export declare function packageJsonOnly(rule: RuleModule): RuleModule;
3
+ export declare function shellOnly(rule: RuleModule): RuleModule;
4
+ export declare function packageJsonOnly(rule: RuleModule): RuleModule;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Compute, for each line of a TS/JS source, whether the line begins inside
3
+ * a template-literal body (i.e. between an unclosed backtick and its
4
+ * matching close).
5
+ *
6
+ * Used by rules like `prefer-const` and `pickier/no-unused-vars` to skip
7
+ * generated code embedded in template strings — declarations and function
8
+ * bodies inside a `\`<script>...\`` blob aren't real top-level code, and
9
+ * applying lint rules to them produces false positives that fixers will
10
+ * happily turn into broken runtime code.
11
+ *
12
+ * Tracks: single-quoted strings, double-quoted strings, template-literal
13
+ * bodies + their `${}` expressions (with brace depth), regex literals
14
+ * (with character-class awareness), line and block comments.
15
+ *
16
+ * Regex-vs-division disambiguation uses the previous "significant"
17
+ * character on the logical statement: `/` after operators / punctuation
18
+ * starts a regex; `/` after an identifier or closing bracket is division.
19
+ */
20
+ export declare function computeLineStartsInTemplate(text: string): boolean[];
21
+ /**
22
+ * On a single line, return [start, end] ranges of characters that fall
23
+ * inside a backtick-bounded template literal. If a backtick opens but
24
+ * doesn't close on this line, the range extends to the line's end (it's
25
+ * the first line of a multi-line template).
26
+ *
27
+ * Used by per-line fixers to refuse to rewrite identifiers that fall
28
+ * inside an embedded code blob whose other usages live in the same
29
+ * template string and aren't visible to the syntactic rename.
30
+ */
31
+ export declare function backtickRangesOnLine(line: string): Array<[number, number]>;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const arrayCallbackReturnRule: RuleModule;
2
+ export declare const arrayCallbackReturnRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const constructorSuperRule: RuleModule;
2
+ export declare const constructorSuperRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const forDirectionRule: RuleModule;
2
+ export declare const forDirectionRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const getterReturnRule: RuleModule;
2
+ export declare const getterReturnRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noAsyncPromiseExecutorRule: RuleModule;
2
+ export declare const noAsyncPromiseExecutorRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noCompareNegZeroRule: RuleModule;
2
+ export declare const noCompareNegZeroRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noCondAssignRule: RuleModule;
2
+ export declare const noCondAssignRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noConstAssignRule: RuleModule;
2
+ export declare const noConstAssignRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noConstantConditionRule: RuleModule;
2
+ export declare const noConstantConditionRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noConstructorReturnRule: RuleModule;
2
+ export declare const noConstructorReturnRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noDupeClassMembersRule: RuleModule;
2
+ export declare const noDupeClassMembersRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noDupeKeysRule: RuleModule;
2
+ export declare const noDupeKeysRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noDuplicateCaseRule: RuleModule;
2
+ export declare const noDuplicateCaseRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noEmptyPatternRule: RuleModule;
2
+ export declare const noEmptyPatternRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noFallthroughRule: RuleModule;
2
+ export declare const noFallthroughRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noIrregularWhitespaceRule: RuleModule;
2
+ export declare const noIrregularWhitespaceRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noLossOfPrecisionRule: RuleModule;
2
+ export declare const noLossOfPrecisionRule: RuleModule;
@@ -10,4 +10,4 @@ import type { RuleModule } from '../../types';
10
10
  * - `const instance = new MyClass()`
11
11
  * - `return new MyClass()`
12
12
  */
13
- export declare const noNew: RuleModule;
13
+ export declare const noNew: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noPromiseExecutorReturnRule: RuleModule;
2
+ export declare const noPromiseExecutorReturnRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noRedeclareRule: RuleModule;
2
+ export declare const noRedeclareRule: RuleModule;
@@ -7,4 +7,4 @@ import type { RuleModule } from '../../types';
7
7
  * - `/foo bar/` (use /foo {2}bar/ instead)
8
8
  * - `/ +/` (multiple spaces)
9
9
  */
10
- export declare const noRegexSpaces: RuleModule;
10
+ export declare const noRegexSpaces: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noSelfAssignRule: RuleModule;
2
+ export declare const noSelfAssignRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noSelfCompareRule: RuleModule;
2
+ export declare const noSelfCompareRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noSparseArraysRule: RuleModule;
2
+ export declare const noSparseArraysRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noUndefRule: RuleModule;
2
+ export declare const noUndefRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noUnreachableRule: RuleModule;
2
+ export declare const noUnreachableRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noUnsafeNegationRule: RuleModule;
2
+ export declare const noUnsafeNegationRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noUnusedVarsRule: RuleModule;
2
+ export declare const noUnusedVarsRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noUselessCatchRule: RuleModule;
2
+ export declare const noUselessCatchRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const preferConstRule: RuleModule;
2
+ export declare const preferConstRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const preferObjectSpreadRule: RuleModule;
2
+ export declare const preferObjectSpreadRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const preferTemplate: RuleModule;
2
+ export declare const preferTemplate: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const useIsNaNRule: RuleModule;
2
+ export declare const useIsNaNRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const validTypeofRule: RuleModule;
2
+ export declare const validTypeofRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const firstRule: RuleModule;
2
+ export declare const firstRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const importDedupeRule: RuleModule;
2
+ export declare const importDedupeRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const namedRule: RuleModule;
2
+ export declare const namedRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noCycleRule: RuleModule;
2
+ export declare const noCycleRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noDuplicateImportsRule: RuleModule;
2
+ export declare const noDuplicateImportsRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noImportDistRule: RuleModule;
2
+ export declare const noImportDistRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noImportNodeModulesByPathRule: RuleModule;
2
+ export declare const noImportNodeModulesByPathRule: RuleModule;
@@ -1,2 +1,2 @@
1
1
  import type { RuleModule } from '../../types';
2
- export declare const noUnresolvedRule: RuleModule;
2
+ export declare const noUnresolvedRule: RuleModule;
@@ -3,4 +3,4 @@ export * from './validate-host';
3
3
  export * from './validate-https';
4
4
  export * from './validate-integrity';
5
5
  export * from './validate-package-names';
6
- export * from './validate-scheme';
6
+ export * from './validate-scheme';
@@ -76,4 +76,4 @@ export declare interface ParsedPackage {
76
76
  export declare interface ParsedLockfile {
77
77
  type: 'npm' | 'yarn' | 'yarn-berry' | 'bun'
78
78
  packages: Map<string, ParsedPackage>
79
- }
79
+ }
@@ -1,4 +1,3 @@
1
- import { } from './parser';
2
1
  import type { RuleModule } from '../../types';
3
2
  /**
4
3
  * Validate that all packages in a lockfile are from allowed hosts.
@@ -16,4 +15,4 @@ import type { RuleModule } from '../../types';
16
15
  * }
17
16
  * ```
18
17
  */
19
- export declare const validateHost: RuleModule;
18
+ export declare const validateHost: RuleModule;
@@ -11,4 +11,4 @@ import type { RuleModule } from '../../types';
11
11
  * }
12
12
  * ```
13
13
  */
14
- export declare const validateHttps: RuleModule;
14
+ export declare const validateHttps: RuleModule;
@@ -16,4 +16,4 @@ import type { RuleModule } from '../../types';
16
16
  * }
17
17
  * ```
18
18
  */
19
- export declare const validateIntegrity: RuleModule;
19
+ export declare const validateIntegrity: RuleModule;
@@ -20,4 +20,4 @@ import type { RuleModule } from '../../types';
20
20
  * }
21
21
  * ```
22
22
  */
23
- export declare const validatePackageNames: RuleModule;
23
+ export declare const validatePackageNames: RuleModule;
@@ -14,4 +14,4 @@ import type { RuleModule } from '../../types';
14
14
  * }
15
15
  * ```
16
16
  */
17
- export declare const validateScheme: RuleModule;
17
+ export declare const validateScheme: RuleModule;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * CommonMark-compliant code-block detection for markdown.
3
+ *
4
+ * Returns a Set of 0-indexed line numbers that are inside any code block —
5
+ * fenced (` ``` ... ``` ` / `~~~ ... ~~~`) or indented (4-space prefix). The
6
+ * fence boundary lines themselves are also included.
7
+ *
8
+ * Per the CommonMark spec, a fenced code block:
9
+ * - Opens with at least 3 backticks or tildes, optionally followed by an
10
+ * "info string" (e.g. ` ```js `).
11
+ * - Closes only with the SAME fence character, AT LEAST as many of them
12
+ * as the opener, and an EMPTY info string (just the run of backticks
13
+ * or tildes plus optional trailing whitespace).
14
+ * - Anything else inside the block — including ` ```js ` lines — is
15
+ * content, not a fence boundary.
16
+ *
17
+ * The naive tracker that toggles on every `^`{3,}|~{3,}` confuses
18
+ * `` ```js `` with a close and corrupts state for the rest of the file.
19
+ * Use this helper instead.
20
+ *
21
+ * Indented code blocks: a line is treated as inside an indented code block
22
+ * when it has 4+ leading spaces and the previous non-blank line is also
23
+ * indented (or blank with another indented line above it). Lines inside a
24
+ * fenced block don't double-count as indented.
25
+ */
26
+ export declare function getCodeBlockLines(lines: string[]): Set<number>;
27
+ /**
28
+ * Like `getCodeBlockLines` but returns whether a single line index is
29
+ * inside ANY kind of code block — handy for one-shot checks where you
30
+ * don't already have the set computed.
31
+ */
32
+ export declare function isInsideCodeBlock(lines: string[], targetIdx: number): boolean;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Identify genuine GFM table rows in a markdown document. A row counts as
3
+ * a table row when it is part of a block that includes a separator row of
4
+ * the form `|---|---|` (pipes + dashes, optional colons for alignment).
5
+ * Stray `|` characters inside paragraphs are ignored. Lines inside fenced
6
+ * or indented code blocks are ignored — `| Foo | Bar |` lines inside a
7
+ * `` ```markdown `` example are content, not real tables.
8
+ */
9
+ export declare function findTableRows(lines: string[]): Set<number>;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD031 - Fenced code blocks should be surrounded by blank lines
4
4
  */
5
- export declare const blanksAroundFencesRule: RuleModule;
5
+ export declare const blanksAroundFencesRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD022 - Headings should be surrounded by blank lines
4
4
  */
5
- export declare const blanksAroundHeadingsRule: RuleModule;
5
+ export declare const blanksAroundHeadingsRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD032 - Lists should be surrounded by blank lines
4
4
  */
5
- export declare const blanksAroundListsRule: RuleModule;
5
+ export declare const blanksAroundListsRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD058 - Tables should be surrounded by blank lines
4
4
  */
5
- export declare const blanksAroundTablesRule: RuleModule;
5
+ export declare const blanksAroundTablesRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD046 - Code block style
4
4
  */
5
- export declare const codeBlockStyleRule: RuleModule;
5
+ export declare const codeBlockStyleRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD048 - Code fence style
4
4
  */
5
- export declare const codeFenceStyleRule: RuleModule;
5
+ export declare const codeFenceStyleRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD014 - Dollar signs used before commands without showing output
4
4
  */
5
- export declare const commandsShowOutputRule: RuleModule;
5
+ export declare const commandsShowOutputRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD059 - Link text should be descriptive
4
4
  */
5
- export declare const descriptiveLinkTextRule: RuleModule;
5
+ export declare const descriptiveLinkTextRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD049 - Emphasis style
4
4
  */
5
- export declare const emphasisStyleRule: RuleModule;
5
+ export declare const emphasisStyleRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD040 - Fenced code blocks should have a language specified
4
4
  */
5
- export declare const fencedCodeLanguageRule: RuleModule;
5
+ export declare const fencedCodeLanguageRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD041 - First line in a file should be a top-level heading
4
4
  */
5
- export declare const firstLineHeadingRule: RuleModule;
5
+ export declare const firstLineHeadingRule: RuleModule;
@@ -2,4 +2,4 @@ import type { RuleModule } from '../../types';
2
2
  /**
3
3
  * MD001 - Heading levels should only increment by one level at a time
4
4
  */
5
- export declare const headingIncrementRule: RuleModule;
5
+ export declare const headingIncrementRule: RuleModule;