Last active
January 19, 2018 13:52
-
-
Save iampeterbanjo/39e7212ef906160d521f7e3eb5a85724 to your computer and use it in GitHub Desktop.
package.json snippet with jest test runner, prettier formatter and eslint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"prettier": { | |
"arrowParens": "always", | |
"bracketSpacing": true, | |
"jsxBracketSameLine": true, | |
"printWidth": 90, | |
"semi": true, | |
"singleQuote": true, | |
"tabWidth": 2, | |
"trailingComma": "es5", | |
"useTabs": false | |
}, | |
"jest": { | |
"collectCoverage": true, | |
"collectCoverageFrom": ["lib/*.{js,jsx}", "!**/node_modules/**", "!**/vendor/**"], | |
"notify": true, | |
"projects": ["<rootDir>"] | |
}, | |
"scripts": { | |
"clean": "npm run clean:build; npm run clean:npm", | |
"clean:build": "rm -rf ./build", | |
"clean:npm": "rm -rf ./node_modules", | |
"build": "npm run clean:build; npm run lint; babel lib -d build", | |
"dev": "npm run lint & npm run test:watch", | |
"lint": "eslint --fix --quiet lib/** test/**", | |
"lint:watch": "chokidar --initial './lib' './test' -c 'npm run lint --silent'", | |
"prepublish": "npm run build", | |
"test:watch": "chokidar --initial './test' './lib' -c 'npm run test --silent'", | |
"test": "jest test/*.test.js" | |
}, | |
"devDependencies": { | |
"babel-cli": "^6.26.0", | |
"babel-core": "^6.26.0", | |
"babel-eslint": "^7.2.3", | |
"babel-jest": "^22.1.0", | |
"babel-preset-env": "^1.6.1", | |
"babel-preset-es2015": "^6.24.1", | |
"babel-preset-react": "^6.24.1", | |
"chai": "^4.1.2", | |
"chokidar-cli": "^1.2.0", | |
"eslint": "^4.15.0", | |
"eslint-config-react-app": "^2.1.0", | |
"eslint-plugin-flowtype": "^2.41.0", | |
"eslint-plugin-import": "^2.8.0", | |
"eslint-plugin-jsx-a11y": "^5.1.1", | |
"eslint-plugin-prettier": "^2.5.0", | |
"eslint-plugin-react": "^7.5.1", | |
"eslint-watch": "^3.1.3", | |
"jest": "^22.1.2", | |
"prettier": "^1.10.2", | |
"prettier-eslint": "^8.2.1" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment