File tree Expand file tree Collapse file tree 7 files changed +38
-26
lines changed Expand file tree Collapse file tree 7 files changed +38
-26
lines changed Original file line number Diff line number Diff line change 1-
2- node_modules /
1+ node_modules /
Original file line number Diff line number Diff line change 11module . exports = {
2- presets : [
3- [
4- '@babel/preset-env' ,
5- {
6- targets : {
7- node : 'current' ,
8- } ,
2+ presets : [
3+ [
4+ '@babel/preset-env' ,
5+ {
6+ targets : {
7+ node : 'current' ,
98 } ,
10- ] ,
9+ } ,
1110 ] ,
12- } ;
13-
11+ ] ,
12+ }
Original file line number Diff line number Diff line change 66 "author" : " Kimmy" ,
77 "license" : " MIT" ,
88 "scripts" : {
9+ "lint" : " prettier src/**/*.js *.js" ,
10+ "lint:fix" : " npm run lint -- --write" ,
911 "test" : " jest"
1012 },
1113 "devDependencies" : {
1214 "@babel/core" : " ^7.7.5" ,
1315 "@babel/preset-env" : " ^7.7.6" ,
1416 "babel-jest" : " ^24.9.0" ,
15- "jest" : " ^24.9.0"
17+ "jest" : " ^24.9.0" ,
18+ "prettier" : " ^1.19.1"
1619 }
1720}
Original file line number Diff line number Diff line change 1+ module . exports = {
2+ printWidth : 80 ,
3+ tabWidth : 2 ,
4+ semi : false ,
5+ singleQuote : true ,
6+ trailingComma : 'es5' ,
7+ arrowParens : 'always' ,
8+ }
Original file line number Diff line number Diff line change 1-
21export default class Calculator {
3- add ( x , y ) {
4- return 0 ;
5- }
2+ add ( x , y ) {
3+ return 0
4+ }
65}
Original file line number Diff line number Diff line change 1+ import Calculator from './Calculator'
12
2- import Calculator from "./Calculator"
3+ describe ( 'Calculator' , ( ) => {
4+ it ( 'should equal to 2 when add 1 and 1' , ( ) => {
5+ const calculator = new Calculator ( )
36
4- describe ( "Calculator" , ( ) => {
5- it ( "should equal to 2 when add 1 and 1" , ( ) => {
6- const calculator = new Calculator ( )
7+ const result = calculator . add ( 1 , 1 )
78
8- const result = calculator . add ( 1 , 1 )
9-
10- expect ( result ) . toBe ( 2 )
11- } )
12- } ) ;
9+ expect ( result ) . toBe ( 2 )
10+ } )
11+ } )
Original file line number Diff line number Diff line change @@ -2640,6 +2640,11 @@ prelude-ls@~1.1.2:
26402640 version "1.1.2"
26412641 resolved "https://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
26422642
2643+ prettier@^1.19.1 :
2644+ version "1.19.1"
2645+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
2646+ integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
2647+
26432648pretty-format@^24.9.0 :
26442649 version "24.9.0"
26452650 resolved "https://registry.npm.taobao.org/pretty-format/download/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9"
You can’t perform that action at this time.
0 commit comments