mirror of
https://github.com/ikatyang/emoji-cheat-sheet.git
synced 2025-04-10 17:23:41 +02:00
chore: add prettier
This commit is contained in:
parent
a8412be584
commit
9663c4a8b8
@ -5,6 +5,7 @@ node_js:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- yarn run lint
|
- yarn run lint
|
||||||
|
- yarn run format-check
|
||||||
- yarn run test -- --verbose --coverage
|
- yarn run test -- --verbose --coverage
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
|
21
gulpfile.ts
Normal file
21
gulpfile.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import * as gulp from 'gulp';
|
||||||
|
import * as prettier from 'gulp-plugin-prettier';
|
||||||
|
import * as prettier_options from 'tslint-config-ikatyang/prettier';
|
||||||
|
|
||||||
|
// tslint:disable-next-line:no-var-requires
|
||||||
|
const sources = require('./tsconfig.json').include;
|
||||||
|
|
||||||
|
gulp.task('format', () =>
|
||||||
|
gulp
|
||||||
|
.src(sources)
|
||||||
|
.pipe(prettier.format(prettier_options, { filter: true }))
|
||||||
|
.pipe(gulp.dest(file => file.base)),
|
||||||
|
);
|
||||||
|
|
||||||
|
gulp.task('format-check', () =>
|
||||||
|
gulp
|
||||||
|
.src(sources)
|
||||||
|
.pipe(
|
||||||
|
prettier.format(prettier_options, { reporter: prettier.Reporter.Error }),
|
||||||
|
),
|
||||||
|
);
|
@ -9,7 +9,9 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "tslint -p ./tsconfig.json",
|
"lint": "tslint -p ./tsconfig.json",
|
||||||
"test": "jest -c ./jest.json",
|
"test": "jest -c ./jest.json",
|
||||||
"generate": "ts-node ./scripts/generate.ts ./README.md"
|
"generate": "ts-node ./scripts/generate.ts ./README.md",
|
||||||
|
"format": "gulp format",
|
||||||
|
"format-check": "gulp format-check"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cheerio": "^0.22.0",
|
"cheerio": "^0.22.0",
|
||||||
@ -17,11 +19,16 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/cheerio": "0.22.2",
|
"@types/cheerio": "0.22.2",
|
||||||
|
"@types/gulp": "3.8.33",
|
||||||
"@types/jest": "20.0.4",
|
"@types/jest": "20.0.4",
|
||||||
"@types/node": "8.0.14",
|
"@types/node": "8.0.14",
|
||||||
|
"@types/prettier": "1.5.0",
|
||||||
"@types/request": "2.0.0",
|
"@types/request": "2.0.0",
|
||||||
|
"gulp": "3.9.1",
|
||||||
|
"gulp-plugin-prettier": "1.0.0",
|
||||||
"jest": "20.0.4",
|
"jest": "20.0.4",
|
||||||
"jest-playback": "1.0.0",
|
"jest-playback": "1.0.0",
|
||||||
|
"prettier": "1.5.3",
|
||||||
"ts-jest": "20.0.7",
|
"ts-jest": "20.0.7",
|
||||||
"ts-node": "3.2.1",
|
"ts-node": "3.2.1",
|
||||||
"tslint": "5.5.0",
|
"tslint": "5.5.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user