Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New: adds flag to skip loading rules from FS
This is a backward compatible change of the public API. By default the Linter class' constructor instantiates a Rules instance which (in its own constructor) has the side-effect of reading from the file-system to obtain rule files that may have been put there by the user. The issue with this is side-effect is that it breaks WebPack bundles (at runtime they crash when the Linter gets instantiated). The particular use-case that spawned this PR is running ESLint inside a WebPack bundle deployed onto an AWS Lambda function. The Linter is configured inline so there is no need to load any rules from the file-system.
- Loading branch information
Showing
4 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters