@eslint-sh/eslint-plugin 0.8.0 → 0.10.0
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 +58 -57
- package/dist/api.d.ts +92 -0
- package/dist/api.js +83 -0
- package/dist/command-harvest/builtins/bats.d.ts +1 -1
- package/dist/command-harvest/harvest-commands.d.ts +18 -7
- package/dist/command-harvest/harvest-commands.js +11 -10
- package/dist/command-harvest/wrapper-table.d.ts +1 -1
- package/dist/command-harvest/wrapper-table.js +1 -1
- package/dist/configs/posix-portable.d.ts +6 -10
- package/dist/configs/posix-portable.js +4 -6
- package/dist/configuration-message.d.ts +14 -0
- package/dist/configuration-message.js +33 -0
- package/dist/declaration-conventions/get-declared-commands.d.ts +41 -0
- package/dist/declaration-conventions/{read-declared-commands.js → get-declared-commands.js} +43 -43
- package/dist/eslint-plugin-api.d.ts +1516 -0
- package/dist/eslint-plugin.d.ts +16 -1560
- package/dist/index.d.ts +14 -81
- package/dist/index.js +22 -76
- package/dist/language/command-resolution.d.ts +47 -13
- package/dist/language/command-resolution.js +48 -18
- package/dist/language/selector-classes.d.ts +7 -3
- package/dist/language/selector-classes.js +13 -4
- package/dist/language/shell-language-options.d.ts +3 -3
- package/dist/language/shell-language-options.js +12 -17
- package/dist/language/shell-language.d.ts +3 -1
- package/dist/language/shell-language.js +6 -11
- package/dist/language/shell-source-code.d.ts +77 -77
- package/dist/language/shell-source-code.js +107 -98
- package/dist/language/source-coordinates.d.ts +2 -0
- package/dist/language/source-coordinates.js +8 -4
- package/dist/language/syntax-view.d.ts +1 -1
- package/dist/language/syntax-view.js +19 -7
- package/dist/language/word-resolution.d.ts +4 -3
- package/dist/language/word-resolution.js +10 -5
- package/dist/rules/compat/declaration-options.js +2 -2
- package/dist/rules/compat/no-brace-sequence-padding-step.js +1 -1
- package/dist/rules/compat/no-mapfile.js +2 -2
- package/dist/rules/compat/no-negative-array-index.js +2 -2
- package/dist/rules/compat/no-printf-time-format.js +2 -2
- package/dist/rules/compat/no-test-v.js +2 -2
- package/dist/rules/compat/no-wait-n.js +2 -2
- package/dist/rules/compat/posix-absent-command.js +2 -2
- package/dist/rules/compat/shopt-options.js +2 -2
- package/dist/rules/create-wrapper-rule.d.ts +4 -4
- package/dist/rules/create-wrapper-rule.js +19 -13
- package/dist/rules/define-shell-rule.js +1 -1
- package/dist/rules/no-dynamic-invocation.d.ts +1 -1
- package/dist/rules/no-dynamic-invocation.js +12 -4
- package/dist/rules/no-eval.js +6 -2
- package/dist/rules/no-masked-exit-status.d.ts +4 -3
- package/dist/rules/no-masked-exit-status.js +4 -3
- package/dist/rules/no-secret-env-reads.d.ts +2 -0
- package/dist/rules/no-secret-env-reads.js +14 -3
- package/dist/rules/no-secret-flags.d.ts +2 -0
- package/dist/rules/no-secret-flags.js +14 -3
- package/dist/rules/no-unchecked-cd.js +4 -3
- package/dist/rules/no-undeclared-commands.js +10 -4
- package/dist/rules/no-unused-declarations.js +13 -4
- package/dist/rules/prefer-local.d.ts +3 -2
- package/dist/rules/prefer-local.js +4 -2
- package/dist/rules/quote-expansions.js +1 -1
- package/dist/rules/require-network-wrapper.d.ts +2 -2
- package/dist/rules/require-network-wrapper.js +21 -11
- package/dist/rules/require-strict-mode.d.ts +5 -46
- package/dist/rules/require-strict-mode.js +17 -107
- package/dist/rules/require-tty-guard.d.ts +2 -0
- package/dist/rules/require-tty-guard.js +9 -2
- package/dist/rules/resolve-declaration-convention.d.ts +9 -88
- package/dist/rules/resolve-declaration-convention.js +19 -71
- package/dist/rules/resolve-network-wrapper.d.ts +3 -4
- package/dist/rules/resolve-network-wrapper.js +23 -19
- package/dist/rules/resolve-transparent-wrappers.d.ts +3 -8
- package/dist/rules/resolve-transparent-wrappers.js +21 -11
- package/dist/rules/set-options.d.ts +1 -1
- package/dist/rules/set-options.js +1 -1
- package/dist/rules/strict-mode-prologue.d.ts +43 -0
- package/dist/rules/strict-mode-prologue.js +91 -0
- package/dist/rules/transparent-wrappers.d.ts +3 -3
- package/dist/rules/transparent-wrappers.js +1 -1
- package/dist/rules/user-pattern.d.ts +4 -3
- package/dist/rules/user-pattern.js +10 -8
- package/dist/shell-dialect.d.ts +8 -0
- package/dist/shell-dialect.js +22 -0
- package/dist/version.js +2 -1
- package/docs/compat.md +5 -6
- package/docs/custom-rule-tutorial.md +55 -51
- package/docs/declaration-conventions.md +20 -23
- package/docs/error-codes.md +94 -0
- package/docs/examples/no-backticks-rule.mjs +1 -1
- package/docs/examples/no-curl-in-functions-rule.mjs +2 -2
- package/docs/examples/no-listed-commands-rule.ts +1 -1
- package/docs/examples/no-rm-rf-rule.mjs +8 -10
- package/docs/examples/sorted-declarations-rule.mjs +6 -9
- package/docs/examples/tsconfig.json +10 -0
- package/docs/rules/README.md +12 -4
- package/docs/rules/compat/no-nounset-empty-array.md +1 -1
- package/docs/rules/no-dynamic-invocation.md +5 -0
- package/docs/rules/no-masked-exit-status.md +2 -2
- package/docs/rules/no-secret-env-reads.md +13 -3
- package/docs/rules/no-secret-flags.md +14 -5
- package/docs/rules/no-unchecked-cd.md +15 -2
- package/docs/rules/no-undeclared-commands.md +4 -0
- package/docs/rules/no-unused-declarations.md +4 -0
- package/docs/rules/require-network-wrapper.md +6 -6
- package/docs/rules/require-strict-mode.md +25 -23
- package/docs/rules/require-tty-guard.md +12 -3
- package/docs/selectors.md +7 -2
- package/docs/wrapper-rules.md +3 -1
- package/package.json +9 -20
- package/dist/declaration-conventions/read-declared-commands.d.ts +0 -70
- package/dist/eslint-plugin-syntax-analyze.d.ts +0 -23
- package/dist/eslint-plugin-syntax.d.ts +0 -31
- package/dist/syntax/analyze.d.ts +0 -19
- package/dist/syntax/analyze.js +0 -21
- package/dist/syntax/index.d.ts +0 -27
- package/dist/syntax/index.js +0 -29
package/dist/syntax/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @api-extractor-tools/package-documentation -- this file is the barrel of the
|
|
2
|
-
`./syntax` entry point (package.json `exports`); the rule only recognizes the root barrel. */
|
|
3
|
-
/**
|
|
4
|
-
* The faithful shell syntax surface (`@eslint-sh/eslint-plugin/syntax`): the complete public
|
|
5
|
-
* surface of `sh-ast`'s root entry point, re-exported unchanged from the very `sh-ast` instance
|
|
6
|
-
* this plugin's language parses with.
|
|
7
|
-
*
|
|
8
|
-
* Use it when a custom rule edits or analyzes the parser's own records rather than the plugin's
|
|
9
|
-
* lint view: `walk`, `parseSync`, `printSync` and `PrintOptions`, the record types (`Node`,
|
|
10
|
-
* `Word`, `CallExpr`, `SyntaxPos`, `GoString`, …), and the operator and language constants.
|
|
11
|
-
* Importing them from here, instead of installing `sh-ast` separately, means a rule always gets
|
|
12
|
-
* the same `sh-ast` version and module instance as the language that produced its syntax. Under
|
|
13
|
-
* 0.x a different `sh-ast` minor is a breaking change, and records from one copy are not
|
|
14
|
-
* guaranteed to be accepted by another.
|
|
15
|
-
*
|
|
16
|
-
* This entry point tracks the plugin's pinned `sh-ast` minor, so an `sh-ast` 0.x minor bump is a
|
|
17
|
-
* minor release of this plugin. It never wraps or renames anything: every name has `sh-ast`'s
|
|
18
|
-
* own contract. The plugin root (`@eslint-sh/eslint-plugin`) keeps the view-aware helpers such
|
|
19
|
-
* as `resolveWord(ShellNode)`, which differ from the raw helpers of the same name in
|
|
20
|
-
* `@eslint-sh/eslint-plugin/syntax/analyze`. That is why these names live on their own subpath
|
|
21
|
-
* and are not merged into the root.
|
|
22
|
-
*
|
|
23
|
-
* The low-level `printSync` keeps upstream behavior, including changes to literal vertical tabs
|
|
24
|
-
* and form feeds. It does not apply the high-level content refusal used by `format` and
|
|
25
|
-
* `ShellSourceCode.getPrintedReplacement`; callers printing directly must account for that loss.
|
|
26
|
-
*
|
|
27
|
-
* @packageDocumentation
|
|
28
|
-
*/
|
|
29
|
-
export * from 'sh-ast';
|