Skip to content
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

Merged
merged 2 commits into from
Nov 22, 2016

Conversation

novemberborn
Copy link
Contributor

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.

Support filename option in lintText(). Fixes #131.

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`.
Copy link
Contributor Author

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?

Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support filename in lintText?
2 participants