summaryrefslogtreecommitdiff
path: root/tools/eslint/lib/rules/object-curly-newline.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/lib/rules/object-curly-newline.js')
-rw-r--r--tools/eslint/lib/rules/object-curly-newline.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/eslint/lib/rules/object-curly-newline.js b/tools/eslint/lib/rules/object-curly-newline.js
index b69bd19044..6b94ad3113 100644
--- a/tools/eslint/lib/rules/object-curly-newline.js
+++ b/tools/eslint/lib/rules/object-curly-newline.js
@@ -9,14 +9,14 @@
// Requirements
//------------------------------------------------------------------------------
-let astUtils = require("../ast-utils");
+const astUtils = require("../ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
// Schema objects.
-let OPTION_VALUE = {
+const OPTION_VALUE = {
oneOf: [
{
enum: ["always", "never"]
@@ -78,7 +78,7 @@ function normalizeOptions(options) {
};
}
- let value = normalizeOptionValue(options);
+ const value = normalizeOptionValue(options);
return {ObjectExpression: value, ObjectPattern: value};
}
@@ -114,8 +114,8 @@ module.exports = {
},
create: function(context) {
- let sourceCode = context.getSourceCode();
- let normalizedOptions = normalizeOptions(context.options[0]);
+ const sourceCode = context.getSourceCode();
+ const normalizedOptions = normalizeOptions(context.options[0]);
/**
* Reports a given node if it violated this rule.
@@ -125,12 +125,12 @@ module.exports = {
* @returns {void}
*/
function check(node) {
- let options = normalizedOptions[node.type];
- let openBrace = sourceCode.getFirstToken(node);
- let closeBrace = sourceCode.getLastToken(node);
+ const options = normalizedOptions[node.type];
+ const openBrace = sourceCode.getFirstToken(node);
+ const closeBrace = sourceCode.getLastToken(node);
let first = sourceCode.getTokenOrCommentAfter(openBrace);
let last = sourceCode.getTokenOrCommentBefore(closeBrace);
- let needsLinebreaks = (
+ const needsLinebreaks = (
node.properties.length >= options.minProperties ||
(
options.multiline &&