Skip to content

Commit

Permalink
chore: Move to standard JS style.
Browse files Browse the repository at this point in the history
Make life as a developer a little easier. For more info see
https://github.com/feross/standard.
  • Loading branch information
dignifiedquire committed Jun 7, 2015
1 parent edbb140 commit 67a6054
Show file tree
Hide file tree
Showing 63 changed files with 3,179 additions and 3,338 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "standard"
}
116 changes: 0 additions & 116 deletions .jscs.json

This file was deleted.

69 changes: 8 additions & 61 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# JS Hint options
JSHINT_BROWSER =
browser: true,
strict: false
undef: false
camelcase: false

JSHINT_NODE =
node: true,
strict: false

module.exports = (grunt) ->

# Project configuration.
Expand Down Expand Up @@ -67,47 +56,13 @@ module.exports = (grunt) ->

# JSHint options
# http://www.jshint.com/options/
jshint:
server:
files:
src: '<%= files.server %>'
options: JSHINT_NODE
grunt:
files:
src: '<%= files.grunt %>'
options: JSHINT_NODE
scripts:
files:
src: '<%= files.scripts %>'
options: JSHINT_NODE
client:
files:
src: '<%= files.client %>'
options: JSHINT_BROWSER

options:
quotmark: 'single'
bitwise: true
freeze: true
indent: 2
camelcase: true
strict: true
trailing: true
curly: true
eqeqeq: true
immed: true
latedef: true
newcap: true
noempty: true
unused: true
noarg: true
sub: true
undef: true
maxdepth: 4
maxstatements: 100
maxcomplexity: 100
maxlen: 100
globals: {}
eslint:
target: [
'<%= files.server %>'
'<%= files.grunt %>'
'<%= files.scripts %>'
'<%= files.client %>'
]

# CoffeeLint options
# http://www.coffeelint.org/#options
Expand All @@ -118,14 +73,6 @@ module.exports = (grunt) ->
max_line_length:
value: 100

jscs:
server: files: src: '<%= files.server %>'
client: files: src: '<%= files.client %>'
scripts: files: src: '<%= files.scripts %>'
grunt: files: src: '<%= files.grunt %>'
options:
config: '.jscs.json'

'npm-publish':
options:
requires: ['build']
Expand Down Expand Up @@ -153,7 +100,7 @@ module.exports = (grunt) ->

grunt.registerTask 'build', ['browserify:client']
grunt.registerTask 'default', ['build', 'test', 'lint']
grunt.registerTask 'lint', ['jshint', 'jscs', 'coffeelint']
grunt.registerTask 'lint', ['eslint', 'coffeelint']
grunt.registerTask 'release', 'Build, bump and publish to NPM.', (type) ->
grunt.task.run [
'npm-contributors'
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Karma

[![npm version](https://img.shields.io/npm/v/karma.svg?style=flat-square)](https://www.npmjs.com/package/karma) [![npm downloads](https://img.shields.io/npm/dm/karma.svg?style=flat-square)](https://www.npmjs.com/package/karma)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/karma-runner/karma) [![npm version](https://img.shields.io/npm/v/karma.svg?style=flat-square)](https://www.npmjs.com/package/karma) [![npm downloads](https://img.shields.io/npm/dm/karma.svg?style=flat-square)](https://www.npmjs.com/package/karma)

[![Build Status](https://img.shields.io/travis/karma-runner/karma/master.svg?style=flat-square)](https://travis-ci.org/karma-runner/karma) [![Code Climate](https://img.shields.io/codeclimate/github/karma-runner/karma.svg?style=flat-square)](https://codeclimate.com/github/karma-runner/karma) [![Dependency Status](https://img.shields.io/david/karma-runner/karma.svg?style=flat-square)](https://david-dm.org/karma-runner/karma) [![devDependency Status](https://img.shields.io/david/dev/karma-runner/karma.svg?style=flat-square)](https://david-dm.org/karma-runner/karma#info=devDependencies)

Expand Down
5 changes: 5 additions & 0 deletions client/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"env": {
"browser": true
}
}
2 changes: 1 addition & 1 deletion client/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module.exports = {
VERSION: '%KARMA_VERSION%',
KARMA_URL_ROOT: '%KARMA_URL_ROOT%',
CONTEXT_URL: 'context.html'
};
}
Loading

0 comments on commit 67a6054

Please sign in to comment.