|
19 | 19 | "build": "yarn build:cjs; yarn build:esm; mkdir -p dist && cp src/styles.css dist", |
20 | 20 | "build:cjs": "babel --delete-dir-on-start src -d lib/cjs", |
21 | 21 | "build:esm": "babel --delete-dir-on-start --env-name esm src -d lib/esm", |
22 | | - "prepare": "yarn build && yarn docs:deploy", |
| 22 | + "prepublishOnly": "yarn lint && yarn build && yarn docs:deploy", |
23 | 23 | "docs": "docz dev", |
24 | 24 | "docs:build": "docz build", |
25 | | - "docs:deploy": "yarn docs:build && cp .docz/dist/index.html .docz/dist/404.html && gh-pages -d .docz/dist" |
| 25 | + "docs:deploy": "yarn docs:build && cp .docz/dist/index.html .docz/dist/404.html && gh-pages -d .docz/dist", |
| 26 | + "lint": "eslint ." |
26 | 27 | }, |
| 28 | + "pre-commit": "lint", |
27 | 29 | "keywords": [ |
28 | 30 | "react", |
29 | 31 | "tooltip", |
|
40 | 42 | "prettier": { |
41 | 43 | "singleQuote": true |
42 | 44 | }, |
| 45 | + "eslintConfig": { |
| 46 | + "env": { |
| 47 | + "browser": true, |
| 48 | + "es6": true, |
| 49 | + "node": true |
| 50 | + }, |
| 51 | + "parser": "babel-eslint", |
| 52 | + "extends": [ |
| 53 | + "eslint:recommended", |
| 54 | + "plugin:react/recommended", |
| 55 | + "plugin:jsx-a11y/recommended", |
| 56 | + "plugin:prettier/recommended" |
| 57 | + ], |
| 58 | + "parserOptions": { |
| 59 | + "ecmaFeatures": { |
| 60 | + "jsx": true |
| 61 | + }, |
| 62 | + "ecmaVersion": 2018, |
| 63 | + "sourceType": "module" |
| 64 | + }, |
| 65 | + "plugins": [ |
| 66 | + "react", |
| 67 | + "jsx-a11y" |
| 68 | + ], |
| 69 | + "settings": { |
| 70 | + "react": { |
| 71 | + "version": "latest" |
| 72 | + } |
| 73 | + }, |
| 74 | + "rules": { |
| 75 | + "indent": [ |
| 76 | + "error", |
| 77 | + 2 |
| 78 | + ], |
| 79 | + "linebreak-style": [ |
| 80 | + "error", |
| 81 | + "unix" |
| 82 | + ], |
| 83 | + "quotes": [ |
| 84 | + "error", |
| 85 | + "single" |
| 86 | + ], |
| 87 | + "semi": [ |
| 88 | + "error", |
| 89 | + "always" |
| 90 | + ] |
| 91 | + } |
| 92 | + }, |
| 93 | + "eslintIgnore": [ |
| 94 | + "dist", |
| 95 | + "lib" |
| 96 | + ], |
43 | 97 | "peerDependencies": { |
44 | 98 | "react": "^16.3.0", |
45 | 99 | "react-dom": "^16.3.0" |
|
55 | 109 | "@babel/plugin-transform-runtime": "^7.1.0", |
56 | 110 | "@babel/preset-env": "^7.1.0", |
57 | 111 | "@babel/preset-react": "^7.0.0", |
| 112 | + "babel-eslint": "^9.0.0", |
58 | 113 | "docz": "^0.11.2", |
59 | 114 | "docz-plugin-css": "^0.11.0", |
| 115 | + "eslint": "^5.6.0", |
| 116 | + "eslint-config-prettier": "^3.1.0", |
| 117 | + "eslint-plugin-jsx-a11y": "^6.1.1", |
| 118 | + "eslint-plugin-prettier": "^2.6.2", |
| 119 | + "eslint-plugin-react": "^7.11.1", |
60 | 120 | "gh-pages": "^2.0.0", |
| 121 | + "pre-commit": "^1.2.2", |
61 | 122 | "prop-types": "^15.6.2", |
62 | 123 | "react": "^16.5.2", |
63 | 124 | "react-dom": "^16.5.2" |
|
0 commit comments