New eslint rules auto fix (#3058)
* no-implicit-coercion and no-unneeded-ternary * End every line with a semicolon * Spacing and formatting * Enabled semi-spacing * Applies npm run lint:fix to code after master merge * Fix merge issues * Switched operator-linebreak to 'before' Co-authored-by: Joshi <simplyrender@gmail.com>
This commit is contained in:
@@ -31,7 +31,7 @@ define([
|
||||
) {
|
||||
|
||||
return {
|
||||
name:"platform/commonUI/formats",
|
||||
name: "platform/commonUI/formats",
|
||||
definition: {
|
||||
"name": "Format Registry",
|
||||
"description": "Provides a registry for formats, which allow parsing and formatting of values.",
|
||||
@@ -68,8 +68,8 @@ define([
|
||||
"version": "3.0.0",
|
||||
"description": "Incorporates modified code from d3 Time Scales",
|
||||
"author": "Mike Bostock",
|
||||
"copyright": "Copyright 2010-2016 Mike Bostock. " +
|
||||
"All rights reserved.",
|
||||
"copyright": "Copyright 2010-2016 Mike Bostock. "
|
||||
+ "All rights reserved.",
|
||||
"link": "https://github.com/d3/d3/blob/master/LICENSE"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -31,7 +31,6 @@ define([
|
||||
DATE_FORMAT
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* Formatter for duration. Uses moment to produce a date from a given
|
||||
* value, but output is formatted to display only time. Can be used for
|
||||
|
||||
@@ -114,6 +114,7 @@ define([
|
||||
if (!format) {
|
||||
throw new Error("FormatProvider: No format found for " + key);
|
||||
}
|
||||
|
||||
return format;
|
||||
};
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ define([
|
||||
if (typeof text === 'number') {
|
||||
return text;
|
||||
}
|
||||
|
||||
return moment.utc(text, DATE_FORMATS).valueOf();
|
||||
};
|
||||
|
||||
|
||||
@@ -43,7 +43,9 @@ define(
|
||||
function MockFormat() {
|
||||
return mockFormatInstances[i];
|
||||
}
|
||||
|
||||
MockFormat.key = k;
|
||||
|
||||
return MockFormat;
|
||||
});
|
||||
provider = new FormatProvider(mockFormats);
|
||||
|
||||
Reference in New Issue
Block a user