|
8 | 8 | "babel-jest": "^22.4.3",
|
9 | 9 | "chokidar": "^1.7.0",
|
10 | 10 | "cross-env": "^5.1.4",
|
11 |
| - "eslint": "^4.19.1", |
12 |
| - "eslint-config-google": "^0.9.1", |
13 |
| - "eslint-config-prettier": "^2.9.0", |
14 |
| - "eslint-plugin-flowtype": "^2.46.1", |
15 |
| - "eslint-plugin-import": "^2.9.0", |
16 |
| - "eslint-plugin-jsx-a11y": "^6.0.2", |
17 |
| - "eslint-plugin-prettier": "^2.6.0", |
18 |
| - "eslint-plugin-react": "^7.7.0", |
| 11 | + "eslint": "^5.6.1", |
| 12 | + "eslint-config-google": "^0.10.0", |
| 13 | + "eslint-config-prettier": "^3.1.0", |
| 14 | + "eslint-plugin-flow-vars": "^0.5.0", |
| 15 | + "eslint-plugin-flowtype": "^2.50.3", |
| 16 | + "eslint-plugin-import": "^2.14.0", |
| 17 | + "eslint-plugin-jsx-a11y": "^6.1.2", |
| 18 | + "eslint-plugin-prettier": "^3.0.0", |
| 19 | + "eslint-plugin-react": "^7.11.1", |
19 | 20 | "flow-bin": "^0.42.0",
|
20 | 21 | "fs-extra": "^7.0.0",
|
21 | 22 | "glob": "^7.1.1",
|
| 23 | + "husky": "1.1.1", |
22 | 24 | "jest": "^23.5.0",
|
23 | 25 | "jest-cli": "^23.5.0",
|
24 | 26 | "lerna": "^3.3.0",
|
| 27 | + "lint-staged": "^8.0.4", |
25 | 28 | "npm-run-all": "4.1.2",
|
26 | 29 | "plop": "^1.8.1",
|
27 |
| - "prettier": "^1.12", |
28 |
| - "prettier-eslint-cli": "4.7.1", |
| 30 | + "prettier": "^1.14.3", |
29 | 31 | "rimraf": "^2.6.1",
|
30 | 32 | "yargs": "^10.0.3"
|
31 | 33 | },
|
|
38 | 40 | "**/__tests__/fixtures/"
|
39 | 41 | ],
|
40 | 42 | "private": true,
|
| 43 | + "lint-staged": { |
| 44 | + "*.{js,jsx}": [ |
| 45 | + "eslint --ignore-path .gitignore --ignore-path .prettierignore --fix", |
| 46 | + "git add" |
| 47 | + ], |
| 48 | + "*.{md,css,scss,yaml,yml}": [ |
| 49 | + "prettier --write", |
| 50 | + "git add" |
| 51 | + ] |
| 52 | + }, |
| 53 | + "husky": { |
| 54 | + "hooks": { |
| 55 | + "pre-commit": "lint-staged || node scripts/on-lint-error.js" |
| 56 | + } |
| 57 | + }, |
41 | 58 | "scripts": {
|
42 | 59 | "bootstrap": "npm-run-all -s check-versions lerna-prepare",
|
43 | 60 | "check-versions": "babel-node scripts/check-versions.js",
|
44 |
| - "format": "npm-run-all -p format-packages format-cache-dir format-www format-integration format-examples format-scripts format-markdown format-yaml", |
45 |
| - "format-cache-dir": "prettier-eslint --write \"packages/gatsby/cache-dir/*.js\"", |
46 |
| - "format-examples": "prettier-eslint --write \"examples/**/gatsby-node.js\" \"examples/**/gatsby-config.js\" \"examples/**/src/**/*.js\"", |
47 |
| - "format-markdown": "prettier --write \"**/*.md\" --no-semi", |
48 |
| - "format-packages": "prettier-eslint --write \"packages/*/src/**/*.js\"", |
49 |
| - "format-scripts": "prettier-eslint --write \"scripts/**/*.js\"", |
50 |
| - "format-www": "prettier-eslint --write \"www/*.js\" \"www/src/**/*.js\"", |
51 |
| - "format-integration": "prettier-eslint --write \"integration-tests/**/src/**/*.js\" \"integration-tests/**/cypress/**/*.js\"", |
52 |
| - "format-yaml": "prettier --write \"**/*.y?(a)ml\"", |
| 61 | + "format": "npm run format:code && npm run format:other", |
| 62 | + "format:other": "npm run prettier -- --write", |
| 63 | + "format:code": "npm run lint:code -- --fix", |
| 64 | + "hooks:uninstall": "node node_modules/husky/husky.js uninstall", |
| 65 | + "hooks:install": "node node_modules/husky/husky.js install", |
53 | 66 | "jest": "jest",
|
54 | 67 | "lerna": "lerna",
|
55 | 68 | "lerna-prepare": "lerna run prepare",
|
56 |
| - "lint": "npm-run-all --continue-on-error --parallel lint:js lint:yaml", |
57 |
| - "lint:js": "eslint --ext .js,.jsx packages/**/src integration-tests/**/src", |
| 69 | + "lint": "npm-run-all --continue-on-error -p lint:code lint:other", |
| 70 | + "lint:code": "eslint --ignore-path .gitignore --ignore-path .prettierignore --ext .js,.jsx .", |
58 | 71 | "lint:flow": "babel-node scripts/flow-check.js",
|
59 |
| - "lint:yaml": "prettier --list-different \"**/*.y?(a)ml\"", |
| 72 | + "lint:other": "npm run prettier -- --list-different", |
60 | 73 | "plop": "plop",
|
61 | 74 | "prebootstrap": "yarn",
|
| 75 | + "prettier": "prettier \"**/*.{md,css,scss,yaml,yml}\"", |
62 | 76 | "publish": "node scripts/check-publish-access && lerna publish",
|
63 | 77 | "publish-canary": "lerna publish --canary --yes",
|
64 | 78 | "publish-next": "lerna publish --npm-tag=next --bump=prerelease",
|
|
67 | 81 | "test:update": "jest --updateSnapshot",
|
68 | 82 | "test:watch": "jest --watch",
|
69 | 83 | "test:integration": "jest --config=integration-tests/jest.config.js",
|
70 |
| - "version": "prettier --write \"**/CHANGELOG.md\" --no-semi", |
71 | 84 | "watch": "lerna run watch --no-sort --stream --concurrency 999"
|
72 | 85 | },
|
73 | 86 | "workspaces": [
|
|
0 commit comments