Skip to content

Commit 4a33a4b

Browse files
donaldpipowitchadidahiya
authored andcommitted
Update Node API usage documentation (palantir#1838)
Fixes palantir#1837
1 parent edeff3b commit 4a33a4b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/usage/library/index.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ var configuration = {
3232

3333
var options = {
3434
formatter: "json",
35-
configuration: configuration,
3635
rulesDirectory: "customRules/", // can be an array of directories
37-
formattersDirectory: "customFormatters/"
36+
formattersDirectory: "customFormatters/",
37+
fix: false
3838
};
3939

40-
var Linter = require("tslint");
40+
var Linter = require("tslint").Linter;
4141
var fs = require("fs");
4242
var contents = fs.readFileSync(fileName, "utf8");
4343

44-
var ll = new Linter(fileName, contents, options);
45-
var result = ll.lint();
44+
var linter = new Linter(options);
45+
linter.lint(fileName, contents, configuration);
46+
var result = linter.getResult();
4647
```

0 commit comments

Comments
 (0)