Skip to content
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

Add ESLint and JSCS #4

Merged
merged 1 commit into from
Oct 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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