gulp-eslint
Advanced tools
Comparing version 0.4.1 to 0.4.2
# Changelog | ||
## 0.1.0 | ||
## 0.4.2 | ||
* initial plugin | ||
* Bump bufferstreams dependency to 1.x | ||
* Fix wrong option handling (@Jakobo) | ||
## 0.1.1 | ||
## 0.4.1 | ||
* Update dependency versions | ||
* Loosen version peer dependency on Gulp | ||
* Code refactoring | ||
## 0.1.2 | ||
## 0.4.0 | ||
* Update eslint version to 0.3.0 | ||
* Bump eslint dependency to 0.14.x | ||
* Use Stream2 instead of older Stream | ||
## 0.1.3 | ||
## 0.3.0 | ||
* Change default formatter to 'stylish' | ||
* Add support for .eslintignore file | ||
* Skip non-JS files to play well with multi-filetype streams | ||
* Add "failOnError" method to stop streams when an eslint error has occurred | ||
* Use gulp-util's PluginError | ||
* Ignore shebangs in JS files | ||
* Import filesystem-local config plugins | ||
* Fix doc typo | ||
## 0.1.4 | ||
## 0.2.2 | ||
* Update eslint version to 0.4.0 | ||
* Upgraded eslint to 0.13.0 | ||
* Fix filesystem-local .eslintrc loading | ||
* Fix filesystem-local .eslintignore loading | ||
* Add failAfterError to fail at the end of the stream instead of the first error (works well with 'format' method) | ||
## 0.1.5 | ||
## 0.2.1 (unreleased) | ||
* Do not format when there are no eslint'd files | ||
* Upgraded eslint to 0.11.0 | ||
## 0.1.6 | ||
## 0.2.0 | ||
* Update dependencies, include eslint 0.5.0 | ||
* Integrate eslint cli-config changes | ||
* Accept string array of environments to enable | ||
* Accept string array of globals ('key:boolean' or 'key') | ||
* WAY overdue upgrade to eslint (^0.9.2) | ||
* Use eslint's CLIEngine module to do most of the configuration work (yay!) | ||
* Semi-Breaking Change: Remove gulpEslint.linter. Linting will occur with compatible, installed version of eslint. | ||
## 0.1.8 | ||
* Use "dependencies" instead of "peerDependencies" | ||
* Update .eslintrc to account for new eol-last rule in eslint 0.7.1 | ||
* Check for message.severity when evaluating messages in failOnError | ||
## 0.1.7 | ||
@@ -47,29 +52,38 @@ | ||
## 0.1.8 | ||
## 0.1.6 | ||
* Use "dependencies" instead of "peerDependencies" | ||
* Update .eslintrc to account for new eol-last rule in eslint 0.7.1 | ||
* Check for message.severity when evaluating messages in failOnError | ||
* Update dependencies, include eslint 0.5.0 | ||
* Integrate eslint cli-config changes | ||
* Accept string array of environments to enable | ||
* Accept string array of globals ('key:boolean' or 'key') | ||
## 0.2.0 | ||
## 0.1.5 | ||
* WAY overdue upgrade to eslint (^0.9.2) | ||
* Use eslint's CLIEngine module to do most of the configuration work (yay!) | ||
* Semi-Breaking Change: Remove gulpEslint.linter. Linting will occur with compatible, installed version of eslint. | ||
* Do not format when there are no eslint'd files | ||
## 0.2.1 (unreleased) | ||
## 0.1.4 | ||
* Upgraded eslint to 0.11.0 | ||
* Update eslint version to 0.4.0 | ||
## 0.2.2 | ||
## 0.1.3 | ||
* Upgraded eslint to 0.13.0 | ||
* Fix filesystem-local .eslintrc loading | ||
* Fix filesystem-local .eslintignore loading | ||
* Add failAfterError to fail at the end of the stream instead of the first error (works well with 'format' method) | ||
* Change default formatter to 'stylish' | ||
* Add support for .eslintignore file | ||
* Skip non-JS files to play well with multi-filetype streams | ||
* Add "failOnError" method to stop streams when an eslint error has occurred | ||
* Use gulp-util's PluginError | ||
* Ignore shebangs in JS files | ||
## 0.3.0 | ||
## 0.1.2 | ||
* Import filesystem-local config plugins | ||
* Fix doc typo | ||
* Update eslint version to 0.3.0 | ||
## 0.1.1 | ||
* Update dependency versions | ||
* Loosen version peer dependency on Gulp | ||
## 0.1.0 | ||
* initial plugin | ||
@@ -17,7 +17,7 @@ 'use strict'; | ||
function verify(filePath, contents) { | ||
function verify(filePath, str) { | ||
// mimic CLIEngine::processFile | ||
var config = linter.getConfigForFile(filePath); | ||
util.loadPlugins(config.plugins); | ||
var messages = eslint.verify(contents, config, filePath); | ||
var messages = eslint.verify(str, config, filePath); | ||
//eslint.reset(); | ||
@@ -24,0 +24,0 @@ return { |
{ | ||
"name": "gulp-eslint", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "A gulp plugin for processing files with eslint", | ||
@@ -50,4 +50,4 @@ "repository": "adametry/gulp-eslint", | ||
"dependencies": { | ||
"bufferstreams": "0.0.2", | ||
"eslint": "^0.14.0", | ||
"bufferstreams": "1.0.1", | ||
"eslint": "^0.14.1", | ||
"gulp-util": "^3.0.1", | ||
@@ -59,8 +59,8 @@ "object-assign": "^2.0.0", | ||
"devDependencies": { | ||
"gulp": "*", | ||
"gulp": "^3.8.11", | ||
"istanbul": "^0.3.5", | ||
"istanbul-coveralls": "^1.0.1", | ||
"jscs": "^1.11.0", | ||
"jscs": "^1.11.2", | ||
"mocha": "*", | ||
"should": "^4.6.5", | ||
"should": "^5.0.0", | ||
"through": "^2.3.6", | ||
@@ -67,0 +67,0 @@ "vinyl": "^0.4.6" |
@@ -100,8 +100,4 @@ # gulp-eslint [![Build Status](https://travis-ci.org/adametry/gulp-eslint.svg)](https://travis-ci.org/adametry/gulp-eslint) [![Coverage Status](https://img.shields.io/coveralls/adametry/gulp-eslint.svg)](https://coveralls.io/r/adametry/gulp-eslint) | ||
Inline [rules configuration](https://github.com/nzakas/eslint/wiki/Command-line-interface#configuration-files). The rule configuration keys must match available validation rules. The associated values should be: | ||
Set [configuration](http://eslint.org/docs/configuring/#configuring-rules) of [rules](http://eslint.org/docs/rules/). | ||
* 0 - turn the rule off | ||
* 1 - turn the rule on as a warning | ||
* 2 - turn the rule on as an error | ||
```javascript | ||
@@ -117,4 +113,2 @@ { | ||
For a list of available rule IDs, see the eslint [rules wiki](https://github.com/nzakas/eslint/wiki/Rules). | ||
#### options.globals | ||
@@ -124,3 +118,3 @@ | ||
Inline `globals` configuration. The keys will be considered global variables, and the value determines whether the variable may be reassigned (true) or not (false). For example: | ||
Specify [globals](http://eslint.org/docs/configuring/#specifying-globals). | ||
@@ -140,8 +134,7 @@ ```javascript | ||
A list of env keys for [env configuration](https://github.com/nzakas/eslint/wiki/Command-line-interface#configuration-files). An env is a preset of rule configurations associated with an JavaScript environment (e.g., `node`, `browser`). | ||
Specify a list of [environments](http://eslint.org/docs/configuring/#specifying-environments) to be applied. | ||
Type: `Object` | ||
Inline [env configuration](https://github.com/nzakas/eslint/wiki/Command-line-interface#configuration-files). An env is a preset of rule configurations associated with an JavaScript environment (e.g., `node`, `browser`). Each key must match an existing env definition, and the key determines whether the env’s rules are applied (true) or not (false). | ||
Specify [environments](http://eslint.org/docs/configuring/#specifying-environments). Each key must match an existing env definition, and the key determines whether the env’s rules are applied (`true`) or not (`false`). | ||
@@ -158,3 +151,3 @@ Alias: `env` *(deprecated)* | ||
Stop a task/stream if en eslint error has been reported for any file. | ||
Stop a task/stream if an eslint error has been reported for any file. | ||
@@ -161,0 +154,0 @@ ```javascript |
15
util.js
@@ -14,3 +14,4 @@ 'use strict'; | ||
/** | ||
* Mimic the CLIEngine.isPathIgnored, but resolve .eslintignore based on file's directory rather than process.cwd() | ||
* Mimic the CLIEngine.isPathIgnored, | ||
* but resolve .eslintignore based on file's directory rather than process.cwd() | ||
*/ | ||
@@ -38,7 +39,6 @@ exports.isPathIgnored = function(file, options) { | ||
// WARNING: HACK AHEAD! | ||
// We can either process text/file, or create a new CLIEngine instance to make use of the internal plugin cache. | ||
// We can either process text/file, or create a new CLIEngine instance | ||
// to make use of the internal plugin cache. | ||
// Creating a new CLIEngine is probably the cheapest approach. | ||
return pluginNames && new CLIEngine({ | ||
plugins: pluginNames | ||
}) && void 0; | ||
return pluginNames && new CLIEngine({plugins: pluginNames}) && void 0; | ||
}; | ||
@@ -60,3 +60,3 @@ | ||
options.globals = options.globals || options.global; | ||
if (options.globals != null && Array.isArray(options.globals)) { | ||
if (options.globals != null && !Array.isArray(options.globals)) { | ||
options.globals = Object.keys(options.globals).map(function cliGlobal(key) { | ||
@@ -68,3 +68,3 @@ return options.globals[key] ? key + ':true' : key; | ||
options.envs = options.envs || options.env; | ||
if (options.envs != null && Array.isArray(options.envs)) { | ||
if (options.envs != null && !Array.isArray(options.envs)) { | ||
options.envs = Object.keys(options.envs).filter(function cliEnv(key) { | ||
@@ -119,3 +119,2 @@ return options.envs[key]; | ||
if (typeof formatter === 'string') { | ||
// load formatter (module, relative to cwd, eslint formatter) | ||
@@ -122,0 +121,0 @@ formatter = (new CLIEngine()).getFormatter(formatter); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19100
205
+ Addedbufferstreams@1.0.1(transitive)
- Removedbufferstreams@0.0.2(transitive)
Updatedbufferstreams@1.0.1
Updatedeslint@^0.14.1