@eslint-sh/eslint-plugin 0.8.0 → 0.9.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 +41 -34
- package/dist/api.d.ts +92 -0
- package/dist/api.js +83 -0
- package/dist/command-harvest/harvest-commands.d.ts +2 -2
- package/dist/command-harvest/harvest-commands.js +2 -2
- 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 +1506 -0
- package/dist/eslint-plugin-syntax-analyze.d.ts +3 -3
- package/dist/eslint-plugin-syntax.d.ts +3 -4
- 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 +5 -5
- package/dist/language/command-resolution.js +11 -7
- 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 +59 -42
- package/dist/language/shell-source-code.js +86 -60
- package/dist/language/source-coordinates.d.ts +2 -0
- package/dist/language/source-coordinates.js +8 -4
- package/dist/language/syntax-view.js +19 -7
- package/dist/language/word-resolution.d.ts +2 -1
- package/dist/language/word-resolution.js +8 -3
- package/dist/rules/create-wrapper-rule.d.ts +1 -1
- package/dist/rules/create-wrapper-rule.js +11 -9
- package/dist/rules/define-shell-rule.js +1 -1
- package/dist/rules/no-masked-exit-status.d.ts +4 -3
- package/dist/rules/no-masked-exit-status.js +3 -2
- package/dist/rules/no-secret-env-reads.d.ts +2 -0
- package/dist/rules/no-secret-env-reads.js +13 -2
- 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 +3 -2
- package/dist/rules/no-undeclared-commands.js +8 -3
- package/dist/rules/no-unused-declarations.js +6 -2
- package/dist/rules/prefer-local.d.ts +3 -2
- package/dist/rules/prefer-local.js +4 -2
- package/dist/rules/require-network-wrapper.d.ts +1 -1
- package/dist/rules/require-network-wrapper.js +11 -7
- 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 +8 -1
- 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 +1 -2
- package/dist/rules/resolve-network-wrapper.js +18 -14
- package/dist/rules/resolve-transparent-wrappers.d.ts +2 -7
- package/dist/rules/resolve-transparent-wrappers.js +19 -9
- 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/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/syntax/analyze.d.ts +3 -3
- package/dist/syntax/analyze.js +3 -3
- package/dist/syntax/index.d.ts +3 -4
- package/dist/syntax/index.js +3 -4
- package/dist/version.js +2 -1
- package/docs/compat.md +5 -6
- package/docs/custom-rule-tutorial.md +22 -18
- package/docs/declaration-conventions.md +20 -23
- package/docs/error-codes.md +93 -0
- 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-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/require-network-wrapper.md +5 -5
- 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 +2 -0
- package/package.json +3 -3
- package/dist/declaration-conventions/read-declared-commands.d.ts +0 -70
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* arguments in its site's `argv`), `DEFAULT_TRANSPARENT_WRAPPERS`, `WrapperSpec`, the raw
|
|
8
8
|
* `resolveWord(Node)`, and the named operator constants with `rawOperator` for comparing and
|
|
9
9
|
* constructing the operator values those records carry. All of it works on the faithful records
|
|
10
|
-
* from `@eslint-sh/eslint-plugin/syntax`.
|
|
11
|
-
* `
|
|
12
|
-
*
|
|
10
|
+
* from `@eslint-sh/eslint-plugin/syntax`. For lint-view Word nodes, rules use
|
|
11
|
+
* `context.sourceCode.resolveWord(word)`, whose default policy comes from grammar position.
|
|
12
|
+
* This raw analyzer retains upstream defaults and never infers lint-view context.
|
|
13
13
|
*
|
|
14
14
|
* Like `@eslint-sh/eslint-plugin/syntax`, it tracks the plugin's pinned `sh-ast` minor and never
|
|
15
15
|
* wraps or renames anything.
|
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
*
|
|
14
14
|
* This entry point tracks the plugin's pinned `sh-ast` minor, so an `sh-ast` 0.x minor bump is a
|
|
15
15
|
* minor release of this plugin. It never wraps or renames anything: every name has `sh-ast`'s
|
|
16
|
-
* own contract.
|
|
17
|
-
*
|
|
18
|
-
* `@eslint-sh/eslint-plugin/syntax/analyze
|
|
19
|
-
* and are not merged into the root.
|
|
16
|
+
* own contract. Rules analyze lint-view words through `context.sourceCode.resolveWord(word)`,
|
|
17
|
+
* which supplies the word's grammar context. Raw syntax analysis lives in
|
|
18
|
+
* `@eslint-sh/eslint-plugin/syntax/analyze`, separate from the lint view.
|
|
20
19
|
*
|
|
21
20
|
* The low-level `printSync` keeps upstream behavior, including changes to literal vertical tabs
|
|
22
21
|
* and form feeds. It does not apply the high-level content refusal used by `format` and
|