@eslint-sh/eslint-plugin 0.1.0 → 0.1.1
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 +9 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,36 +1,14 @@
|
|
|
1
1
|
# @eslint-sh/eslint-plugin
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
traverse `.sh`/`.bash` files,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
| ----------------- | ----------------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
-
| `dialect` | `"bash"`, `"posix"`, `"mksh"`, `"bats"`, `"zsh"` | `"bash"` | Selects which shell grammar the parser accepts; parsing a construct outside the chosen dialect produces a parse error. |
|
|
14
|
-
| `shellVersion` | A numeric `MAJOR` or `MAJOR.MINOR` string, e.g. `"5"` or `"3.2"` | unset | Reserved for the rule layer (e.g. a future bash-3.2 compatibility check); has no effect on parsing today since no rules ship yet. |
|
|
15
|
-
| `directivePrefix` | Lowercase, hyphen-separated words, e.g. `"eslint"` or `"shellcheck-sh"` | `"eslint"` | The prefix directive/inline-config comments must start with — e.g. the default recognizes `# eslint-disable-next-line ...`. |
|
|
16
|
-
|
|
17
|
-
This release reports shell syntax (parse) errors only — no lint rules ship yet, so a "0 problems"
|
|
18
|
-
result means the script parsed without a syntax error, not that it is problem-free.
|
|
19
|
-
|
|
20
|
-
```js
|
|
21
|
-
// eslint.config.mjs
|
|
22
|
-
import { defineConfig } from 'eslint/config';
|
|
23
|
-
import sh from '@eslint-sh/eslint-plugin'; // or the umbrella: import sh from "eslint-sh"
|
|
24
|
-
|
|
25
|
-
export default defineConfig([
|
|
26
|
-
{
|
|
27
|
-
files: ['**/*.sh', '**/*.bash'],
|
|
28
|
-
plugins: { sh },
|
|
29
|
-
language: 'sh/sh',
|
|
30
|
-
languageOptions: { dialect: 'bash', shellVersion: '3.2' },
|
|
31
|
-
},
|
|
32
|
-
]);
|
|
33
|
-
```
|
|
3
|
+
The underlying ESLint plugin behind the `eslint-sh` umbrella package: shell script parsing and
|
|
4
|
+
syntax-error reporting for ESLint, with custom-rule authoring over a typed shell AST. Provides the
|
|
5
|
+
`ShellLanguage` / `ShellSourceCode` core that lets ESLint parse and traverse `.sh`/`.bash` files,
|
|
6
|
+
backed by `sh-ast`.
|
|
7
|
+
|
|
8
|
+
For installation, the config example, the `languageOptions` reference table, the capability
|
|
9
|
+
caveat, and troubleshooting, see the [`eslint-sh` package's README](https://github.com/mike-north/eslint-sh/blob/main/packages/eslint-sh/README.md) —
|
|
10
|
+
that's the canonical quickstart for this project, and applies whether you install `eslint-sh` or
|
|
11
|
+
this package directly.
|
|
34
12
|
|
|
35
13
|
## Status
|
|
36
14
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-sh/eslint-plugin",
|
|
3
3
|
"description": "Shell script parsing and syntax-error reporting for ESLint, with custom-rule authoring over a typed shell AST, backed by sh-ast.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"author": "Mike North <michael.l.north@gmail.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@eslint/core": "^1.2.1",
|