Skip to content

Commit a0ec54a

Browse files
committed
Merge pull request #218 from strongloop/linting-generated-code
Linting generated code
2 parents 8437409 + 96f4f68 commit a0ec54a

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

apidocs/.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../.eslintrc",
3+
"rules": {
4+
"quotes": ["off"]
5+
}
6+
}

apidocs/describe-builtin-models.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint quotes: ["error", "single"] */
12
var fs = require('fs');
23
var path = require('path');
34

lib/services.template.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ if (typeof module !== 'undefined' && typeof exports !== 'undefined' &&
334334
var key = propsPrefix + name;
335335
if (value == null) value = '';
336336
storage[key] = value;
337-
} catch(err) {
337+
} catch (err) {
338338
console.log('Cannot access local/session storage:', err);
339339
}
340340
}
@@ -418,7 +418,7 @@ if (typeof module !== 'undefined' && typeof exports !== 'undefined' &&
418418
* Get the header name that is used for sending the authentication token.
419419
*/
420420
this.getAuthHeader = function() {
421-
return authHeader;
421+
return authHeader;
422422
};
423423
424424
/**

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"generate-loopback-core": "node ./apidocs/describe-builtin-models.js",
88
"prepublish": "npm run generate-loopback-core",
99
"test": "node ./test.e2e/test-server.js node node_modules/karma/bin/karma start --single-run --browsers PhantomJS",
10-
"posttest": "eslint ."
10+
"lint": "eslint .",
11+
"posttest": "npm run generate-loopback-core && npm run lint"
1112
},
1213
"repository": {
1314
"type": "git",

0 commit comments

Comments
 (0)