Skip to content

Commit 1dbaa5f

Browse files
committed
[TEST] add travis config
1 parent 75cfb50 commit 1dbaa5f

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
dist: trusty
2+
language: node_js
3+
node_js:
4+
- '10'
5+
- '8'
6+
- '6'
7+
install: npm i
8+
script:
9+
- npm run check-format
10+
- npm run test

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@
3232
"dummy.js": "file:dummy.js",
3333
"eslint": "^5.6.1",
3434
"eslint-plugin-import": "^2.14.0",
35+
"prettier": "^1.14.3",
3536
"typescript": "^3.1.1"
3637
},
3738
"scripts": {
38-
"test": "eslint ./tests/withPaths/index.ts && eslint ./tests/withoutPaths/index.ts"
39+
"test": "eslint ./tests/withPaths/index.ts && eslint ./tests/withoutPaths/index.ts",
40+
"check-format": "prettier --config prettier.config.js index.js -l",
41+
"format": "prettier --config prettier.config.js index.js --write"
3942
}
4043
}

prettier.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
'use strict';
2+
13
module.exports = {
2-
parser: 'typescript',
4+
arrowParens: 'avoid',
5+
bracketSpacing: true,
6+
parser: 'babylon',
7+
jsxBracketSameLine: true,
8+
proseWrap: 'preserve',
9+
semi: true,
310
singleQuote: true,
11+
tabWidth: 2,
412
trailingComma: 'all',
13+
useTabs: false,
514
};

0 commit comments

Comments
 (0)