Comparing version 0.5.0 to 0.5.1
@@ -384,5 +384,12 @@ { | ||
"beforeEach": false, | ||
"afterEach": false | ||
"afterEach": false, | ||
"suite": false, | ||
"test": false, | ||
"setup": false, | ||
"teardown": false, | ||
"suiteSetup": false, | ||
"suiteTeardown": false | ||
} | ||
} | ||
} |
@@ -67,2 +67,3 @@ { | ||
"no-self-compare": 0, | ||
"no-sequences": 2, | ||
"no-shadow": 2, | ||
@@ -69,0 +70,0 @@ "no-shadow-restricted-names": 2, |
@@ -42,7 +42,19 @@ /** | ||
function loadIgnoreFile(filePath) { | ||
var exclusions = []; | ||
var exclusions = [], | ||
text; | ||
if (filePath) { | ||
//load .eslintignore file and JSON parse it | ||
// Read .eslintignore file | ||
try { | ||
exclusions = JSON.parse(fs.readFileSync(filePath, "utf8")); | ||
text = fs.readFileSync(filePath, "utf8"); | ||
try { | ||
// Attempt to parse as JSON (deprecated) | ||
exclusions = JSON.parse(text); | ||
} catch (e) { | ||
// Prefer plain text, one path per line | ||
exclusions = text.split("\n"); | ||
} | ||
} catch (e) { | ||
@@ -142,2 +154,3 @@ /* istanbul ignore next Error handling doesn't need tests*/ | ||
useConfig = options.config; | ||
this.options = options; | ||
@@ -185,3 +198,3 @@ if (useConfig) { | ||
if (userConfig.env) { | ||
if (userConfig.env && !this.options.reset) { | ||
envConfig.rules = {}; | ||
@@ -188,0 +201,0 @@ |
@@ -216,2 +216,19 @@ /** | ||
/** | ||
* Process initial config to make it safe to extend by file comment config | ||
* @param {Object} config Initial config | ||
* @returns {Object} Processed config | ||
*/ | ||
function prepareConfig(config) { | ||
config.globals = config.globals || config.global || {}; | ||
delete config.global; | ||
return { | ||
rules: util.mergeConfigs({}, config.rules || {}), | ||
globals: util.mergeConfigs({}, config.globals), | ||
env: util.mergeConfigs({}, config.env || {}) | ||
}; | ||
} | ||
//------------------------------------------------------------------------------ | ||
@@ -314,6 +331,5 @@ // Public Interface | ||
if (ast) { | ||
// process initial config to make it safe to extend | ||
config = prepareConfig(config); | ||
config.globals = config.globals || config.global || {}; | ||
delete config.global; | ||
// parse global comments and modify config | ||
@@ -320,0 +336,0 @@ config = modifyConfigFromComments(ast, config); |
@@ -49,3 +49,12 @@ /** | ||
function isProperty(id, parent) { | ||
return id === parent.property && parent.type === "MemberExpression" && !parent.computed; | ||
switch (parent.type) { | ||
case "MemberExpression": | ||
return id === parent.property && !parent.computed; | ||
case "Property": | ||
return id === parent.key; | ||
default: | ||
return false; | ||
} | ||
} | ||
@@ -52,0 +61,0 @@ |
@@ -43,3 +43,3 @@ /** | ||
if (callee.range[1] !== openParen.range[0]) { | ||
context.report(node, "Spaced function application is not allowed."); | ||
context.report(node, "Unexpected space between function name and paren."); | ||
} | ||
@@ -46,0 +46,0 @@ } |
{ | ||
"name": "eslint", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>", | ||
@@ -5,0 +5,0 @@ "description": "An Esprima-based pattern checker for JavaScript.", |
@@ -1,3 +0,3 @@ | ||
[![Build Status](https://secure.travis-ci.org/eslint/eslint.png?branch=master)](http://travis-ci.org/eslint/eslint) | ||
[![NPM version](https://badge.fury.io/js/eslint.png)](http://badge.fury.io/js/eslint) | ||
[![Build Status](https://travis-ci.org/eslint/eslint.svg?branch=master)](http://travis-ci.org/eslint/eslint) | ||
[![NPM version](https://badge.fury.io/js/eslint.svg)](http://badge.fury.io/js/eslint) | ||
@@ -4,0 +4,0 @@ # ESLint |
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
271407
135
6946