pickier 0.1.26 → 0.1.28
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 +7921 -2628
- package/dist/src/index.js +6536 -1534
- package/dist/utils.d.ts +15 -21
- package/package.json +4 -4
- package/dist/ast.d.ts +0 -13
- package/dist/plugins/eslint.d.ts +0 -2
- package/dist/plugins/general.d.ts +0 -2
- package/dist/plugins/index.d.ts +0 -2
- package/dist/plugins/lockfile.d.ts +0 -22
- package/dist/plugins/markdown.d.ts +0 -2
- package/dist/plugins/node.d.ts +0 -2
- package/dist/plugins/perfectionist.d.ts +0 -6
- package/dist/plugins/pickier.d.ts +0 -2
- package/dist/plugins/publint.d.ts +0 -10
- package/dist/plugins/quality.d.ts +0 -2
- package/dist/plugins/regexp.d.ts +0 -2
- package/dist/plugins/shell.d.ts +0 -2
- package/dist/plugins/spell.d.ts +0 -3
- package/dist/plugins/style.d.ts +0 -2
- package/dist/plugins/ts.d.ts +0 -2
- package/dist/plugins/unused-imports.d.ts +0 -6
- package/dist/plugins/utils.d.ts +0 -4
- package/dist/rules/general/_template-tracking.d.ts +0 -31
- package/dist/rules/general/array-callback-return.d.ts +0 -2
- package/dist/rules/general/constructor-super.d.ts +0 -2
- package/dist/rules/general/for-direction.d.ts +0 -2
- package/dist/rules/general/getter-return.d.ts +0 -2
- package/dist/rules/general/no-async-promise-executor.d.ts +0 -2
- package/dist/rules/general/no-compare-neg-zero.d.ts +0 -2
- package/dist/rules/general/no-cond-assign.d.ts +0 -2
- package/dist/rules/general/no-const-assign.d.ts +0 -2
- package/dist/rules/general/no-constant-condition.d.ts +0 -2
- package/dist/rules/general/no-constructor-return.d.ts +0 -2
- package/dist/rules/general/no-dupe-class-members.d.ts +0 -2
- package/dist/rules/general/no-dupe-keys.d.ts +0 -2
- package/dist/rules/general/no-duplicate-case.d.ts +0 -2
- package/dist/rules/general/no-empty-pattern.d.ts +0 -2
- package/dist/rules/general/no-fallthrough.d.ts +0 -2
- package/dist/rules/general/no-irregular-whitespace.d.ts +0 -2
- package/dist/rules/general/no-loss-of-precision.d.ts +0 -2
- package/dist/rules/general/no-new.d.ts +0 -13
- package/dist/rules/general/no-promise-executor-return.d.ts +0 -2
- package/dist/rules/general/no-redeclare.d.ts +0 -2
- package/dist/rules/general/no-regex-spaces.d.ts +0 -10
- package/dist/rules/general/no-self-assign.d.ts +0 -2
- package/dist/rules/general/no-self-compare.d.ts +0 -2
- package/dist/rules/general/no-sparse-arrays.d.ts +0 -2
- package/dist/rules/general/no-undef.d.ts +0 -2
- package/dist/rules/general/no-unreachable.d.ts +0 -2
- package/dist/rules/general/no-unsafe-negation.d.ts +0 -2
- package/dist/rules/general/no-unused-vars.d.ts +0 -2
- package/dist/rules/general/no-useless-catch.d.ts +0 -2
- package/dist/rules/general/prefer-const.d.ts +0 -2
- package/dist/rules/general/prefer-object-spread.d.ts +0 -2
- package/dist/rules/general/prefer-template.d.ts +0 -2
- package/dist/rules/general/use-isnan.d.ts +0 -2
- package/dist/rules/general/valid-typeof.d.ts +0 -2
- package/dist/rules/imports/first.d.ts +0 -2
- package/dist/rules/imports/import-dedupe.d.ts +0 -2
- package/dist/rules/imports/named.d.ts +0 -2
- package/dist/rules/imports/no-cycle.d.ts +0 -2
- package/dist/rules/imports/no-duplicate-imports.d.ts +0 -2
- package/dist/rules/imports/no-import-dist.d.ts +0 -2
- package/dist/rules/imports/no-import-node-modules-by-path.d.ts +0 -2
- package/dist/rules/imports/no-unresolved.d.ts +0 -2
- package/dist/rules/lockfile/index.d.ts +0 -6
- package/dist/rules/lockfile/parser.d.ts +0 -79
- package/dist/rules/lockfile/validate-host.d.ts +0 -18
- package/dist/rules/lockfile/validate-https.d.ts +0 -14
- package/dist/rules/lockfile/validate-integrity.d.ts +0 -19
- package/dist/rules/lockfile/validate-package-names.d.ts +0 -23
- package/dist/rules/lockfile/validate-scheme.d.ts +0 -17
- package/dist/rules/markdown/_fence-tracking.d.ts +0 -32
- package/dist/rules/markdown/_shared.d.ts +0 -9
- package/dist/rules/markdown/blanks-around-fences.d.ts +0 -5
- package/dist/rules/markdown/blanks-around-headings.d.ts +0 -5
- package/dist/rules/markdown/blanks-around-lists.d.ts +0 -5
- package/dist/rules/markdown/blanks-around-tables.d.ts +0 -5
- package/dist/rules/markdown/code-block-style.d.ts +0 -5
- package/dist/rules/markdown/code-fence-style.d.ts +0 -5
- package/dist/rules/markdown/commands-show-output.d.ts +0 -5
- package/dist/rules/markdown/descriptive-link-text.d.ts +0 -5
- package/dist/rules/markdown/emphasis-style.d.ts +0 -5
- package/dist/rules/markdown/fenced-code-language.d.ts +0 -5
- package/dist/rules/markdown/first-line-heading.d.ts +0 -5
- package/dist/rules/markdown/heading-increment.d.ts +0 -5
- package/dist/rules/markdown/heading-start-left.d.ts +0 -5
- package/dist/rules/markdown/heading-style.d.ts +0 -5
- package/dist/rules/markdown/hr-style.d.ts +0 -5
- package/dist/rules/markdown/line-length.d.ts +0 -5
- package/dist/rules/markdown/link-fragments.d.ts +0 -5
- package/dist/rules/markdown/link-image-reference-definitions.d.ts +0 -5
- package/dist/rules/markdown/link-image-style.d.ts +0 -5
- package/dist/rules/markdown/list-indent.d.ts +0 -5
- package/dist/rules/markdown/list-marker-space.d.ts +0 -5
- package/dist/rules/markdown/no-alt-text.d.ts +0 -5
- package/dist/rules/markdown/no-bare-urls.d.ts +0 -5
- package/dist/rules/markdown/no-blanks-blockquote.d.ts +0 -5
- package/dist/rules/markdown/no-duplicate-heading.d.ts +0 -10
- package/dist/rules/markdown/no-emphasis-as-heading.d.ts +0 -9
- package/dist/rules/markdown/no-empty-links.d.ts +0 -5
- package/dist/rules/markdown/no-hard-tabs.d.ts +0 -5
- package/dist/rules/markdown/no-inline-html.d.ts +0 -5
- package/dist/rules/markdown/no-missing-space-atx.d.ts +0 -5
- package/dist/rules/markdown/no-missing-space-closed-atx.d.ts +0 -5
- package/dist/rules/markdown/no-multiple-blanks.d.ts +0 -5
- package/dist/rules/markdown/no-multiple-space-atx.d.ts +0 -5
- package/dist/rules/markdown/no-multiple-space-blockquote.d.ts +0 -5
- package/dist/rules/markdown/no-multiple-space-closed-atx.d.ts +0 -5
- package/dist/rules/markdown/no-reversed-links.d.ts +0 -5
- package/dist/rules/markdown/no-space-in-code.d.ts +0 -5
- package/dist/rules/markdown/no-space-in-emphasis.d.ts +0 -5
- package/dist/rules/markdown/no-space-in-links.d.ts +0 -5
- package/dist/rules/markdown/no-trailing-punctuation.d.ts +0 -5
- package/dist/rules/markdown/no-trailing-spaces.d.ts +0 -5
- package/dist/rules/markdown/ol-prefix.d.ts +0 -5
- package/dist/rules/markdown/proper-names.d.ts +0 -5
- package/dist/rules/markdown/reference-links-images.d.ts +0 -14
- package/dist/rules/markdown/required-headings.d.ts +0 -5
- package/dist/rules/markdown/single-title.d.ts +0 -5
- package/dist/rules/markdown/single-trailing-newline.d.ts +0 -5
- package/dist/rules/markdown/strong-style.d.ts +0 -5
- package/dist/rules/markdown/table-column-count.d.ts +0 -5
- package/dist/rules/markdown/table-column-style.d.ts +0 -5
- package/dist/rules/markdown/table-pipe-style.d.ts +0 -5
- package/dist/rules/markdown/ul-indent.d.ts +0 -14
- package/dist/rules/markdown/ul-style.d.ts +0 -5
- package/dist/rules/node/prefer-global-buffer.d.ts +0 -9
- package/dist/rules/node/prefer-global-process.d.ts +0 -9
- package/dist/rules/publint/bin-file-not-executable.d.ts +0 -2
- package/dist/rules/publint/deprecated-field-jsnext.d.ts +0 -2
- package/dist/rules/publint/exports-default-should-be-last.d.ts +0 -2
- package/dist/rules/publint/exports-fallback-array-use.d.ts +0 -2
- package/dist/rules/publint/exports-missing-root-entrypoint.d.ts +0 -2
- package/dist/rules/publint/exports-module-should-be-esm.d.ts +0 -2
- package/dist/rules/publint/exports-module-should-precede-require.d.ts +0 -2
- package/dist/rules/publint/exports-types-should-be-first.d.ts +0 -2
- package/dist/rules/publint/exports-value-invalid.d.ts +0 -2
- package/dist/rules/publint/field-invalid-value-type.d.ts +0 -2
- package/dist/rules/publint/file-does-not-exist.d.ts +0 -2
- package/dist/rules/publint/file-invalid-format.d.ts +0 -2
- package/dist/rules/publint/has-module-but-no-exports.d.ts +0 -2
- package/dist/rules/publint/imports-default-should-be-last.d.ts +0 -2
- package/dist/rules/publint/imports-key-invalid.d.ts +0 -2
- package/dist/rules/publint/imports-module-should-precede-require.d.ts +0 -2
- package/dist/rules/publint/imports-value-invalid.d.ts +0 -2
- package/dist/rules/publint/index.d.ts +0 -22
- package/dist/rules/publint/local-dependency.d.ts +0 -2
- package/dist/rules/publint/module-should-be-esm.d.ts +0 -2
- package/dist/rules/publint/use-type.d.ts +0 -2
- package/dist/rules/publint/utils.d.ts +0 -73
- package/dist/rules/quality/complexity.d.ts +0 -2
- package/dist/rules/quality/default-case.d.ts +0 -2
- package/dist/rules/quality/eqeqeq.d.ts +0 -2
- package/dist/rules/quality/max-depth.d.ts +0 -2
- package/dist/rules/quality/max-lines-per-function.d.ts +0 -2
- package/dist/rules/quality/no-alert.d.ts +0 -2
- package/dist/rules/quality/no-await-in-loop.d.ts +0 -2
- package/dist/rules/quality/no-caller.d.ts +0 -2
- package/dist/rules/quality/no-case-declarations.d.ts +0 -2
- package/dist/rules/quality/no-else-return.d.ts +0 -2
- package/dist/rules/quality/no-empty-function.d.ts +0 -2
- package/dist/rules/quality/no-empty.d.ts +0 -2
- package/dist/rules/quality/no-eval.d.ts +0 -2
- package/dist/rules/quality/no-extend-native.d.ts +0 -2
- package/dist/rules/quality/no-extra-boolean-cast.d.ts +0 -2
- package/dist/rules/quality/no-global-assign.d.ts +0 -2
- package/dist/rules/quality/no-implied-eval.d.ts +0 -2
- package/dist/rules/quality/no-iterator.d.ts +0 -2
- package/dist/rules/quality/no-lonely-if.d.ts +0 -2
- package/dist/rules/quality/no-new-func.d.ts +0 -2
- package/dist/rules/quality/no-new-wrappers.d.ts +0 -2
- package/dist/rules/quality/no-new.d.ts +0 -2
- package/dist/rules/quality/no-octal.d.ts +0 -2
- package/dist/rules/quality/no-param-reassign.d.ts +0 -2
- package/dist/rules/quality/no-proto.d.ts +0 -2
- package/dist/rules/quality/no-return-assign.d.ts +0 -2
- package/dist/rules/quality/no-sequences.d.ts +0 -2
- package/dist/rules/quality/no-shadow.d.ts +0 -2
- package/dist/rules/quality/no-throw-literal.d.ts +0 -2
- package/dist/rules/quality/no-use-before-define.d.ts +0 -2
- package/dist/rules/quality/no-useless-call.d.ts +0 -2
- package/dist/rules/quality/no-useless-concat.d.ts +0 -2
- package/dist/rules/quality/no-useless-escape.d.ts +0 -2
- package/dist/rules/quality/no-useless-rename.d.ts +0 -2
- package/dist/rules/quality/no-useless-return.d.ts +0 -2
- package/dist/rules/quality/no-var.d.ts +0 -2
- package/dist/rules/quality/no-with.d.ts +0 -2
- package/dist/rules/quality/prefer-arrow-callback.d.ts +0 -2
- package/dist/rules/quality/require-await.d.ts +0 -2
- package/dist/rules/regexp/no-super-linear-backtracking.d.ts +0 -2
- package/dist/rules/regexp/no-unused-capturing-group.d.ts +0 -2
- package/dist/rules/regexp/no-useless-lazy.d.ts +0 -9
- package/dist/rules/shell/_shared.d.ts +0 -24
- package/dist/rules/shell/command-substitution.d.ts +0 -6
- package/dist/rules/shell/consistent-case-terminators.d.ts +0 -9
- package/dist/rules/shell/function-style.d.ts +0 -6
- package/dist/rules/shell/heredoc-indent.d.ts +0 -7
- package/dist/rules/shell/indent.d.ts +0 -2
- package/dist/rules/shell/keyword-spacing.d.ts +0 -10
- package/dist/rules/shell/no-broken-redirect.d.ts +0 -7
- package/dist/rules/shell/no-cd-without-check.d.ts +0 -6
- package/dist/rules/shell/no-eval.d.ts +0 -6
- package/dist/rules/shell/no-exit-in-subshell.d.ts +0 -7
- package/dist/rules/shell/no-ls-parsing.d.ts +0 -7
- package/dist/rules/shell/no-trailing-semicolons.d.ts +0 -6
- package/dist/rules/shell/no-trailing-whitespace.d.ts +0 -5
- package/dist/rules/shell/no-useless-cat.d.ts +0 -6
- package/dist/rules/shell/no-variable-in-single-quotes.d.ts +0 -7
- package/dist/rules/shell/operator-spacing.d.ts +0 -11
- package/dist/rules/shell/prefer-double-brackets.d.ts +0 -6
- package/dist/rules/shell/prefer-printf.d.ts +0 -6
- package/dist/rules/shell/quote-variables.d.ts +0 -2
- package/dist/rules/shell/set-options.d.ts +0 -8
- package/dist/rules/shell/shebang.d.ts +0 -2
- package/dist/rules/sort/exports.d.ts +0 -2
- package/dist/rules/sort/heritage-clauses.d.ts +0 -2
- package/dist/rules/sort/imports.d.ts +0 -2
- package/dist/rules/sort/keys.d.ts +0 -2
- package/dist/rules/sort/named-imports.d.ts +0 -2
- package/dist/rules/sort/objects.d.ts +0 -2
- package/dist/rules/sort/tailwind-classes.d.ts +0 -5
- package/dist/rules/style/array-bracket-spacing.d.ts +0 -2
- package/dist/rules/style/arrow-parens.d.ts +0 -2
- package/dist/rules/style/arrow-spacing.d.ts +0 -2
- package/dist/rules/style/block-spacing.d.ts +0 -2
- package/dist/rules/style/brace-style.d.ts +0 -10
- package/dist/rules/style/comma-dangle.d.ts +0 -2
- package/dist/rules/style/comma-spacing.d.ts +0 -2
- package/dist/rules/style/comma-style.d.ts +0 -2
- package/dist/rules/style/computed-property-spacing.d.ts +0 -2
- package/dist/rules/style/consistent-chaining.d.ts +0 -2
- package/dist/rules/style/consistent-list-newline.d.ts +0 -2
- package/dist/rules/style/curly.d.ts +0 -5
- package/dist/rules/style/dot-location.d.ts +0 -2
- package/dist/rules/style/function-call-spacing.d.ts +0 -2
- package/dist/rules/style/generator-star-spacing.d.ts +0 -2
- package/dist/rules/style/if-newline.d.ts +0 -2
- package/dist/rules/style/indent-binary-ops.d.ts +0 -2
- package/dist/rules/style/indent-unindent.d.ts +0 -2
- package/dist/rules/style/key-spacing.d.ts +0 -2
- package/dist/rules/style/keyword-spacing.d.ts +0 -2
- package/dist/rules/style/lines-between-class-members.d.ts +0 -2
- package/dist/rules/style/max-statements-per-line.d.ts +0 -2
- package/dist/rules/style/multiline-ternary.d.ts +0 -2
- package/dist/rules/style/new-parens.d.ts +0 -2
- package/dist/rules/style/no-extra-parens.d.ts +0 -2
- package/dist/rules/style/no-floating-decimal.d.ts +0 -2
- package/dist/rules/style/no-mixed-operators.d.ts +0 -2
- package/dist/rules/style/no-mixed-spaces-and-tabs.d.ts +0 -2
- package/dist/rules/style/no-multi-spaces.d.ts +0 -10
- package/dist/rules/style/no-multiple-empty-lines.d.ts +0 -9
- package/dist/rules/style/no-tabs.d.ts +0 -2
- package/dist/rules/style/no-trailing-spaces.d.ts +0 -9
- package/dist/rules/style/no-whitespace-before-property.d.ts +0 -2
- package/dist/rules/style/object-curly-spacing.d.ts +0 -2
- package/dist/rules/style/operator-linebreak.d.ts +0 -2
- package/dist/rules/style/padded-blocks.d.ts +0 -2
- package/dist/rules/style/quote-props.d.ts +0 -2
- package/dist/rules/style/rest-spread-spacing.d.ts +0 -2
- package/dist/rules/style/semi-spacing.d.ts +0 -2
- package/dist/rules/style/space-before-blocks.d.ts +0 -2
- package/dist/rules/style/space-before-function-paren.d.ts +0 -2
- package/dist/rules/style/space-in-parens.d.ts +0 -2
- package/dist/rules/style/space-infix-ops.d.ts +0 -2
- package/dist/rules/style/space-unary-ops.d.ts +0 -2
- package/dist/rules/style/spaced-comment.d.ts +0 -2
- package/dist/rules/style/switch-colon-spacing.d.ts +0 -2
- package/dist/rules/style/template-curly-spacing.d.ts +0 -2
- package/dist/rules/style/template-tag-spacing.d.ts +0 -2
- package/dist/rules/style/top-level-function.d.ts +0 -6
- package/dist/rules/style/wrap-iife.d.ts +0 -2
- package/dist/rules/style/yield-star-spacing.d.ts +0 -2
- package/dist/rules/ts/member-delimiter-style.d.ts +0 -4
- package/dist/rules/ts/no-explicit-any.d.ts +0 -2
- package/dist/rules/ts/no-floating-promises.d.ts +0 -2
- package/dist/rules/ts/no-misused-promises.d.ts +0 -2
- package/dist/rules/ts/no-require-imports.d.ts +0 -2
- package/dist/rules/ts/no-top-level-await.d.ts +0 -4
- package/dist/rules/ts/no-ts-export-equal.d.ts +0 -2
- package/dist/rules/ts/no-unsafe-assignment.d.ts +0 -2
- package/dist/rules/ts/prefer-nullish-coalescing.d.ts +0 -2
- package/dist/rules/ts/prefer-optional-chain.d.ts +0 -2
- package/dist/rules/ts/type-annotation-spacing.d.ts +0 -2
- package/dist/rules/ts/type-generic-spacing.d.ts +0 -2
- package/dist/rules/ts/type-named-tuple-spacing.d.ts +0 -2
package/dist/utils.d.ts
CHANGED
|
@@ -43,31 +43,12 @@ export declare function shouldIgnorePath(absPath: string, ignoreGlobs: string[])
|
|
|
43
43
|
* This prevents infinite loops when fixers keep modifying content.
|
|
44
44
|
*/
|
|
45
45
|
export declare const MAX_FIXER_PASSES: 5;
|
|
46
|
-
|
|
47
|
-
* Environment variable configuration with defaults.
|
|
48
|
-
* Centralized to avoid scattered parsing and provide documentation.
|
|
49
|
-
*/
|
|
50
|
-
export declare const ENV: {
|
|
51
|
-
/** Enable verbose trace logging. Set PICKIER_TRACE=1 to enable. */
|
|
52
|
-
get TRACE: () => unknown;
|
|
53
|
-
/** Glob timeout in milliseconds. Default: 8000ms */
|
|
54
|
-
get TIMEOUT_MS: () => unknown;
|
|
55
|
-
/** Per-rule timeout in milliseconds. Default: 5000ms */
|
|
56
|
-
get RULE_TIMEOUT_MS: () => unknown;
|
|
57
|
-
/** Parallel file processing concurrency. Default: 8 */
|
|
58
|
-
get CONCURRENCY: () => unknown;
|
|
59
|
-
/** Enable diagnostics mode. Set PICKIER_DIAGNOSTICS=1 to enable. */
|
|
60
|
-
get DIAGNOSTICS: () => unknown;
|
|
61
|
-
/** Treat warnings as errors. Set PICKIER_FAIL_ON_WARNINGS=1 to enable. */
|
|
62
|
-
get FAIL_ON_WARNINGS: () => unknown;
|
|
63
|
-
/** Disable auto-loading of config. Set PICKIER_NO_AUTO_CONFIG=1 to disable. */
|
|
64
|
-
get NO_AUTO_CONFIG: () => unknown
|
|
65
|
-
};
|
|
46
|
+
export declare const ENV: EnvConfig;
|
|
66
47
|
/**
|
|
67
48
|
* Universal ignore patterns that should apply everywhere.
|
|
68
49
|
* These are always excluded regardless of project-specific config.
|
|
69
50
|
*/
|
|
70
|
-
export declare const UNIVERSAL_IGNORES: readonly [
|
|
51
|
+
export declare const UNIVERSAL_IGNORES: readonly string[];
|
|
71
52
|
export declare const colors: {
|
|
72
53
|
green: (text: string) => string
|
|
73
54
|
red: (text: string) => string
|
|
@@ -88,3 +69,16 @@ declare interface GlobOptions {
|
|
|
88
69
|
absolute?: boolean
|
|
89
70
|
cwd?: string
|
|
90
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Environment variable configuration with defaults.
|
|
74
|
+
* Centralized to avoid scattered parsing and provide documentation.
|
|
75
|
+
*/
|
|
76
|
+
export declare interface EnvConfig {
|
|
77
|
+
readonly TRACE: boolean
|
|
78
|
+
readonly TIMEOUT_MS: number
|
|
79
|
+
readonly RULE_TIMEOUT_MS: number
|
|
80
|
+
readonly CONCURRENCY: number
|
|
81
|
+
readonly DIAGNOSTICS: boolean
|
|
82
|
+
readonly FAIL_ON_WARNINGS: boolean
|
|
83
|
+
readonly NO_AUTO_CONFIG: boolean
|
|
84
|
+
}
|
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.28",
|
|
5
5
|
"description": "Format, lint and more in a fraction of seconds.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
"test:watch": "PICKIER_NO_AUTO_CONFIG=1 bun test --watch"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@stacksjs/clapp": "^0.2.
|
|
80
|
+
"@stacksjs/clapp": "^0.2.3"
|
|
81
81
|
},
|
|
82
82
|
"optionalDependencies": {
|
|
83
|
-
"ts-spell-check": "^0.1.0"
|
|
83
|
+
"@stacksjs/ts-spell-check": "^0.1.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"bunfig": "^0.15.
|
|
86
|
+
"bunfig": "^0.15.11"
|
|
87
87
|
}
|
|
88
88
|
}
|
package/dist/ast.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare function buildSourceMap(text: string): SourceMap;
|
|
2
|
-
// Very small tokenizer sufficient for structural tasks. Tracks strings, template, regex, comments.
|
|
3
|
-
export declare function tokenize(text: string): Token[];
|
|
4
|
-
export declare function findMatching(text: string, start: number, open: string, close: string): number;
|
|
5
|
-
// Lightweight parsing utilities (no deps). Intentionally minimal for Pickier rules.
|
|
6
|
-
// Provides tokenization, simple bracket matching, and loc <-> index mapping.
|
|
7
|
-
export declare interface Loc { line: number, column: number }
|
|
8
|
-
export declare interface Range { start: number, end: number }
|
|
9
|
-
export declare interface Token { type: string, value: string, start: number, end: number }
|
|
10
|
-
export declare interface SourceMap {
|
|
11
|
-
lineStarts: number[]
|
|
12
|
-
indexToLoc: (idx: number) => Loc
|
|
13
|
-
}
|
package/dist/plugins/eslint.d.ts
DELETED
package/dist/plugins/index.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { PickierPlugin } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Lockfile security plugin for pickier.
|
|
4
|
-
*
|
|
5
|
-
* Validates lockfiles (package-lock.json, yarn.lock, bun.lock) for security issues
|
|
6
|
-
* that could indicate supply chain attacks.
|
|
7
|
-
*
|
|
8
|
-
* Rules:
|
|
9
|
-
* - validate-host: Ensure packages are from allowed registry hosts
|
|
10
|
-
* - validate-https: Ensure packages use HTTPS protocol
|
|
11
|
-
* - validate-integrity: Ensure packages use strong integrity hashes (SHA512)
|
|
12
|
-
* - validate-package-names: Ensure package names match their resolved URLs
|
|
13
|
-
* - validate-scheme: Ensure packages use allowed URL schemes
|
|
14
|
-
*
|
|
15
|
-
* Attack vectors protected against:
|
|
16
|
-
* 1. Malicious Host Injection - Attacker modifies lockfile to point to malicious registries
|
|
17
|
-
* 2. Package Name Substitution - Lockfile references wrong package name in URL
|
|
18
|
-
* 3. Unencrypted Protocol Usage - Using HTTP instead of HTTPS (MITM attacks)
|
|
19
|
-
* 4. Weak Integrity Hashes - Using SHA1/SHA256 instead of SHA512 (collision attacks)
|
|
20
|
-
* 5. Unauthorized URL Schemes - Using file://, data://, git+http://, etc.
|
|
21
|
-
*/
|
|
22
|
-
export declare const lockfilePlugin: PickierPlugin;
|
package/dist/plugins/node.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { PickierPlugin } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Perfectionist plugin - provides compatibility with perfectionist ESLint plugin
|
|
4
|
-
* These rules are aliases to existing Pickier rules under different namespaces
|
|
5
|
-
*/
|
|
6
|
-
export declare const perfectionistPlugin: PickierPlugin;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PickierPlugin } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* publint plugin for pickier.
|
|
4
|
-
*
|
|
5
|
-
* Validates package.json files for correct npm publishing configuration.
|
|
6
|
-
* Checks exports/imports ordering, field types, file format, module system, etc.
|
|
7
|
-
*
|
|
8
|
-
* Ported from publint (https://publint.dev).
|
|
9
|
-
*/
|
|
10
|
-
export declare const publintPlugin: PickierPlugin;
|
package/dist/plugins/regexp.d.ts
DELETED
package/dist/plugins/shell.d.ts
DELETED
package/dist/plugins/spell.d.ts
DELETED
package/dist/plugins/style.d.ts
DELETED
package/dist/plugins/ts.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { PickierPlugin } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* unused-imports plugin - provides compatibility with unused-imports ESLint plugin
|
|
4
|
-
* These rules are aliases to existing Pickier rules under different namespaces
|
|
5
|
-
*/
|
|
6
|
-
export declare const unusedImportsPlugin: PickierPlugin;
|
package/dist/plugins/utils.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
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,13 +0,0 @@
|
|
|
1
|
-
import type { RuleModule } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Disallow `new` operators outside of assignments or comparisons.
|
|
4
|
-
* Prevents using `new` for side effects without storing the result.
|
|
5
|
-
*
|
|
6
|
-
* Violations:
|
|
7
|
-
* - `new MyClass()` (result not used)
|
|
8
|
-
*
|
|
9
|
-
* Valid:
|
|
10
|
-
* - `const instance = new MyClass()`
|
|
11
|
-
* - `return new MyClass()`
|
|
12
|
-
*/
|
|
13
|
-
export declare const noNew: RuleModule;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { RuleModule } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Disallow multiple spaces in regular expressions.
|
|
4
|
-
* Use quantifiers like {2} instead for clarity.
|
|
5
|
-
*
|
|
6
|
-
* Violations:
|
|
7
|
-
* - `/foo bar/` (use /foo {2}bar/ instead)
|
|
8
|
-
* - `/ +/` (multiple spaces)
|
|
9
|
-
*/
|
|
10
|
-
export declare const noRegexSpaces: RuleModule;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detect lockfile type from filename
|
|
3
|
-
*/
|
|
4
|
-
export declare function detectLockfileType(filePath: string): 'npm' | 'yarn' | 'bun' | null;
|
|
5
|
-
/**
|
|
6
|
-
* Check if content is a lockfile based on structure
|
|
7
|
-
*/
|
|
8
|
-
export declare function isLockfileContent(content: string, filePath: string): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Parse npm package-lock.json (supports v1, v2, v3)
|
|
11
|
-
*/
|
|
12
|
-
export declare function parseNpmLockfile(content: string): ParsedLockfile;
|
|
13
|
-
/**
|
|
14
|
-
* Parse yarn.lock (supports classic v1 and berry/v2+)
|
|
15
|
-
*/
|
|
16
|
-
export declare function parseYarnLockfile(content: string): ParsedLockfile;
|
|
17
|
-
/**
|
|
18
|
-
* Parse bun.lock (JSON format)
|
|
19
|
-
*
|
|
20
|
-
* Bun lockfile format (v1):
|
|
21
|
-
* {
|
|
22
|
-
* "lockfileVersion": 1,
|
|
23
|
-
* "packages": {
|
|
24
|
-
* "pkg-name": ["pkg-name@version", "resolved-url", { deps }, "integrity-hash"],
|
|
25
|
-
* "@scope/pkg": ["@scope/pkg@version", "", { deps }, "sha512-..."],
|
|
26
|
-
* }
|
|
27
|
-
* }
|
|
28
|
-
*
|
|
29
|
-
* Array format: [name@version, resolved_url, meta_object, integrity_hash]
|
|
30
|
-
* Note: resolved_url is often empty string for packages from default registry
|
|
31
|
-
*/
|
|
32
|
-
export declare function parseBunLockfile(content: string): ParsedLockfile;
|
|
33
|
-
/**
|
|
34
|
-
* Parse a lockfile based on its type
|
|
35
|
-
*/
|
|
36
|
-
export declare function parseLockfile(content: string, filePath: string): ParsedLockfile | null;
|
|
37
|
-
/**
|
|
38
|
-
* Extract host from a resolved URL
|
|
39
|
-
*/
|
|
40
|
-
export declare function extractHost(resolvedUrl: string): string | null;
|
|
41
|
-
/**
|
|
42
|
-
* Extract protocol/scheme from a resolved URL
|
|
43
|
-
*/
|
|
44
|
-
export declare function extractScheme(resolvedUrl: string): string | null;
|
|
45
|
-
/**
|
|
46
|
-
* Extract package name from a resolved URL
|
|
47
|
-
* Works for npm/yarn registry URLs like:
|
|
48
|
-
* - https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz
|
|
49
|
-
* - https://registry.npmjs.org/@babel/core/-/core-7.0.0.tgz
|
|
50
|
-
*/
|
|
51
|
-
export declare function extractPackageNameFromUrl(resolvedUrl: string): string | null;
|
|
52
|
-
/**
|
|
53
|
-
* Extract integrity hash type (sha1, sha256, sha512, etc.)
|
|
54
|
-
*/
|
|
55
|
-
export declare function extractIntegrityType(integrity: string): string | null;
|
|
56
|
-
/**
|
|
57
|
-
* Expand host aliases to actual hostnames
|
|
58
|
-
*/
|
|
59
|
-
export declare function expandHostAliases(hosts: string[]): string[];
|
|
60
|
-
// Registry aliases for convenience
|
|
61
|
-
export declare const REGISTRY_ALIASES: {
|
|
62
|
-
npm: 'registry.npmjs.org';
|
|
63
|
-
yarn: 'registry.yarnpkg.com';
|
|
64
|
-
verdaccio: 'registry.verdaccio.org'
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Lockfile parser for npm, yarn, and bun lockfiles.
|
|
68
|
-
* Normalizes different formats into a unified structure for validation.
|
|
69
|
-
*/
|
|
70
|
-
export declare interface ParsedPackage {
|
|
71
|
-
name: string
|
|
72
|
-
version: string
|
|
73
|
-
resolved?: string
|
|
74
|
-
integrity?: string
|
|
75
|
-
}
|
|
76
|
-
export declare interface ParsedLockfile {
|
|
77
|
-
type: 'npm' | 'yarn' | 'yarn-berry' | 'bun'
|
|
78
|
-
packages: Map<string, ParsedPackage>
|
|
79
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { RuleModule } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validate that all packages in a lockfile are from allowed hosts.
|
|
4
|
-
* Prevents supply chain attacks where an attacker modifies the lockfile
|
|
5
|
-
* to point packages to malicious registries.
|
|
6
|
-
*
|
|
7
|
-
* Options:
|
|
8
|
-
* - allowedHosts: Array of allowed hostnames or aliases ('npm', 'yarn', 'verdaccio')
|
|
9
|
-
* - emptyHostname: Whether to allow packages with empty/missing resolved URLs (default: true)
|
|
10
|
-
*
|
|
11
|
-
* Example config:
|
|
12
|
-
* ```ts
|
|
13
|
-
* pluginRules: {
|
|
14
|
-
* 'lockfile/validate-host': ['error', { allowedHosts: ['npm', 'yarn'] }]
|
|
15
|
-
* }
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare const validateHost: RuleModule;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { RuleModule } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validate that all packages use HTTPS protocol.
|
|
4
|
-
* Prevents man-in-the-middle attacks where packages could be intercepted
|
|
5
|
-
* and replaced when downloaded over unencrypted HTTP.
|
|
6
|
-
*
|
|
7
|
-
* Example config:
|
|
8
|
-
* ```ts
|
|
9
|
-
* pluginRules: {
|
|
10
|
-
* 'lockfile/validate-https': 'error'
|
|
11
|
-
* }
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export declare const validateHttps: RuleModule;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { RuleModule } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validate that all packages use strong integrity hashes (SHA512).
|
|
4
|
-
* Weak hash algorithms like SHA1 and SHA256 are more susceptible to
|
|
5
|
-
* collision attacks, potentially allowing attackers to substitute
|
|
6
|
-
* malicious packages that match the same hash.
|
|
7
|
-
*
|
|
8
|
-
* Options:
|
|
9
|
-
* - requiredAlgorithm: The minimum required hash algorithm (default: 'sha512')
|
|
10
|
-
* - exclude: Array of package names to exclude from validation
|
|
11
|
-
*
|
|
12
|
-
* Example config:
|
|
13
|
-
* ```ts
|
|
14
|
-
* pluginRules: {
|
|
15
|
-
* 'lockfile/validate-integrity': ['error', { requiredAlgorithm: 'sha512', exclude: [] }]
|
|
16
|
-
* }
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export declare const validateIntegrity: RuleModule;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { RuleModule } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validate that package names in lockfile match the resolved URL.
|
|
4
|
-
* Detects package substitution attacks where an attacker replaces a legitimate
|
|
5
|
-
* package with a malicious one by pointing to a different package in the URL.
|
|
6
|
-
*
|
|
7
|
-
* Example attack:
|
|
8
|
-
* Package key: meow@1.0.0
|
|
9
|
-
* Resolved URL: https://registry.npmjs.org/meowlicious/-/meow-4.0.1.tgz
|
|
10
|
-
* The URL points to a different package (meowlicious) than expected (meow).
|
|
11
|
-
*
|
|
12
|
-
* Options:
|
|
13
|
-
* - aliases: Object mapping package names to allowed URL names
|
|
14
|
-
* Example: { 'foo': 'foo-package' } allows 'foo' to resolve to 'foo-package'
|
|
15
|
-
*
|
|
16
|
-
* Example config:
|
|
17
|
-
* ```ts
|
|
18
|
-
* pluginRules: {
|
|
19
|
-
* 'lockfile/validate-package-names': ['error', { aliases: {} }]
|
|
20
|
-
* }
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export declare const validatePackageNames: RuleModule;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { RuleModule } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validate that all packages use allowed URL schemes/protocols.
|
|
4
|
-
* Prevents attacks using unexpected schemes like file://, data://,
|
|
5
|
-
* git+http://, or other protocols that might bypass security policies.
|
|
6
|
-
*
|
|
7
|
-
* Options:
|
|
8
|
-
* - allowedSchemes: Array of allowed URL schemes (default: ['https:', 'git+https:', 'git+ssh:'])
|
|
9
|
-
*
|
|
10
|
-
* Example config:
|
|
11
|
-
* ```ts
|
|
12
|
-
* pluginRules: {
|
|
13
|
-
* 'lockfile/validate-scheme': ['error', { allowedSchemes: ['https:', 'git+ssh:'] }]
|
|
14
|
-
* }
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare const validateScheme: RuleModule;
|