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
Copy file name to clipboardExpand all lines: docs/developer-guide/nodejs-api.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,11 +60,12 @@ var linter = require("eslint").linter;
60
60
The most important method on `linter` is `verify()`, which initiates linting of the given text. This method accepts four arguments:
61
61
62
62
*`code` - the source code to lint (a string or instance of `SourceCode`).
63
-
*`config` - a configuration object.
64
-
*`options` - (optional) Additional options for this run.
63
+
*`config` - a configuration object that is equivalent to an eslintrc file.
64
+
*`optionsOrFilename` - (optional) Additional options for this run or a string representing the filename to associate with the code being linted.
65
65
*`filename` - (optional) the filename to associate with the source code.
66
-
*`saveState` - (optional) set to true to maintain the internal state of `linter` after linting (mostly used for testing purposes).
66
+
*`saveState` - (optional) see below. This will override any value passed as the fourth argument if an options object is used here instead of the filename.
67
67
*`allowInlineConfig` - (optional) set to `false` to disable inline comments from changing eslint rules.
68
+
*`saveState` - (optional) set to true to maintain the internal state of `linter` after linting (mostly used for testing purposes)
0 commit comments