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.
- package/README.md +80 -459
- package/dist/ast.d.ts +4 -15
- package/dist/bin/cli.js +22521 -17217
- package/dist/config.d.ts +1 -1
- package/dist/format.d.ts +1 -1
- package/dist/formatter.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/linter.d.ts +3 -3
- package/dist/plugins/eslint.d.ts +1 -1
- package/dist/plugins/general.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/lockfile.d.ts +1 -1
- package/dist/plugins/markdown.d.ts +1 -1
- package/dist/plugins/node.d.ts +1 -1
- package/dist/plugins/perfectionist.d.ts +1 -1
- package/dist/plugins/pickier.d.ts +1 -1
- package/dist/plugins/publint.d.ts +1 -2
- package/dist/plugins/quality.d.ts +1 -1
- package/dist/plugins/regexp.d.ts +1 -1
- package/dist/plugins/shell.d.ts +2 -0
- package/dist/plugins/spell.d.ts +3 -0
- package/dist/plugins/style.d.ts +1 -1
- package/dist/plugins/ts.d.ts +1 -1
- package/dist/plugins/unused-imports.d.ts +1 -1
- package/dist/plugins/utils.d.ts +2 -1
- package/dist/rules/general/_template-tracking.d.ts +31 -0
- package/dist/rules/general/array-callback-return.d.ts +1 -1
- package/dist/rules/general/constructor-super.d.ts +1 -1
- package/dist/rules/general/for-direction.d.ts +1 -1
- package/dist/rules/general/getter-return.d.ts +1 -1
- package/dist/rules/general/no-async-promise-executor.d.ts +1 -1
- package/dist/rules/general/no-compare-neg-zero.d.ts +1 -1
- package/dist/rules/general/no-cond-assign.d.ts +1 -1
- package/dist/rules/general/no-const-assign.d.ts +1 -1
- package/dist/rules/general/no-constant-condition.d.ts +1 -1
- package/dist/rules/general/no-constructor-return.d.ts +1 -1
- package/dist/rules/general/no-dupe-class-members.d.ts +1 -1
- package/dist/rules/general/no-dupe-keys.d.ts +1 -1
- package/dist/rules/general/no-duplicate-case.d.ts +1 -1
- package/dist/rules/general/no-empty-pattern.d.ts +1 -1
- package/dist/rules/general/no-fallthrough.d.ts +1 -1
- package/dist/rules/general/no-irregular-whitespace.d.ts +1 -1
- package/dist/rules/general/no-loss-of-precision.d.ts +1 -1
- package/dist/rules/general/no-new.d.ts +1 -1
- package/dist/rules/general/no-promise-executor-return.d.ts +1 -1
- package/dist/rules/general/no-redeclare.d.ts +1 -1
- package/dist/rules/general/no-regex-spaces.d.ts +1 -1
- package/dist/rules/general/no-self-assign.d.ts +1 -1
- package/dist/rules/general/no-self-compare.d.ts +1 -1
- package/dist/rules/general/no-sparse-arrays.d.ts +1 -1
- package/dist/rules/general/no-undef.d.ts +1 -1
- package/dist/rules/general/no-unreachable.d.ts +1 -1
- package/dist/rules/general/no-unsafe-negation.d.ts +1 -1
- package/dist/rules/general/no-unused-vars.d.ts +1 -1
- package/dist/rules/general/no-useless-catch.d.ts +1 -1
- package/dist/rules/general/prefer-const.d.ts +1 -1
- package/dist/rules/general/prefer-object-spread.d.ts +1 -1
- package/dist/rules/general/prefer-template.d.ts +1 -1
- package/dist/rules/general/use-isnan.d.ts +1 -1
- package/dist/rules/general/valid-typeof.d.ts +1 -1
- package/dist/rules/imports/first.d.ts +1 -1
- package/dist/rules/imports/import-dedupe.d.ts +1 -1
- package/dist/rules/imports/named.d.ts +1 -1
- package/dist/rules/imports/no-cycle.d.ts +1 -1
- package/dist/rules/imports/no-duplicate-imports.d.ts +1 -1
- package/dist/rules/imports/no-import-dist.d.ts +1 -1
- package/dist/rules/imports/no-import-node-modules-by-path.d.ts +1 -1
- package/dist/rules/imports/no-unresolved.d.ts +1 -1
- package/dist/rules/lockfile/index.d.ts +1 -1
- package/dist/rules/lockfile/parser.d.ts +1 -1
- package/dist/rules/lockfile/validate-host.d.ts +1 -2
- package/dist/rules/lockfile/validate-https.d.ts +1 -1
- package/dist/rules/lockfile/validate-integrity.d.ts +1 -1
- package/dist/rules/lockfile/validate-package-names.d.ts +1 -1
- package/dist/rules/lockfile/validate-scheme.d.ts +1 -1
- package/dist/rules/markdown/_fence-tracking.d.ts +32 -0
- package/dist/rules/markdown/_shared.d.ts +9 -0
- package/dist/rules/markdown/blanks-around-fences.d.ts +1 -1
- package/dist/rules/markdown/blanks-around-headings.d.ts +1 -1
- package/dist/rules/markdown/blanks-around-lists.d.ts +1 -1
- package/dist/rules/markdown/blanks-around-tables.d.ts +1 -1
- package/dist/rules/markdown/code-block-style.d.ts +1 -1
- package/dist/rules/markdown/code-fence-style.d.ts +1 -1
- package/dist/rules/markdown/commands-show-output.d.ts +1 -1
- package/dist/rules/markdown/descriptive-link-text.d.ts +1 -1
- package/dist/rules/markdown/emphasis-style.d.ts +1 -1
- package/dist/rules/markdown/fenced-code-language.d.ts +1 -1
- package/dist/rules/markdown/first-line-heading.d.ts +1 -1
- package/dist/rules/markdown/heading-increment.d.ts +1 -1
- package/dist/rules/markdown/heading-start-left.d.ts +1 -1
- package/dist/rules/markdown/heading-style.d.ts +1 -1
- package/dist/rules/markdown/hr-style.d.ts +1 -1
- package/dist/rules/markdown/line-length.d.ts +1 -1
- package/dist/rules/markdown/link-fragments.d.ts +1 -1
- package/dist/rules/markdown/link-image-reference-definitions.d.ts +1 -1
- package/dist/rules/markdown/link-image-style.d.ts +1 -1
- package/dist/rules/markdown/list-indent.d.ts +1 -1
- package/dist/rules/markdown/list-marker-space.d.ts +1 -1
- package/dist/rules/markdown/no-alt-text.d.ts +1 -1
- package/dist/rules/markdown/no-bare-urls.d.ts +1 -1
- package/dist/rules/markdown/no-blanks-blockquote.d.ts +1 -1
- package/dist/rules/markdown/no-duplicate-heading.d.ts +1 -1
- package/dist/rules/markdown/no-emphasis-as-heading.d.ts +5 -1
- package/dist/rules/markdown/no-empty-links.d.ts +1 -1
- package/dist/rules/markdown/no-hard-tabs.d.ts +1 -1
- package/dist/rules/markdown/no-inline-html.d.ts +1 -1
- package/dist/rules/markdown/no-missing-space-atx.d.ts +1 -1
- package/dist/rules/markdown/no-missing-space-closed-atx.d.ts +1 -1
- package/dist/rules/markdown/no-multiple-blanks.d.ts +1 -1
- package/dist/rules/markdown/no-multiple-space-atx.d.ts +1 -1
- package/dist/rules/markdown/no-multiple-space-blockquote.d.ts +1 -1
- package/dist/rules/markdown/no-multiple-space-closed-atx.d.ts +1 -1
- package/dist/rules/markdown/no-reversed-links.d.ts +1 -1
- package/dist/rules/markdown/no-space-in-code.d.ts +1 -1
- package/dist/rules/markdown/no-space-in-emphasis.d.ts +1 -1
- package/dist/rules/markdown/no-space-in-links.d.ts +1 -1
- package/dist/rules/markdown/no-trailing-punctuation.d.ts +1 -1
- package/dist/rules/markdown/no-trailing-spaces.d.ts +1 -1
- package/dist/rules/markdown/ol-prefix.d.ts +1 -1
- package/dist/rules/markdown/proper-names.d.ts +1 -1
- package/dist/rules/markdown/reference-links-images.d.ts +10 -1
- package/dist/rules/markdown/required-headings.d.ts +1 -1
- package/dist/rules/markdown/single-title.d.ts +1 -1
- package/dist/rules/markdown/single-trailing-newline.d.ts +1 -1
- package/dist/rules/markdown/strong-style.d.ts +1 -1
- package/dist/rules/markdown/table-column-count.d.ts +1 -1
- package/dist/rules/markdown/table-column-style.d.ts +1 -1
- package/dist/rules/markdown/table-pipe-style.d.ts +1 -1
- package/dist/rules/markdown/ul-indent.d.ts +10 -1
- package/dist/rules/markdown/ul-style.d.ts +1 -1
- package/dist/rules/node/prefer-global-buffer.d.ts +1 -1
- package/dist/rules/node/prefer-global-process.d.ts +1 -1
- package/dist/rules/publint/bin-file-not-executable.d.ts +1 -1
- package/dist/rules/publint/deprecated-field-jsnext.d.ts +1 -1
- package/dist/rules/publint/exports-default-should-be-last.d.ts +1 -1
- package/dist/rules/publint/exports-fallback-array-use.d.ts +1 -1
- package/dist/rules/publint/exports-missing-root-entrypoint.d.ts +1 -1
- package/dist/rules/publint/exports-module-should-be-esm.d.ts +1 -1
- package/dist/rules/publint/exports-module-should-precede-require.d.ts +1 -1
- package/dist/rules/publint/exports-types-should-be-first.d.ts +1 -1
- package/dist/rules/publint/exports-value-invalid.d.ts +1 -1
- package/dist/rules/publint/field-invalid-value-type.d.ts +1 -1
- package/dist/rules/publint/file-does-not-exist.d.ts +1 -1
- package/dist/rules/publint/file-invalid-format.d.ts +1 -1
- package/dist/rules/publint/has-module-but-no-exports.d.ts +1 -1
- package/dist/rules/publint/imports-default-should-be-last.d.ts +1 -1
- package/dist/rules/publint/imports-key-invalid.d.ts +1 -1
- package/dist/rules/publint/imports-module-should-precede-require.d.ts +1 -1
- package/dist/rules/publint/imports-value-invalid.d.ts +1 -1
- package/dist/rules/publint/index.d.ts +13 -11
- package/dist/rules/publint/local-dependency.d.ts +1 -1
- package/dist/rules/publint/module-should-be-esm.d.ts +1 -1
- package/dist/rules/publint/use-type.d.ts +1 -1
- package/dist/rules/publint/utils.d.ts +2 -2
- package/dist/rules/quality/complexity.d.ts +1 -1
- package/dist/rules/quality/default-case.d.ts +1 -1
- package/dist/rules/quality/eqeqeq.d.ts +1 -1
- package/dist/rules/quality/max-depth.d.ts +1 -1
- package/dist/rules/quality/max-lines-per-function.d.ts +1 -1
- package/dist/rules/quality/no-alert.d.ts +1 -1
- package/dist/rules/quality/no-await-in-loop.d.ts +1 -1
- package/dist/rules/quality/no-caller.d.ts +1 -1
- package/dist/rules/quality/no-case-declarations.d.ts +1 -1
- package/dist/rules/quality/no-else-return.d.ts +1 -1
- package/dist/rules/quality/no-empty-function.d.ts +1 -1
- package/dist/rules/quality/no-empty.d.ts +1 -1
- package/dist/rules/quality/no-eval.d.ts +1 -1
- package/dist/rules/quality/no-extend-native.d.ts +1 -1
- package/dist/rules/quality/no-extra-boolean-cast.d.ts +1 -1
- package/dist/rules/quality/no-global-assign.d.ts +1 -1
- package/dist/rules/quality/no-implied-eval.d.ts +1 -1
- package/dist/rules/quality/no-iterator.d.ts +1 -1
- package/dist/rules/quality/no-lonely-if.d.ts +1 -1
- package/dist/rules/quality/no-new-func.d.ts +1 -1
- package/dist/rules/quality/no-new-wrappers.d.ts +1 -1
- package/dist/rules/quality/no-new.d.ts +1 -1
- package/dist/rules/quality/no-octal.d.ts +1 -1
- package/dist/rules/quality/no-param-reassign.d.ts +1 -1
- package/dist/rules/quality/no-proto.d.ts +1 -1
- package/dist/rules/quality/no-return-assign.d.ts +1 -1
- package/dist/rules/quality/no-sequences.d.ts +1 -1
- package/dist/rules/quality/no-shadow.d.ts +1 -1
- package/dist/rules/quality/no-throw-literal.d.ts +1 -1
- package/dist/rules/quality/no-use-before-define.d.ts +1 -1
- package/dist/rules/quality/no-useless-call.d.ts +1 -1
- package/dist/rules/quality/no-useless-concat.d.ts +1 -1
- package/dist/rules/quality/no-useless-escape.d.ts +1 -1
- package/dist/rules/quality/no-useless-rename.d.ts +1 -1
- package/dist/rules/quality/no-useless-return.d.ts +1 -1
- package/dist/rules/quality/no-var.d.ts +1 -1
- package/dist/rules/quality/no-with.d.ts +1 -1
- package/dist/rules/quality/prefer-arrow-callback.d.ts +1 -1
- package/dist/rules/quality/require-await.d.ts +1 -1
- package/dist/rules/regexp/no-super-linear-backtracking.d.ts +1 -1
- package/dist/rules/regexp/no-unused-capturing-group.d.ts +1 -1
- package/dist/rules/regexp/no-useless-lazy.d.ts +1 -1
- package/dist/rules/shell/_shared.d.ts +24 -0
- package/dist/rules/shell/command-substitution.d.ts +6 -0
- package/dist/rules/shell/consistent-case-terminators.d.ts +9 -0
- package/dist/rules/shell/function-style.d.ts +6 -0
- package/dist/rules/shell/heredoc-indent.d.ts +7 -0
- package/dist/rules/shell/indent.d.ts +2 -0
- package/dist/rules/shell/keyword-spacing.d.ts +10 -0
- package/dist/rules/shell/no-broken-redirect.d.ts +7 -0
- package/dist/rules/shell/no-cd-without-check.d.ts +6 -0
- package/dist/rules/shell/no-eval.d.ts +6 -0
- package/dist/rules/shell/no-exit-in-subshell.d.ts +7 -0
- package/dist/rules/shell/no-ls-parsing.d.ts +7 -0
- package/dist/rules/shell/no-trailing-semicolons.d.ts +6 -0
- package/dist/rules/shell/no-trailing-whitespace.d.ts +5 -0
- package/dist/rules/shell/no-useless-cat.d.ts +6 -0
- package/dist/rules/shell/no-variable-in-single-quotes.d.ts +7 -0
- package/dist/rules/shell/operator-spacing.d.ts +11 -0
- package/dist/rules/shell/prefer-double-brackets.d.ts +6 -0
- package/dist/rules/shell/prefer-printf.d.ts +6 -0
- package/dist/rules/shell/quote-variables.d.ts +2 -0
- package/dist/rules/shell/set-options.d.ts +8 -0
- package/dist/rules/shell/shebang.d.ts +2 -0
- package/dist/rules/sort/exports.d.ts +1 -1
- package/dist/rules/sort/heritage-clauses.d.ts +1 -1
- package/dist/rules/sort/imports.d.ts +1 -1
- package/dist/rules/sort/keys.d.ts +1 -1
- package/dist/rules/sort/named-imports.d.ts +1 -1
- package/dist/rules/sort/objects.d.ts +1 -1
- package/dist/rules/sort/tailwind-classes.d.ts +5 -0
- package/dist/rules/style/array-bracket-spacing.d.ts +1 -1
- package/dist/rules/style/arrow-parens.d.ts +1 -1
- package/dist/rules/style/arrow-spacing.d.ts +1 -1
- package/dist/rules/style/block-spacing.d.ts +1 -1
- package/dist/rules/style/brace-style.d.ts +1 -1
- package/dist/rules/style/comma-dangle.d.ts +1 -1
- package/dist/rules/style/comma-spacing.d.ts +1 -1
- package/dist/rules/style/comma-style.d.ts +1 -1
- package/dist/rules/style/computed-property-spacing.d.ts +1 -1
- package/dist/rules/style/consistent-chaining.d.ts +1 -1
- package/dist/rules/style/consistent-list-newline.d.ts +1 -1
- package/dist/rules/style/curly.d.ts +1 -1
- package/dist/rules/style/dot-location.d.ts +1 -1
- package/dist/rules/style/function-call-spacing.d.ts +1 -1
- package/dist/rules/style/generator-star-spacing.d.ts +1 -1
- package/dist/rules/style/if-newline.d.ts +1 -1
- package/dist/rules/style/indent-binary-ops.d.ts +1 -1
- package/dist/rules/style/indent-unindent.d.ts +1 -1
- package/dist/rules/style/key-spacing.d.ts +1 -1
- package/dist/rules/style/keyword-spacing.d.ts +1 -1
- package/dist/rules/style/lines-between-class-members.d.ts +1 -1
- package/dist/rules/style/max-statements-per-line.d.ts +1 -1
- package/dist/rules/style/multiline-ternary.d.ts +1 -1
- package/dist/rules/style/new-parens.d.ts +1 -1
- package/dist/rules/style/no-extra-parens.d.ts +1 -1
- package/dist/rules/style/no-floating-decimal.d.ts +1 -1
- package/dist/rules/style/no-mixed-operators.d.ts +1 -1
- package/dist/rules/style/no-mixed-spaces-and-tabs.d.ts +1 -1
- package/dist/rules/style/no-multi-spaces.d.ts +1 -1
- package/dist/rules/style/no-multiple-empty-lines.d.ts +1 -1
- package/dist/rules/style/no-tabs.d.ts +1 -1
- package/dist/rules/style/no-trailing-spaces.d.ts +1 -1
- package/dist/rules/style/no-whitespace-before-property.d.ts +1 -1
- package/dist/rules/style/object-curly-spacing.d.ts +1 -1
- package/dist/rules/style/operator-linebreak.d.ts +1 -1
- package/dist/rules/style/padded-blocks.d.ts +1 -1
- package/dist/rules/style/quote-props.d.ts +1 -1
- package/dist/rules/style/rest-spread-spacing.d.ts +1 -1
- package/dist/rules/style/semi-spacing.d.ts +1 -1
- package/dist/rules/style/space-before-blocks.d.ts +1 -1
- package/dist/rules/style/space-before-function-paren.d.ts +1 -1
- package/dist/rules/style/space-in-parens.d.ts +1 -1
- package/dist/rules/style/space-infix-ops.d.ts +1 -1
- package/dist/rules/style/space-unary-ops.d.ts +1 -1
- package/dist/rules/style/spaced-comment.d.ts +1 -1
- package/dist/rules/style/switch-colon-spacing.d.ts +1 -1
- package/dist/rules/style/template-curly-spacing.d.ts +1 -1
- package/dist/rules/style/template-tag-spacing.d.ts +1 -1
- package/dist/rules/style/top-level-function.d.ts +1 -1
- package/dist/rules/style/wrap-iife.d.ts +1 -1
- package/dist/rules/style/yield-star-spacing.d.ts +1 -1
- package/dist/rules/ts/member-delimiter-style.d.ts +1 -1
- package/dist/rules/ts/no-explicit-any.d.ts +1 -1
- package/dist/rules/ts/no-floating-promises.d.ts +1 -1
- package/dist/rules/ts/no-misused-promises.d.ts +1 -1
- package/dist/rules/ts/no-require-imports.d.ts +1 -1
- package/dist/rules/ts/no-top-level-await.d.ts +1 -1
- package/dist/rules/ts/no-ts-export-equal.d.ts +1 -1
- package/dist/rules/ts/no-unsafe-assignment.d.ts +1 -1
- package/dist/rules/ts/prefer-nullish-coalescing.d.ts +1 -1
- package/dist/rules/ts/prefer-optional-chain.d.ts +1 -1
- package/dist/rules/ts/type-annotation-spacing.d.ts +1 -1
- package/dist/rules/ts/type-generic-spacing.d.ts +1 -1
- package/dist/rules/ts/type-named-tuple-spacing.d.ts +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/src/index.js +20387 -17154
- package/dist/types.d.ts +21 -4
- package/dist/utils.d.ts +36 -11
- package/package.json +16 -8
package/dist/types.d.ts
CHANGED
|
@@ -31,12 +31,19 @@ export declare interface PickierFormatConfig {
|
|
|
31
31
|
quotes: 'single' | 'double'
|
|
32
32
|
semi: boolean
|
|
33
33
|
}
|
|
34
|
+
export declare interface PickierTailwindConfig {
|
|
35
|
+
enabled: boolean
|
|
36
|
+
configPath?: string
|
|
37
|
+
callees?: string[]
|
|
38
|
+
attributes?: string[]
|
|
39
|
+
}
|
|
34
40
|
export declare interface PickierConfig {
|
|
35
41
|
verbose: boolean
|
|
36
42
|
ignores: string[]
|
|
37
43
|
lint: PickierLintConfig
|
|
38
44
|
format: PickierFormatConfig
|
|
39
45
|
rules: PickierRulesConfig
|
|
46
|
+
tailwind?: PickierTailwindConfig
|
|
40
47
|
plugins?: Array<PickierPlugin | string>
|
|
41
48
|
pluginRules?: RulesConfigMap
|
|
42
49
|
}
|
|
@@ -80,8 +87,18 @@ export declare interface FormatOptions {
|
|
|
80
87
|
ext?: string
|
|
81
88
|
verbose?: boolean
|
|
82
89
|
}
|
|
83
|
-
export type RuleSeverity = 'off' | 'warn' | 'error'
|
|
84
|
-
export type Extension = 'ts' | 'js' | 'html' | 'css' | 'json' | 'jsonc' | 'md' | 'yaml' | 'yml' | 'stx' | 'lock'
|
|
85
|
-
|
|
90
|
+
export type RuleSeverity = 'off' | 'warn' | 'error';
|
|
91
|
+
export type Extension = 'ts' | 'js' | 'html' | 'css' | 'json' | 'jsonc' | 'md' | 'yaml' | 'yml' | 'stx' | 'lock' | 'sh' | 'bash' | 'zsh';
|
|
92
|
+
// User-facing config type — all fields optional, merged with defaults at runtime
|
|
93
|
+
export type PickierOptions = Partial<{
|
|
94
|
+
verbose: boolean
|
|
95
|
+
ignores: string[]
|
|
96
|
+
lint: Partial<PickierLintConfig>
|
|
97
|
+
format: Partial<PickierFormatConfig>
|
|
98
|
+
rules: Partial<PickierRulesConfig>
|
|
99
|
+
tailwind: PickierTailwindConfig
|
|
100
|
+
plugins: Array<PickierPlugin | string>
|
|
101
|
+
pluginRules: RulesConfigMap
|
|
102
|
+
}>;
|
|
86
103
|
// Plugin system types
|
|
87
|
-
export type RulesConfigMap = Record<string, RuleSeverity | [RuleSeverity, unknown]
|
|
104
|
+
export type RulesConfigMap = Record<string, RuleSeverity | [RuleSeverity, unknown]>;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import type { PickierConfig, RulesConfigMap } from './types';
|
|
1
|
+
import type { PickierConfig, PickierOptions, RulesConfigMap } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Glob files matching the given patterns.
|
|
4
|
+
* Uses Bun.Glob when running under Bun for maximum performance,
|
|
5
|
+
* falls back to a pure Node fs recursive walk otherwise.
|
|
6
|
+
*/
|
|
7
|
+
export declare function glob(patterns: string[], opts?: GlobOptions): Promise<string[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Concurrency limiter — runs at most `concurrency` async tasks simultaneously.
|
|
10
|
+
* Returns a scheduler function identical in signature to p-limit:
|
|
11
|
+
* const limit = createLimiter(8)
|
|
12
|
+
* await Promise.all(items.map(x => limit(() => process(x))))
|
|
13
|
+
*/
|
|
14
|
+
export declare function createLimiter(concurrency: number): <T>(fn: () => Promise<T>) => Promise<T>;
|
|
2
15
|
/**
|
|
3
16
|
* Parse a rule configuration value and return its settings.
|
|
4
17
|
* Handles both string format ('error', 'warn', 'off') and array format (['error', options]).
|
|
@@ -15,7 +28,7 @@ export declare function blue(text: string): string;
|
|
|
15
28
|
export declare function gray(text: string): string;
|
|
16
29
|
export declare function bold(text: string): string;
|
|
17
30
|
// Shared CLI utilities (moved from cli/utils.ts)
|
|
18
|
-
export declare function mergeConfig(base: PickierConfig, override:
|
|
31
|
+
export declare function mergeConfig(base: PickierConfig, override: PickierOptions): PickierConfig;
|
|
19
32
|
export declare function loadConfigFromPath(pathLike: string | undefined): Promise<PickierConfig>;
|
|
20
33
|
export declare function expandPatterns(patterns: string[]): string[];
|
|
21
34
|
export declare function isCodeFile(file: string, allowedExts: Set<string>): boolean;
|
|
@@ -36,25 +49,25 @@ export declare const MAX_FIXER_PASSES: 5;
|
|
|
36
49
|
*/
|
|
37
50
|
export declare const ENV: {
|
|
38
51
|
/** Enable verbose trace logging. Set PICKIER_TRACE=1 to enable. */
|
|
39
|
-
get TRACE()
|
|
52
|
+
get TRACE: () => unknown;
|
|
40
53
|
/** Glob timeout in milliseconds. Default: 8000ms */
|
|
41
|
-
get TIMEOUT_MS()
|
|
54
|
+
get TIMEOUT_MS: () => unknown;
|
|
42
55
|
/** Per-rule timeout in milliseconds. Default: 5000ms */
|
|
43
|
-
get RULE_TIMEOUT_MS()
|
|
56
|
+
get RULE_TIMEOUT_MS: () => unknown;
|
|
44
57
|
/** Parallel file processing concurrency. Default: 8 */
|
|
45
|
-
get CONCURRENCY()
|
|
58
|
+
get CONCURRENCY: () => unknown;
|
|
46
59
|
/** Enable diagnostics mode. Set PICKIER_DIAGNOSTICS=1 to enable. */
|
|
47
|
-
get DIAGNOSTICS()
|
|
60
|
+
get DIAGNOSTICS: () => unknown;
|
|
48
61
|
/** Treat warnings as errors. Set PICKIER_FAIL_ON_WARNINGS=1 to enable. */
|
|
49
|
-
get FAIL_ON_WARNINGS()
|
|
62
|
+
get FAIL_ON_WARNINGS: () => unknown;
|
|
50
63
|
/** Disable auto-loading of config. Set PICKIER_NO_AUTO_CONFIG=1 to disable. */
|
|
51
|
-
get NO_AUTO_CONFIG()
|
|
64
|
+
get NO_AUTO_CONFIG: () => unknown
|
|
52
65
|
};
|
|
53
66
|
/**
|
|
54
67
|
* Universal ignore patterns that should apply everywhere.
|
|
55
68
|
* These are always excluded regardless of project-specific config.
|
|
56
69
|
*/
|
|
57
|
-
export declare const UNIVERSAL_IGNORES: readonly ['**/node_modules/**', '**/dist/**', '**/build/**', '**/.git/**', '**/.next/**', '**/.nuxt/**', '**/.output/**', '**/.vercel/**', '**/.netlify/**', '**/.cache/**', '**/.turbo/**', '**/.vscode/**', '**/.idea/**', '**/.zed/**', '**/.cursor/**', '**/.claude/**', '**/.github/**', '**/coverage/**', '**/.nyc_output/**', '
|
|
70
|
+
export declare const UNIVERSAL_IGNORES: readonly ['**/node_modules/**', '**/dist/**', '**/build/**', '**/.git/**', '**/.next/**', '**/.nuxt/**', '**/.output/**', '**/.vercel/**', '**/.netlify/**', '**/.cache/**', '**/.turbo/**', '**/.vscode/**', '**/.idea/**', '**/.zed/**', '**/.cursor/**', '**/.claude/**', '**/.github/**', '**/coverage/**', '**/.nyc_output/**', '**/.tmp/**', '**/.temp/**', '**/vendor/**', '**/pantry/**', '**/target/**', unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, '**/.DS_Store', '**/Thumbs.db'];
|
|
58
71
|
export declare const colors: {
|
|
59
72
|
green: (text: string) => string
|
|
60
73
|
red: (text: string) => string
|
|
@@ -62,4 +75,16 @@ export declare const colors: {
|
|
|
62
75
|
blue: (text: string) => string
|
|
63
76
|
gray: (text: string) => string
|
|
64
77
|
bold: (text: string) => string
|
|
65
|
-
};
|
|
78
|
+
};
|
|
79
|
+
// ---------------------------------------------------------------------------
|
|
80
|
+
// Homegrown glob — uses Bun.Glob when available, falls back to Node fs walk.
|
|
81
|
+
// Matches the tinyglobby API subset used in this project:
|
|
82
|
+
// glob(patterns, { dot?, ignore?, onlyFiles?, absolute? })
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
declare interface GlobOptions {
|
|
85
|
+
dot?: boolean
|
|
86
|
+
ignore?: string[]
|
|
87
|
+
onlyFiles?: boolean
|
|
88
|
+
absolute?: boolean
|
|
89
|
+
cwd?: string
|
|
90
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pickier",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.22",
|
|
5
5
|
"description": "Format, lint and more in a fraction of seconds.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"import": "./dist/*"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
"module": "./dist/index.js",
|
|
32
|
+
"module": "./dist/src/index.js",
|
|
33
33
|
"types": "./dist/index.d.ts",
|
|
34
34
|
"bin": {
|
|
35
35
|
"pickier": "./dist/bin/cli.js"
|
|
@@ -39,19 +39,26 @@
|
|
|
39
39
|
"dist"
|
|
40
40
|
],
|
|
41
41
|
"scripts": {
|
|
42
|
-
"build": "bun --bun build.ts
|
|
42
|
+
"build": "bun --bun build.ts",
|
|
43
|
+
"build:bin": "bun --bun build.ts && bun run compile",
|
|
43
44
|
"compile": "bun build ./bin/cli.ts --compile --minify --outfile bin/pickier",
|
|
44
|
-
"compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64",
|
|
45
|
+
"compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:linux-x64-musl && bun run compile:linux-arm64-musl && bun run compile:windows-x64 && bun run compile:windows-arm64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64",
|
|
45
46
|
"compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/pickier-linux-x64",
|
|
46
47
|
"compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/pickier-linux-arm64",
|
|
48
|
+
"compile:linux-x64-musl": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64-musl --outfile bin/pickier-linux-x64-musl",
|
|
49
|
+
"compile:linux-arm64-musl": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64-musl --outfile bin/pickier-linux-arm64-musl",
|
|
47
50
|
"compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/pickier-windows-x64.exe",
|
|
51
|
+
"compile:windows-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-arm64 --outfile bin/pickier-windows-arm64.exe",
|
|
48
52
|
"compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/pickier-darwin-x64",
|
|
49
53
|
"compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/pickier-darwin-arm64",
|
|
50
54
|
"zip": "bun run zip:all",
|
|
51
|
-
"zip:all": "bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:windows-x64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64",
|
|
55
|
+
"zip:all": "bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:linux-x64-musl && bun run zip:linux-arm64-musl && bun run zip:windows-x64 && bun run zip:windows-arm64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64",
|
|
52
56
|
"zip:linux-x64": "zip -j bin/pickier-linux-x64.zip bin/pickier-linux-x64",
|
|
53
57
|
"zip:linux-arm64": "zip -j bin/pickier-linux-arm64.zip bin/pickier-linux-arm64",
|
|
58
|
+
"zip:linux-x64-musl": "zip -j bin/pickier-linux-x64-musl.zip bin/pickier-linux-x64-musl",
|
|
59
|
+
"zip:linux-arm64-musl": "zip -j bin/pickier-linux-arm64-musl.zip bin/pickier-linux-arm64-musl",
|
|
54
60
|
"zip:windows-x64": "zip -j bin/pickier-windows-x64.zip bin/pickier-windows-x64.exe",
|
|
61
|
+
"zip:windows-arm64": "zip -j bin/pickier-windows-arm64.zip bin/pickier-windows-arm64.exe",
|
|
55
62
|
"zip:darwin-x64": "zip -j bin/pickier-darwin-x64.zip bin/pickier-darwin-x64",
|
|
56
63
|
"zip:darwin-arm64": "zip -j bin/pickier-darwin-arm64.zip bin/pickier-darwin-arm64",
|
|
57
64
|
"prepublishOnly": "bun --bun run build && bun run compile:all && bun run zip",
|
|
@@ -70,9 +77,10 @@
|
|
|
70
77
|
"test:watch": "PICKIER_NO_AUTO_CONFIG=1 bun test --watch"
|
|
71
78
|
},
|
|
72
79
|
"dependencies": {
|
|
73
|
-
"@stacksjs/clapp": "^0.2.0"
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
"@stacksjs/clapp": "^0.2.0"
|
|
81
|
+
},
|
|
82
|
+
"optionalDependencies": {
|
|
83
|
+
"ts-spell-check": "^0.1.0"
|
|
76
84
|
},
|
|
77
85
|
"devDependencies": {
|
|
78
86
|
"bunfig": "^0.15.6"
|