Skip to content

Commit

Permalink
Build: Add eslint and jscs (closes #1, closes #2, closes #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdehaan authored and phated committed Jun 11, 2016
1 parent e099ae9 commit 28fbaca
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 21 deletions.
15 changes: 1 addition & 14 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
{
"ecmaFeatures": {
"jsx": true
},
"rules": {
"semi": [2, "always"],
"quotes": [2, "single"],
"strict": [2, "global"],
"no-underscore-dangle": 0
},
"env": {
"es6": true,
"browser": true,
"node": true
}
"extends": "gulp"
}
3 changes: 3 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"preset": "gulp"
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# default-resolution

[![Travis Build Status](https://img.shields.io/travis/phated/default-resolution/master.svg?label=travis&style=flat-square)](https://travis-ci.org/phated/default-resolution)
[![Travis Build Status](https://img.shields.io/travis/gulpjs/default-resolution/master.svg?label=travis&style=flat-square)](https://travis-ci.org/gulpjs/default-resolution)

Get the default resolution time based on the current node version, optionally overridable

Originally implemented by @dinoboff in https://github.com/phated/undertaker/pull/17
Originally implemented by @dinoboff in https://github.com/gulpjs/undertaker/pull/17

Split out for standalone use.

Expand All @@ -29,7 +29,7 @@ defaultResolution(12);
| 0.10 | 1s |
| 0.11+ | 1ms |

More information at https://github.com/phated/undertaker/pull/17#issuecomment-82374512
More information at https://github.com/gulpjs/undertaker/pull/17#issuecomment-82374512

# License

Expand Down
2 changes: 1 addition & 1 deletion node-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var match = process.version.match(/v(\d+)\.(\d+)\.(\d+)/);
var nodeVersion = {
major: match[1],
minor: match[2],
patch: match[3]
patch: match[3],
};

module.exports = nodeVersion;
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"contributors": [
"Damien Lebrun <dinoboff@hotmail.com>"
],
"repository": "phated/default-resolution",
"repository": "gulpjs/default-resolution",
"license": "MIT",
"engines": {
"node": ">= 0.10"
Expand All @@ -18,11 +18,16 @@
"node-version.js"
],
"scripts": {
"test": "lab -cvL"
"lint": "eslint . && jscs *.js test/",
"test": "lab -cv"
},
"dependencies": {},
"devDependencies": {
"code": "^1.4.0",
"eslint": "^1.7.3",
"eslint-config-gulp": "^2.0.0",
"jscs": "^2.4.0",
"jscs-preset-gulp": "^1.0.0",
"lab": "^5.5.1"
},
"keywords": [
Expand Down
3 changes: 3 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "gulp/test"
}
2 changes: 1 addition & 1 deletion test/default-resolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var defaultResolution = require('../');
var nodeVersion = require('../node-version');

lab.describe('defaultResolution', function() {
// typically I don't unit test helpers, but this reduces the last run tests
// Typically I don't unit test helpers, but this reduces the last run tests
var major = nodeVersion.major;
var minor = nodeVersion.minor;

Expand Down

0 comments on commit 28fbaca

Please sign in to comment.