You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You could find a JavaScript file `dist/zhlint.js` as a standalone version. To use it, for example, you can directly add it into your browser as a `<script>` tag. Then there would be a global variable `zhlint` for you.
@@ -92,6 +147,8 @@ You could find a JavaScript file `dist/zhlint.js` as a standalone version. To us
92
147
- parameters:
93
148
-`results`: An array for all linted results.
94
149
-`logger`: The logger instance, by default it's `console` in Node.js/browser.
150
+
-`readRc: (dir: string, config: string, ignore: string, logger?: Console) => Config`: Read config from rc file(s). For rc (run command).
151
+
-`runWithConfig(str: string, config: Config): Result`: Lint a certain file with rc config. For rc (run command).
95
152
96
153
### Options
97
154
@@ -113,6 +170,13 @@ type Options = {
113
170
- Just follows a certain format inspired from [W3C Scroll To Text Fragment Proposal](https://github.com/WICG/ScrollToTextFragment).
114
171
- `logger`: same to the parameter in `report(...)`.
115
172
173
+
### RC Config
174
+
175
+
- `preset`: `string` (optional)
176
+
- `rules`: `RuleOptions` without the `preset` field. (optional)
177
+
- `hyperParsers`: `string[]` (optional)
178
+
- `ignores`: `string[]` and the priority is lower than `.zhlintignore`. (optional)
179
+
116
180
### Output
117
181
118
182
```ts
@@ -145,6 +209,8 @@ type Validation = {
145
209
- `length`: The length of the target token in the input string.
146
210
- `message`: The description of this validation in natural language.
147
211
212
+
### Advanced usage
213
+
148
214
## Features
149
215
150
216
### Markdown syntax support
@@ -193,6 +259,12 @@ or just pass it through as an option:
You could find a JavaScript file `dist/zhlint.js` as a standalone version. To use it, for example, you can directly add it into your browser as a `<script>` tag. Then there would be a global variable `zhlint` for you.
@@ -96,6 +159,8 @@ You could find a JavaScript file `dist/zhlint.js` as a standalone version. To us
96
159
- parameters:
97
160
-`results`: An array for all linted results.
98
161
-`logger`: The logger instance, by default it's `console` in Node.js/browser.
162
+
-`readRc: (dir: string, config: string, ignore: string, logger?: Console) => Config`: Read config from rc file(s). For rc (run command).
163
+
-`runWithConfig(str: string, config: Config): Result`: Lint a certain file with rc config. For rc (run command).
99
164
100
165
### Options
101
166
@@ -117,6 +182,13 @@ type Options = {
117
182
- Just follows a certain format inspired from [W3C Scroll To Text Fragment Proposal](https://github.com/WICG/ScrollToTextFragment).
118
183
- `logger`: same to the parameter in `report(...)`.
119
184
185
+
### RC Config
186
+
187
+
- `preset`: `string` (optional)
188
+
- `rules`: `RuleOptions` without the `preset` field. (optional)
189
+
- `hyperParsers`: `string[]` (optional)
190
+
- `ignores`: `string[]` and the priority is lower than `.zhlintignore`. (optional)
191
+
120
192
### Output
121
193
122
194
```ts
@@ -149,6 +221,8 @@ type Validation = {
149
221
- `length`: The length of the target token in the input string.
150
222
- `message`: The description of this validation in natural language.
151
223
224
+
### Advanced usage
225
+
152
226
## Features
153
227
154
228
### Markdown syntax support
@@ -197,6 +271,12 @@ or just pass it through as an option:
0 commit comments