Add lint:fix script

Enable no-trailing-space eslint rule
This commit is contained in:
Quincy Morgan
2020-10-23 13:24:44 -04:00
parent 5358eb2134
commit 04b3a788f9
7 changed files with 10 additions and 8 deletions
+1
View File
@@ -69,6 +69,7 @@
"no-shadow-restricted-names": "error",
"no-template-curly-in-string": "warn",
"no-throw-literal": "error",
"no-trailing-spaces": "warn",
"no-undef": "error",
"no-undef-init": "warn",
"no-unexpected-multiline": "error",
+1 -1
View File
@@ -8,7 +8,7 @@ export function actionStraightenNodes(nodeIDs, projection) {
return geoVecDot(a, b, o) / geoVecDot(b, b, o);
}
// returns the endpoints of the long axis of symmetry of the `points` bounding rect
// returns the endpoints of the long axis of symmetry of the `points` bounding rect
function getEndpoints(points) {
var ssr = geoGetSmallestSurroundingRectangle(points);
+1 -1
View File
@@ -322,7 +322,7 @@ export function coreLocalizer() {
// Returns the localized text wrapped in an HTML element encoding the locale info
localizer.t.html = function(stringId, replacements, locale) {
const info = localizer.tInfo(stringId, replacements, locale);
// text may be empty or undefined if `replacements.default` is
// text may be empty or undefined if `replacements.default` is
return info.text ? localizer.htmlForLocalizedText(info.text, info.locale) : '';
};
+2 -2
View File
@@ -223,10 +223,10 @@ export default {
lineStrings.push({
type: 'LineString',
coordinates: images.map(function (d) { return d.loc; }).filter(Boolean),
properties: {
properties: {
captured_at: images[0] ? images[0].captured_at: null,
captured_by: images[0] ? images[0].captured_by: null,
key: sequenceKey
key: sequenceKey
}
});
}
+3 -3
View File
@@ -89,7 +89,7 @@ export var JXON = new (function () {
if (oParentObj instanceof String || oParentObj instanceof Number || oParentObj instanceof Boolean) {
oParentEl.appendChild(oXMLDoc.createTextNode(oParentObj.toString())); /* verbosity level is 0 */
} else if (oParentObj.constructor === Date) {
oParentEl.appendChild(oXMLDoc.createTextNode(oParentObj.toGMTString()));
oParentEl.appendChild(oXMLDoc.createTextNode(oParentObj.toGMTString()));
}
for (var sName in oParentObj) {
@@ -121,10 +121,10 @@ export var JXON = new (function () {
this.build = function (oXMLParent, nVerbosity /* optional */, bFreeze /* optional */, bNesteAttributes /* optional */) {
var _nVerb = arguments.length > 1 && typeof nVerbosity === 'number' ? nVerbosity & 3 : /* put here the default verbosity level: */ 1;
return createObjTree(oXMLParent, _nVerb, bFreeze || false, arguments.length > 3 ? bNesteAttributes : _nVerb === 3);
return createObjTree(oXMLParent, _nVerb, bFreeze || false, arguments.length > 3 ? bNesteAttributes : _nVerb === 3);
};
this.unbuild = function (oObjTree) {
this.unbuild = function (oObjTree) {
var oNewDoc = document.implementation.createDocument('', '', null);
loadObjTree(oNewDoc, oNewDoc, oObjTree);
return oNewDoc;
+1
View File
@@ -33,6 +33,7 @@
"dist:svg:temaki": "svg-sprite --symbol --symbol-dest . --shape-id-generator \"temaki-%s\" --symbol-sprite dist/img/temaki-sprite.svg node_modules/@ideditor/temaki/icons/*.svg",
"imagery": "node scripts/update_imagery.js",
"lint": "eslint scripts test/spec modules",
"lint:fix": "eslint scripts test/spec modules --fix",
"start": "npm-run-all -s build start:server",
"quickstart": "npm-run-all -s build:dev start:server",
"start:server": "node scripts/server.js",
+1 -1
View File
@@ -256,7 +256,7 @@ describe('iD.serviceOpenstreetcam', function() {
properties: {
captured_at: undefined,
captured_by: undefined,
key: '100'
key: '100'
}
}]);
});