Skip to content

Commit 2b30200

Browse files
committed
style(readme): fix usage
1 parent d42d1b5 commit 2b30200

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ Install with [npm](https://www.npmjs.com/):
4343

4444
Via `.textlintrc`(Recommended)
4545

46-
```json
46+
```js
4747
{
4848
"rules": {
4949
"eslint": {
5050
// Required: path to .eslintrc file
51-
configFile: "path/to/.eslintrc"
51+
"configFile": "path/to/.eslintrc"
5252
}
5353
}
5454
}
@@ -73,9 +73,9 @@ textlint --rule eslint README.md
7373
"rules": {
7474
"eslint": {
7575
// Required: path to .eslintrc file
76-
configFile: "path/to/.eslintrc",
76+
"configFile": "path/to/.eslintrc",
7777
// recognize lang of CodeBlock
78-
langs: ["js", "javascript", "node", "jsx"]
78+
"langs": ["js", "javascript", "node", "jsx"]
7979
}
8080
}
8181
}

src/textlint-rule-eslint.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ const CLIEngine = require("eslint").CLIEngine;
44
const path = require("path");
55
const defaultOptions = {
66
// path to .eslintrc file
7-
configFile: null,
7+
"configFile": null,
88
// recognize lang of CodeBlock
9-
langs: ["js", "javascript", "node", "jsx"]
9+
"langs": ["js", "javascript", "node", "jsx"]
1010
};
11-
module.exports = function (context, options) {
11+
module.exports = function(context, options) {
1212
const {Syntax, RuleError, report, getSource} = context;
13-
if(!options.configFile) {
13+
if (!options.configFile) {
1414
throw new Error(`Require options: { "configFile": "path/to/.eslintrc" }`);
1515
}
1616
const availableLang = options.langs || defaultOptions.langs;

0 commit comments

Comments
 (0)