Skip to content

Commit

Permalink
Chore: Enable quote-props rule in eslint-config-eslint (refs eslint#5188
Browse files Browse the repository at this point in the history
  • Loading branch information
gyandeeps authored and nzakas committed Apr 23, 2016
1 parent 43f6d05 commit fc78e78
Show file tree
Hide file tree
Showing 239 changed files with 2,189 additions and 2,188 deletions.
6 changes: 3 additions & 3 deletions Makefile.js
Expand Up @@ -391,12 +391,12 @@ function getFormatterResults() {
var formatterFiles = fs.readdirSync("./lib/formatters/"),
cli = new CLIEngine({
useEslintrc: false,
baseConfig: { "extends": "eslint:recommended" },
baseConfig: { extends: "eslint:recommended" },
rules: {
"no-else-return": 1,
"indent": [1, 4],
indent: [1, 4],
"space-unary-ops": 2,
"semi": [1, "always"],
semi: [1, "always"],
"consistent-return": 2
}
}),
Expand Down
14 changes: 7 additions & 7 deletions lib/config/config-validator.js
Expand Up @@ -35,16 +35,16 @@ function getRuleOptionsSchema(id) {
if (Array.isArray(schema)) {
if (schema.length) {
return {
"type": "array",
"items": schema,
"minItems": 0,
"maxItems": schema.length
type: "array",
items: schema,
minItems: 0,
maxItems: schema.length
};
} else {
return {
"type": "array",
"minItems": 0,
"maxItems": 0
type: "array",
minItems: 0,
maxItems: 0
};
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/eslint.js
Expand Up @@ -344,11 +344,11 @@ function modifyConfigsFromComments(filename, ast, config, reportingConfig, messa
}
} else { // comment.type === "Line"
if (match[1] === "eslint-disable-line") {
disableReporting(reportingConfig, { "line": comment.loc.start.line, "column": 0 }, Object.keys(parseListConfig(value)));
disableReporting(reportingConfig, { line: comment.loc.start.line, column: 0 }, Object.keys(parseListConfig(value)));
enableReporting(reportingConfig, comment.loc.end, Object.keys(parseListConfig(value)));
} else if (match[1] === "eslint-disable-next-line") {
disableReporting(reportingConfig, comment.loc.start, Object.keys(parseListConfig(value)));
enableReporting(reportingConfig, { "line": comment.loc.start.line + 2 }, Object.keys(parseListConfig(value)));
enableReporting(reportingConfig, { line: comment.loc.start.line + 2 }, Object.keys(parseListConfig(value)));
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions lib/rules/accessor-pairs.js
Expand Up @@ -78,16 +78,16 @@ module.exports = {
recommended: false
},
schema: [{
"type": "object",
"properties": {
"getWithoutSet": {
"type": "boolean"
type: "object",
properties: {
getWithoutSet: {
type: "boolean"
},
"setWithoutGet": {
"type": "boolean"
setWithoutGet: {
type: "boolean"
}
},
"additionalProperties": false
additionalProperties: false
}]
},
create: function(context) {
Expand Down Expand Up @@ -146,7 +146,7 @@ module.exports = {
}

return {
"ObjectExpression": function(node) {
ObjectExpression: function(node) {
if (checkSetWithoutGet || checkGetWithoutSet) {
checkLonelySetGet(node);
}
Expand Down
20 changes: 10 additions & 10 deletions lib/rules/array-bracket-spacing.js
Expand Up @@ -20,22 +20,22 @@ module.exports = {
fixable: "whitespace",
schema: [
{
"enum": ["always", "never"]
enum: ["always", "never"]
},
{
"type": "object",
"properties": {
"singleValue": {
"type": "boolean"
type: "object",
properties: {
singleValue: {
type: "boolean"
},
"objectsInArrays": {
"type": "boolean"
objectsInArrays: {
type: "boolean"
},
"arraysInArrays": {
"type": "boolean"
arraysInArrays: {
type: "boolean"
}
},
"additionalProperties": false
additionalProperties: false
}
]
},
Expand Down
6 changes: 3 additions & 3 deletions lib/rules/array-callback-return.js
Expand Up @@ -210,7 +210,7 @@ module.exports = {
return {

// Stacks this function's information.
"onCodePathStart": function(codePath, node) {
onCodePathStart: function(codePath, node) {
funcInfo = {
upper: funcInfo,
codePath: codePath,
Expand All @@ -223,12 +223,12 @@ module.exports = {
},

// Pops this function's information.
"onCodePathEnd": function() {
onCodePathEnd: function() {
funcInfo = funcInfo.upper;
},

// Checks the return statement is valid.
"ReturnStatement": function(node) {
ReturnStatement: function(node) {
if (funcInfo.shouldCheck) {
funcInfo.hasReturn = true;

Expand Down
4 changes: 2 additions & 2 deletions lib/rules/arrow-body-style.js
Expand Up @@ -18,7 +18,7 @@ module.exports = {

schema: [
{
"enum": ["always", "as-needed"]
enum: ["always", "as-needed"]
}
]
},
Expand Down Expand Up @@ -61,7 +61,7 @@ module.exports = {
}

return {
"ArrowFunctionExpression": validate
ArrowFunctionExpression: validate
};
}
};
4 changes: 2 additions & 2 deletions lib/rules/arrow-parens.js
Expand Up @@ -18,7 +18,7 @@ module.exports = {

schema: [
{
"enum": ["always", "as-needed"]
enum: ["always", "as-needed"]
}
]
},
Expand Down Expand Up @@ -55,7 +55,7 @@ module.exports = {
}

return {
"ArrowFunctionExpression": parens
ArrowFunctionExpression: parens
};
}
};
16 changes: 8 additions & 8 deletions lib/rules/arrow-spacing.js
Expand Up @@ -20,16 +20,16 @@ module.exports = {

schema: [
{
"type": "object",
"properties": {
"before": {
"type": "boolean"
type: "object",
properties: {
before: {
type: "boolean"
},
"after": {
"type": "boolean"
after: {
type: "boolean"
}
},
"additionalProperties": false
additionalProperties: false
}
]
},
Expand Down Expand Up @@ -138,7 +138,7 @@ module.exports = {
}

return {
"ArrowFunctionExpression": spaces
ArrowFunctionExpression: spaces
};
}
};
16 changes: 8 additions & 8 deletions lib/rules/block-scoped-var.js
Expand Up @@ -92,26 +92,26 @@ module.exports = {
}

return {
"Program": function(node) {
Program: function(node) {
stack = [node.range];
},

// Manages scopes.
"BlockStatement": enterScope,
BlockStatement: enterScope,
"BlockStatement:exit": exitScope,
"ForStatement": enterScope,
ForStatement: enterScope,
"ForStatement:exit": exitScope,
"ForInStatement": enterScope,
ForInStatement: enterScope,
"ForInStatement:exit": exitScope,
"ForOfStatement": enterScope,
ForOfStatement: enterScope,
"ForOfStatement:exit": exitScope,
"SwitchStatement": enterScope,
SwitchStatement: enterScope,
"SwitchStatement:exit": exitScope,
"CatchClause": enterScope,
CatchClause: enterScope,
"CatchClause:exit": exitScope,

// Finds and reports references which are outside of valid scope.
"VariableDeclaration": checkForVariables
VariableDeclaration: checkForVariables
};

}
Expand Down
38 changes: 19 additions & 19 deletions lib/rules/brace-style.js
Expand Up @@ -19,16 +19,16 @@ module.exports = {

schema: [
{
"enum": ["1tbs", "stroustrup", "allman"]
enum: ["1tbs", "stroustrup", "allman"]
},
{
"type": "object",
"properties": {
"allowSingleLine": {
"type": "boolean"
type: "object",
properties: {
allowSingleLine: {
type: "boolean"
}
},
"additionalProperties": false
additionalProperties: false
}
]
},
Expand Down Expand Up @@ -225,19 +225,19 @@ module.exports = {
//--------------------------------------------------------------------------

return {
"FunctionDeclaration": checkBlock("body"),
"FunctionExpression": checkBlock("body"),
"ArrowFunctionExpression": checkBlock("body"),
"IfStatement": checkIfStatement,
"TryStatement": checkTryStatement,
"CatchClause": checkCatchClause,
"DoWhileStatement": checkBlock("body"),
"WhileStatement": checkBlock("body"),
"WithStatement": checkBlock("body"),
"ForStatement": checkBlock("body"),
"ForInStatement": checkBlock("body"),
"ForOfStatement": checkBlock("body"),
"SwitchStatement": checkSwitchStatement
FunctionDeclaration: checkBlock("body"),
FunctionExpression: checkBlock("body"),
ArrowFunctionExpression: checkBlock("body"),
IfStatement: checkIfStatement,
TryStatement: checkTryStatement,
CatchClause: checkCatchClause,
DoWhileStatement: checkBlock("body"),
WhileStatement: checkBlock("body"),
WithStatement: checkBlock("body"),
ForStatement: checkBlock("body"),
ForInStatement: checkBlock("body"),
ForOfStatement: checkBlock("body"),
SwitchStatement: checkSwitchStatement
};

}
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/callback-return.js
Expand Up @@ -88,7 +88,7 @@ module.exports = {
//--------------------------------------------------------------------------

return {
"CallExpression": function(node) {
CallExpression: function(node) {

// if we"re not a callback we can return
if (!isCallback(node)) {
Expand Down
12 changes: 6 additions & 6 deletions lib/rules/camelcase.js
Expand Up @@ -19,13 +19,13 @@ module.exports = {

schema: [
{
"type": "object",
"properties": {
"properties": {
"enum": ["always", "never"]
type: "object",
properties: {
properties: {
enum: ["always", "never"]
}
},
"additionalProperties": false
additionalProperties: false
}
]
},
Expand Down Expand Up @@ -73,7 +73,7 @@ module.exports = {

return {

"Identifier": function(node) {
Identifier: function(node) {

/*
* Leading and trailing underscores are commonly used to flag
Expand Down
14 changes: 7 additions & 7 deletions lib/rules/comma-dangle.js
Expand Up @@ -39,7 +39,7 @@ module.exports = {

schema: [
{
"enum": ["always", "always-multiline", "only-multiline", "never"]
enum: ["always", "always-multiline", "only-multiline", "never"]
}
]
},
Expand Down Expand Up @@ -212,12 +212,12 @@ module.exports = {
}

return {
"ObjectExpression": checkForTrailingComma,
"ObjectPattern": checkForTrailingComma,
"ArrayExpression": checkForTrailingComma,
"ArrayPattern": checkForTrailingComma,
"ImportDeclaration": checkForTrailingComma,
"ExportNamedDeclaration": checkForTrailingComma
ObjectExpression: checkForTrailingComma,
ObjectPattern: checkForTrailingComma,
ArrayExpression: checkForTrailingComma,
ArrayPattern: checkForTrailingComma,
ImportDeclaration: checkForTrailingComma,
ExportNamedDeclaration: checkForTrailingComma
};
}
};

0 comments on commit fc78e78

Please sign in to comment.