|
11 | 11 | "!src/tests"
|
12 | 12 | ],
|
13 | 13 | "scripts": {
|
14 |
| - "format": "prettier --write .", |
15 | 14 | "build": "next build test/sample",
|
| 15 | + "format": "run-s format:check-fix:*", |
| 16 | + "format:ci": "run-s format:check:*", |
| 17 | + "format:check-fix:lint": "run-e format:check:lint format:fix:lint", |
| 18 | + "format:check:lint": "cross-env-shell eslint $npm_package_config_eslint", |
| 19 | + "format:fix:lint": "cross-env-shell eslint --fix $npm_package_config_eslint", |
| 20 | + "format:check-fix:prettier": "run-e format:check:prettier format:fix:prettier", |
| 21 | + "format:check:prettier": "cross-env-shell prettier --check $npm_package_config_prettier", |
| 22 | + "format:fix:prettier": "cross-env-shell prettier --write $npm_package_config_prettier", |
16 | 23 | "test:plugin": "npm run build && jest",
|
17 | 24 | "test:src": "jest --config src/tests/jest.config.js",
|
18 | 25 | "test": "npm run test:plugin && npm run test:src",
|
|
26 | 33 | "prepublishOnly:install": "npm ci",
|
27 | 34 | "prepublishOnly:test": "npm test"
|
28 | 35 | },
|
| 36 | + "config": { |
| 37 | + "eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{src,scripts,tests,.github}/**/*.{js,md,html}\" \"*.{js,md,html}\" \".*.{js,md,html}\"", |
| 38 | + "prettier": "--ignore-path .gitignore --loglevel=warn \"{src,scripts,tests,.github}/**/*.{js,md,yml,json,html}\" \"*.{js,yml,json,html}\" \".*.{js,yml,json,html}\" \"!package-lock.json\"" |
| 39 | + }, |
29 | 40 | "repository": {
|
30 | 41 | "type": "git",
|
31 | 42 | "url": "git+https://github.com/netlify/netlify-plugin-nextjs.git"
|
|
77 | 88 | "husky": {
|
78 | 89 | "hooks": {
|
79 | 90 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
80 |
| - "pre-commit": "prettier --check ." |
| 91 | + "pre-push": "npm run format" |
81 | 92 | }
|
82 | 93 | },
|
83 | 94 | "engines": {
|
|
0 commit comments