cspell-cli 6.24.0 → 6.27.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.
Files changed (3) hide show
  1. package/README.md +40 -16
  2. package/index.js +2 -2
  3. package/package.json +11 -4
package/README.md CHANGED
@@ -63,38 +63,49 @@ docker run -v $PWD:/workdir ghcr.io/streetsidesoftware/cspell:latest "**"
63
63
 
64
64
  ## Usage
65
65
 
66
+ <!--- @@inject: static/lint-help.txt --->
67
+
66
68
  ```
67
- Usage: cspell-cli lint [options] [globs...]
69
+ Usage: cspell lint [options] [globs...] [file://<path> ...] [stdin[://<path>]]
70
+
71
+ Patterns:
72
+ - [globs...] Glob Patterns
73
+ - [stdin] Read from "stdin" assume text file.
74
+ - [stdin://<path>] Read from "stdin", use <path> for file type and config.
75
+ - [file://<path>] Check the file at <path>
76
+
77
+ Examples:
78
+ cspell . Recursively check all files.
79
+ cspell lint . The same as "cspell ."
80
+ cspell "*.js" Check all .js files in the current directory
81
+ cspell "**/*.js" Check all .js files recursively
82
+ cspell "src/**/*.js" Only check .js under src
83
+ cspell "**/*.txt" "**/*.js" Check both .js and .txt files.
84
+ cspell "**/*.{txt,js,md}" Check .txt, .js, and .md files.
85
+ cat LICENSE | cspell stdin Check stdin
86
+ cspell stdin://docs/doc.md Check stdin as if it was "./docs/doc.md"
68
87
 
69
88
  Check spelling
70
89
 
71
90
  Options:
72
91
  -c, --config <cspell.json> Configuration file to use. By default cspell
73
92
  looks for cspell.json in the current directory.
74
-
75
93
  -v, --verbose Display more information about the files being
76
94
  checked and the configuration.
77
-
78
95
  --locale <locale> Set language locales. i.e. "en,fr" for English
79
96
  and French, or "en-GB" for British English.
80
-
81
97
  --language-id <language> Force programming language for unknown
82
98
  extensions. i.e. "php" or "scala"
83
-
84
99
  --words-only Only output the words not found in the
85
100
  dictionaries.
86
-
87
101
  -u, --unique Only output the first instance of a word not
88
102
  found in the dictionaries.
89
-
90
103
  -e, --exclude <glob> Exclude files matching the glob pattern. This
91
104
  option can be used multiple times to add
92
105
  multiple globs.
93
-
94
106
  --file-list <path or stdin> Specify a list of files to be spell checked. The
95
107
  list is filtered against the glob file patterns.
96
108
  Note: the format is 1 file path per line.
97
-
98
109
  --no-issues Do not show the spelling errors.
99
110
  --no-progress Turn off progress messages
100
111
  --no-summary Turn off summary message in console.
@@ -119,24 +130,37 @@ Options:
119
130
  --no-gitignore Do NOT use .gitignore files.
120
131
  --gitignore-root <path> Prevent searching for .gitignore files past
121
132
  root.
133
+ --validate-directives Validate in-document CSpell directives.
134
+ --no-validate-directives Do not validate in-document CSpell directives.
122
135
  --no-color Turn off color.
123
136
  --color Force color.
124
137
  --no-default-configuration Do not load the default configuration and
125
138
  dictionaries.
126
139
  --debug Output information useful for debugging
127
140
  cspell.json files.
141
+ --reporter <module|path> Specify one or more reporters to use.
128
142
  -h, --help display help for command
129
143
 
144
+ More Examples:
130
145
 
131
- Examples:
132
- cspell "*.js" Check all .js files in the current directory
133
- cspell "**/*.js" Check all .js files from the current directory
134
- cspell "src/**/*.js" Only check .js under src
135
- cspell "**/*.txt" "**/*.js" Check both .js and .txt files.
136
- cspell "**/*.{txt,js,md}" Check .txt, .js, and .md files.
137
- cat LICENSE | cspell stdin Check stdin
146
+ cspell "**/*.js" --reporter @cspell/cspell-json-reporter
147
+ This will spell check all ".js" files recursively and use
148
+ "@cspell/cspell-json-reporter".
149
+
150
+ cspell . --reporter default
151
+ This will force the default reporter to be used overriding
152
+ any reporters defined in the configuration.
153
+
154
+ cspell . --reporter ./<path>/reporter.cjs
155
+ Use a custom reporter. See API for details.
156
+
157
+ References:
158
+ https://cspell.org
159
+ https://github.com/streetsidesoftware/cspell
138
160
  ```
139
161
 
162
+ <!--- @@inject-end: static/lint-help.txt --->
163
+
140
164
  ## Versioning
141
165
 
142
166
  The major version of `cspell-cli` tries to match the major version of `cspell`.
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- 'use strict';
3
+ "use strict";
4
4
 
5
- require('cspell/bin');
5
+ require("cspell/bin");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cspell-cli",
3
- "version": "6.24.0",
4
- "description": "CLI for cspell: A Spelling Checker for Code!",
3
+ "version": "6.27.0",
4
+ "description": "CLI for cspell; A Spelling Checker for Code!",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "cspell-cli": "index.js"
@@ -11,7 +11,10 @@
11
11
  "version-release-minor": "npx standard-version -r minor",
12
12
  "version-release-patch": "npx standard-version -r patch",
13
13
  "version-release": "npx standard-version",
14
- "test": "node ./index.js \"**\""
14
+ "lint:fix": "prettier -w .",
15
+ "build:readme": "npm run build:help && inject-markdown README.md",
16
+ "build:help": "node index.js lint --help > static/lint-help.txt",
17
+ "test": "node ./index.js ."
15
18
  },
16
19
  "repository": {
17
20
  "type": "git",
@@ -34,6 +37,10 @@
34
37
  "node": ">=14"
35
38
  },
36
39
  "dependencies": {
37
- "cspell": "^6.24.0"
40
+ "cspell": "^6.27.0"
41
+ },
42
+ "devDependencies": {
43
+ "inject-markdown": "^1.5.0",
44
+ "prettier": "^2.8.4"
38
45
  }
39
46
  }