add prettier to precommit
Showing
... | @@ -68,6 +68,7 @@ | ... | @@ -68,6 +68,7 @@ |
"jest": "^21.0.1", | "jest": "^21.0.1", | ||
"lint-staged": "^4.3.0", | "lint-staged": "^4.3.0", | ||
"mockjs": "^1.0.1-beta3", | "mockjs": "^1.0.1-beta3", | ||
"prettier": "^1.9.0", | |||
"pro-download": "^1.0.0", | "pro-download": "^1.0.0", | ||
"react-test-renderer": "^16.0.0", | "react-test-renderer": "^16.0.0", | ||
"redbox-react": "^1.3.2", | "redbox-react": "^1.3.2", | ||
... | @@ -81,38 +82,22 @@ | ... | @@ -81,38 +82,22 @@ |
"nightmare": "^2.10.0" | "nightmare": "^2.10.0" | ||
}, | }, | ||
"babel": { | "babel": { | ||
"presets": [ | "presets": ["env", "react"], | ||
"env", | "plugins": ["transform-decorators-legacy", "transform-class-properties"] | ||
"react" | |||
], | |||
"plugins": [ | |||
"transform-decorators-legacy", | |||
"transform-class-properties" | |||
] | |||
}, | }, | ||
"jest": { | "jest": { | ||
"setupFiles": [ | "setupFiles": ["<rootDir>/tests/setupTests.js"], | ||
"<rootDir>/tests/setupTests.js" | "testMatch": ["**/?(*.)(spec|test|e2e).js?(x)"], | ||
], | |||
"testMatch": [ | |||
"**/?(*.)(spec|test|e2e).js?(x)" | |||
], | |||
"setupTestFrameworkScriptFile": "<rootDir>/tests/jasmine.js", | "setupTestFrameworkScriptFile": "<rootDir>/tests/jasmine.js", | ||
"moduleFileExtensions": [ | "moduleFileExtensions": ["js", "jsx"], | ||
"js", | |||
"jsx" | |||
], | |||
"moduleNameMapper": { | "moduleNameMapper": { | ||
"\\.(css|less)$": "<rootDir>/tests/styleMock.js" | "\\.(css|less)$": "<rootDir>/tests/styleMock.js" | ||
} | } | ||
}, | }, | ||
"lint-staged": { | "lint-staged": { | ||
"**/*.{js,jsx}": "lint-staged:js", | "**/*.{js,jsx}": "lint-staged:js", | ||
"**/*.less": "stylelint --syntax less" | "**/*.less": "stylelint --syntax less", | ||
"*.{js,jsx,less,json}": ["prettier --write", "git add"] | |||
}, | }, | ||
"browserslist": [ | "browserslist": ["> 1%", "last 2 versions", "not ie <= 10"] | ||
"> 1%", | |||
"last 2 versions", | |||
"not ie <= 10" | |||
] | |||
} | } |
Please register or sign in to comment