-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CP-1062 eslint, karma-jspm #101
Merged
Merged
Changes from 6 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
815cc66
Make use of single quotes
valotas b065fb6
removed unnecessary semicolon
valotas ddb6a46
Define window as a global variable
valotas 63c819d
2 spaces indent
valotas 507e85b
Basic eslintrc rules
valotas 45f9690
Ident with 4 spaces
valotas a480eb8
Merge branch 'master' of https://github.com/Workiva/karma-jspm into e…
valotas 02d0321
Added script to run eslint with npm
valotas 7911405
Fixed eslint errors
valotas c04137a
Merge branch 'master' of github.com:Workiva/karma-jspm into eslint
718402f
cp-1062 : adjusted spacing
661e62e
Merge pull request #1 from dustinlessard-wf/eslint_conflict-free
valotas 0d47422
Merge branch 'master' of https://github.com/Workiva/karma-jspm into e…
valotas f6b36a6
Added eslint as development dependency
valotas 1e7af70
Fixed eslint warnings and merge conflicts
valotas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"rules": { | ||
"indent": [ | ||
2, | ||
4 | ||
], | ||
"quotes": [ | ||
2, | ||
"single" | ||
], | ||
"linebreak-style": [ | ||
2, | ||
"unix" | ||
], | ||
"semi": [ | ||
2, | ||
"always" | ||
] | ||
}, | ||
"env": { | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,13 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
/*global window*/ | ||
|
||
(function(karma, System) { | ||
if (!System) { | ||
throw new Error("SystemJS was not found. Please make sure you have " + | ||
"initialized jspm via installing a dependency with jspm, " + | ||
"or by running 'jspm dl-loader'."); | ||
throw new Error('SystemJS was not found. Please make sure you have ' + | ||
'initialized jspm via installing a dependency with jspm, ' + | ||
'or by running \'jspm dl-loader\'.'); | ||
} | ||
|
||
System.config({ baseURL: 'base' }); | ||
|
@@ -30,6 +32,7 @@ | |
|
||
if(karma.config.jspm.paths !== undefined && | ||
typeof karma.config.jspm.paths === 'object') { | ||
|
||
System.config({ | ||
paths: karma.config.jspm.paths | ||
}); | ||
|
@@ -39,14 +42,14 @@ | |
if(!karma.config.jspm.useBundles){ | ||
System.bundles = []; | ||
} | ||
|
||
// Load everything specified in loadFiles | ||
for (var i = 0; i < karma.config.jspm.expandedFiles.length; i++) { | ||
var modulePath = karma.config.jspm.expandedFiles[i]; | ||
var promise = System['import'](extractModuleName(modulePath)) | ||
['catch'](function(e) { | ||
throw e; | ||
}); | ||
['catch'](function(e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this chunk still looks like 2 space indents There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me fix that |
||
throw e; | ||
}); | ||
promises.push(promise); | ||
} | ||
|
||
|
@@ -57,6 +60,6 @@ | |
}; | ||
|
||
function extractModuleName(fileName) { | ||
return fileName.replace(/\.js$/, ""); | ||
return fileName.replace(/\.js$/, ''); | ||
} | ||
})(window.__karma__, window.System); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make this the default 4 space indent (more consistent with other OSS JS repos from our org)?