|
35 | 35 | "docs:watch": "nodemon --exec npm run docs:dev -w lib typings", |
36 | 36 | "docs:publish": "npm run build:docs && ./node_modules/contentful-sdk-jsdoc/bin/publish-docs.sh contentful-management.js contentful-management", |
37 | 37 | "lint": "eslint lib test", |
38 | | - "pretest": "rimraf coverage && npm run lint", |
| 38 | + "lint:fix": "eslint lib test --fix", |
39 | 39 | "test": "npm run test:unit:cover && npm run test:types && npm run test:integration:cover && npm run test:size", |
40 | 40 | "test:unit:cover": "npm run test:unit -- --coverage", |
41 | 41 | "test:unit": "npx vitest --project unit --run", |
|
48 | 48 | "test:version": "grep -r \"0.0.0-determined-by-semantic-release\" ./dist > /dev/null && echo \"version 0.0.0-determined-by-semantic-release found in output\" && exit 1 || exit 0", |
49 | 49 | "test:size": "size-limit", |
50 | 50 | "test:demo-projects": "npm run test:demo-node && npm run test:demo-browser", |
51 | | - "test:demo-node": "rimraf ./test/output-integration/node/node-modules && npm --prefix ./test/output-integration/node ci && vitest --run ./test/output-integration/node", |
52 | | - "test:demo-browser": "rimraf ./test/output-integration/browser/node-modules && npm --prefix ./test/output-integration/browser ci && npm --prefix ./test/output-integration/browser run test", |
53 | | - "test:prepush": "npm run build && npm run test:unit && npm run test:size", |
54 | | - "format:fix": "prettier --write '**/*.{jsx,js,ts,tsx}'", |
| 51 | + "test:demo-node": "npm ci --prefix ./test/output-integration/node && npm run test --prefix ./test/output-integration/node", |
| 52 | + "test:demo-browser": "npm ci --prefix ./test/output-integration/browser && npm run setup-test-env --prefix ./test/output-integration/browser && npm run test --prefix ./test/output-integration/browser", |
| 53 | + "format:fix": "npm run format:check -- --write", |
55 | 54 | "format:check": "prettier --check '**/*.{jsx,js,ts,tsx}'", |
56 | 55 | "semantic-release": "semantic-release", |
57 | | - "precommit": "npm run lint", |
58 | | - "postpublish": "if [ \"$(git rev-parse --abbrev-ref HEAD)\" = master ] ; then npm run docs:publish && npm run clean ; else exit 0 ; fi", |
59 | | - "prepush": "npm run test:prepush", |
60 | | - "prepublishOnly": "npm run build && npm run test:version" |
| 56 | + "prepare": "husky" |
61 | 57 | }, |
62 | 58 | "files": [ |
63 | 59 | "dist", |
|
125 | 121 | } |
126 | 122 | }, |
127 | 123 | "lint-staged": { |
128 | | - "*.{js,ts}": [ |
| 124 | + "./{lib,test}/*.{js,ts}": [ |
129 | 125 | "prettier --write", |
130 | | - "eslint" |
| 126 | + "eslint --fix" |
131 | 127 | ], |
132 | 128 | "*.md": [ |
133 | 129 | "prettier --write" |
|
0 commit comments