File tree Expand file tree Collapse file tree 4 files changed +569
-16
lines changed Expand file tree Collapse file tree 4 files changed +569
-16
lines changed Original file line number Diff line number Diff line change 77 "license" : " MIT" ,
88 "scripts" : {
99 "build" : " tsc" ,
10- "lint" : " eslint ./src --ext .ts,.js" ,
10+ "lint" : " eslint ./src --ext .ts,.js --fix " ,
1111 "test" : " jest" ,
1212 "test:watch" : " jest --watchAll" ,
13- "prettify" : " prettier --write ./src/**/*.{ts,js}" ,
1413 "ts-node" : " ts-node" ,
1514 "nodemon" : " nodemon"
1615 },
3130 "eslint-plugin-jsx-a11y" : " ^6.2.1" ,
3231 "eslint-plugin-prettier" : " ^3.0.1" ,
3332 "eslint-plugin-react" : " ^7.12.4" ,
33+ "husky" : " ^1.3.1" ,
3434 "jest" : " ^24.1.0" ,
35+ "lint-staged" : " ^8.1.4" ,
3536 "nodemon" : " ^1.18.9" ,
3637 "prettier" : " ^1.16.4" ,
38+ "pretty-quick" : " ^1.10.0" ,
3739 "ts-jest" : " ^23.10.5" ,
3840 "ts-node" : " ^8.0.2" ,
3941 "typescript" : " ^3.3.1"
42+ },
43+ "husky" : {
44+ "hooks" : {
45+ "pre-commit" : " lint-staged"
46+ }
47+ },
48+ "lint-staged" : {
49+ "*.{js,ts}" : [
50+ " eslint ./src --ext .ts,.js --fix" ,
51+ " pretty-quick" ,
52+ " git add"
53+ ]
4054 }
4155}
Original file line number Diff line number Diff line change 11import add from './index' ;
22
33test ( 'basic test' , ( ) => {
4- expect ( add ( 2 , 4 ) ) . toBe ( 6 ) ;
4+ expect ( add ( 2 , 4 , 6 ) ) . toBe ( 12 ) ;
55} ) ;
Original file line number Diff line number Diff line change 1- export default function add ( x : number , y : number ) : number {
2- return x + y ;
1+ export default function add ( x : number , y : number , z : number ) : number {
2+ return x + y + z ;
33}
You can’t perform that action at this time.
0 commit comments