-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support filename option in lintText() and document all options #134
Conversation
Document `plugins` and `envs`, which can be specified in the project's `package.json`. Change `global` to `globals` since that's what the code prefers. Note the availability of the aliases. Document that `cwd` may be provided to `lintText()` and `lintFiles()`, and that this can cause additional options to be loaded from the project's `package.json`. This is useful information for linter plugins which may call this method. Document that both the `ignore` and `files` globs are resolved relative to the current working directory. Document the full set of options, including aliases, and how the `parser` option takes preference over the `parser` setting in the project's `package.json`.
|
||
Note that `globals`, `plugins` and `envs` take preference. | ||
|
||
The `parser` option takes preference over any `parser` setting in the project's `package.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that globals, plugins and environments in package.json
override those from options.js
, but parser
does not. This seems inconsistent. Is this a bug, or should I explain that behavior further in the README?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options that are explicitly passed in should take precedence. Can you fix that in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options that are explicitly passed in should take precedence.
What do you mean by "explicitly passed in"? In options.js
? Or the package.json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options that are passed into standard-engine
. What is options.js
? That doesn't exist in standard-engine
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is options.js? That doesn't exist in standard-engine.
My shorthand for "options passed into standard-engine
. It's the suggested file in the README.
Opened #141 to track.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
Document
plugins
andenvs
, which can be specified in the project'spackage.json
. Changeglobal
toglobals
since that's what the codeprefers. Note the availability of the aliases.
Document that
cwd
may be provided tolintText()
andlintFiles()
,and that this can cause additional options to be loaded from the
project's
package.json
. This is useful information for linter pluginswhich may call this method.
Document that both the
ignore
andfiles
globs are resolved relativeto the current working directory.
Document the full set of options, including aliases, and how the
parser
option takes preference over theparser
setting in theproject's
package.json
.Support filename option in
lintText()
. Fixes #131.