@contextlint/cli 0.5.1 → 0.5.2

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.
Files changed (2) hide show
  1. package/README.md +14 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -12,13 +12,20 @@ npm install -D @contextlint/cli
12
12
  ## Usage
13
13
 
14
14
  ```bash
15
- contextlint --config contextlint.config.json "docs/**/*.md"
15
+ npx contextlint
16
16
  ```
17
17
 
18
- Or run without installing:
18
+ contextlint auto-detects `contextlint.config.json` from the current
19
+ or any parent directory. You can also specify a config path explicitly:
19
20
 
20
21
  ```bash
21
- npx @contextlint/cli --config contextlint.config.json "docs/**/*.md"
22
+ npx contextlint --config path/to/contextlint.config.json
23
+ ```
24
+
25
+ File patterns can be passed as arguments to override the `include` field:
26
+
27
+ ```bash
28
+ npx contextlint "docs/**/*.md"
22
29
  ```
23
30
 
24
31
  ## Configuration
@@ -28,6 +35,7 @@ Create `contextlint.config.json`:
28
35
  ```json
29
36
  {
30
37
  "$schema": "https://raw.githubusercontent.com/nozomi-koborinai/contextlint/main/schema.json",
38
+ "include": ["docs/**/*.md"],
31
39
  "rules": [
32
40
  { "rule": "tbl001", "options": { "requiredColumns": ["ID", "Status"] } },
33
41
  { "rule": "tbl002", "options": { "columns": ["ID", "Status"] } },
@@ -37,7 +45,9 @@ Create `contextlint.config.json`:
37
45
  ```
38
46
 
39
47
  Adding `$schema` enables autocomplete in VS Code, Cursor,
40
- JetBrains, and other editors.
48
+ JetBrains, and other editors. The `include` field defines default
49
+ file patterns; CLI arguments override it. When neither is set,
50
+ `**/*.md` is used.
41
51
 
42
52
  See the
43
53
  [main repository](https://github.com/nozomi-koborinai/contextlint)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextlint/cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "CLI entry point for contextlint",
5
5
  "type": "module",
6
6
  "exports": {
@@ -20,7 +20,7 @@
20
20
  "typecheck": "tsc --noEmit"
21
21
  },
22
22
  "dependencies": {
23
- "@contextlint/core": "0.5.1",
23
+ "@contextlint/core": "0.5.2",
24
24
  "commander": "^14.0.0"
25
25
  },
26
26
  "publishConfig": {