Skip to content

Commit 6c5290c

Browse files
authored
Merge branch 'master' into relative
2 parents 65275ed + 04ef195 commit 6c5290c

File tree

9 files changed

+78
-53
lines changed

9 files changed

+78
-53
lines changed

.circleci/config.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
version: 2
2+
jobs:
3+
test_with_node_6:
4+
docker:
5+
- image: circleci/node:6
6+
steps:
7+
- checkout
8+
- run:
9+
name: Install dependencies
10+
command: npm install
11+
- run:
12+
name: Test
13+
command: npm test
14+
test_with_node_8:
15+
docker:
16+
- image: circleci/node:8
17+
steps:
18+
- checkout
19+
- run:
20+
name: Install dependencies
21+
command: npm install
22+
- run:
23+
name: Test
24+
command: npm test
25+
test_with_node_9:
26+
docker:
27+
- image: circleci/node:9
28+
steps:
29+
- checkout
30+
- run:
31+
name: Install dependencies
32+
command: npm install
33+
- run:
34+
name: Test
35+
command: npm run test:coverage
36+
- run:
37+
name: Deploy coverage
38+
command: bash <(curl -s https://codecov.io/bash)
39+
workflows:
40+
version: 2
41+
test_all:
42+
jobs:
43+
- test_with_node_6
44+
- test_with_node_8
45+
- test_with_node_9

.editorconfig

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
root = true
2+
13
[*]
2-
end_of_line = lf
3-
insert_final_newline = true
4-
charset = utf-8
54
indent_style = space
65
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.eslintrc.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
'use strict';
2-
31
module.exports = {
42
root: true,
5-
extends: [
6-
'airbnb-base',
7-
],
3+
extends: ['airbnb-base', 'prettier'],
84
rules: {
95
'no-param-reassign': [2, { props: false }],
106
},

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.prettierrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
singleQuote: true
2+
printWidth: 100
3+
trailingComma: es5

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
environment:
22
matrix:
33
- nodejs_version: '6'
4-
- nodejs_version: '7'
54
- nodejs_version: '8'
5+
- nodejs_version: '9'
66
install:
77
- ps: Install-Product node $env:nodejs_version
88
- set CI=true
@@ -18,4 +18,4 @@ clone_depth: 1
1818
test_script:
1919
- node --version
2020
- npm --version
21-
- npm run test:suite
21+
- npm run test

circle.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

package.json

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
"engines": {
1111
"node": ">= 6.0.0"
1212
},
13-
"files": [
14-
"lib"
15-
],
13+
"files": ["lib"],
1614
"author": {
1715
"name": "Tommy Leunen",
1816
"email": "tommy.leunen@gmail.com",
@@ -42,40 +40,39 @@
4240
"devDependencies": {
4341
"babel-cli": "^6.26.0",
4442
"babel-core": "^6.26.0",
45-
"babel-jest": "^21.2.0",
43+
"babel-jest": "^22.4.1",
4644
"babel-plugin-syntax-dynamic-import": "^6.18.0",
4745
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
4846
"babel-plugin-transform-object-rest-spread": "^6.26.0",
4947
"babel-preset-env": "^1.6.0",
5048
"common-tags": "^1.4.0",
51-
"eslint": "^4.9.0",
52-
"eslint-config-airbnb-base": "^11.3.2",
53-
"eslint-plugin-import": "^2.8.0",
54-
"jest": "^21.2.1",
49+
"eslint": "^4.19.0",
50+
"eslint-config-airbnb-base": "^12.1.0",
51+
"eslint-config-prettier": "^2.9.0",
52+
"eslint-plugin-import": "^2.9.0",
53+
"husky": "^0.14.3",
54+
"jest": "^22.4.2",
55+
"lint-staged": "^7.0.0",
56+
"prettier-eslint-cli": "^4.7.1",
5557
"standard-version": "^4.2.0"
5658
},
5759
"scripts": {
5860
"lint": "eslint src test",
5961
"compile": "babel src --out-dir lib",
6062
"pretest": "npm run lint",
61-
"test": "jest --coverage",
62-
"test:suite": "jest",
63+
"test": "jest",
64+
"test:coverage": "jest --coverage",
6365
"test:watch": "jest --watch",
6466
"prepublish": "npm run compile",
65-
"release": "standard-version"
67+
"release": "standard-version",
68+
"precommit": "lint-staged"
69+
},
70+
"lint-staged": {
71+
"*.{json,md}": ["prettier-eslint --write", "git add"],
72+
"*.{js}": ["prettier-eslint --write", "eslint --fix", "git add"]
6673
},
6774
"jest": {
6875
"testRegex": "/test/.*\\.test\\.js$",
69-
"collectCoverageFrom": [
70-
"src/**/*.js",
71-
"!src/log.js"
72-
]
73-
},
74-
"greenkeeper": {
75-
"ignore": [
76-
"babel-jest",
77-
"eslint",
78-
"eslint-plugin-import"
79-
]
76+
"collectCoverageFrom": ["src/**/*.js", "!src/log.js"]
8077
}
8178
}

src/utils.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import path from 'path';
2-
32
import resolve from 'resolve';
43

5-
64
export function nodeResolvePath(modulePath, basedir, extensions) {
75
try {
86
return resolve.sync(modulePath, { basedir, extensions });
@@ -29,7 +27,7 @@ export function toLocalPath(modulePath) {
2927

3028
export function stripExtension(modulePath, stripExtensions) {
3129
let name = path.basename(modulePath);
32-
stripExtensions.some((extension) => {
30+
stripExtensions.some(extension => {
3331
if (name.endsWith(extension)) {
3432
name = name.slice(0, name.length - extension.length);
3533
return true;

0 commit comments

Comments
 (0)