|
41 | 41 | ], |
42 | 42 | "scripts": { |
43 | 43 | "toc": "doctoc README.md", |
44 | | - "lint": "eslint src --fix", |
| 44 | + "lint": "(prettier . --check || true) && eslint .", |
| 45 | + "format": "prettier . --write && eslint . --fix", |
45 | 46 | "test": "vitest run src", |
46 | 47 | "test:watch": "npm run test -- --watch", |
47 | 48 | "test:update": "npm run test -- --updateSnapshot --coverage", |
|
61 | 62 | "@commitlint/config-conventional": "^17.6.6", |
62 | 63 | "@sveltejs/vite-plugin-svelte": "^2.4.2", |
63 | 64 | "@testing-library/jest-dom": "^5.16.5", |
| 65 | + "@typescript-eslint/eslint-plugin": "^6.19.1", |
| 66 | + "@typescript-eslint/parser": "^6.19.1", |
64 | 67 | "@vitest/coverage-c8": "^0.33.0", |
65 | 68 | "all-contributors-cli": "^6.26.0", |
66 | 69 | "doctoc": "^2.2.1", |
67 | 70 | "eslint": "^8.43.0", |
| 71 | + "eslint-config-prettier": "^9.1.0", |
68 | 72 | "eslint-config-standard": "^17.1.0", |
69 | 73 | "eslint-plugin-import": "^2.27.5", |
70 | 74 | "eslint-plugin-n": "^16.0.1", |
|
77 | 81 | "lint-staged": "^13.2.3", |
78 | 82 | "npm-run-all": "^4.1.5", |
79 | 83 | "prettier": "^3.0.0", |
| 84 | + "prettier-plugin-svelte": "^3.1.2", |
80 | 85 | "svelte": "^4.0.1", |
| 86 | + "svelte-jester": "^3.0.0", |
| 87 | + "typescript": "^5.3.3", |
81 | 88 | "vite": "^4.3.9", |
82 | 89 | "vitest": "^0.33.0" |
83 | 90 | }, |
84 | | - "husky": { |
85 | | - "hooks": { |
86 | | - "pre-commit": "lint-staged", |
87 | | - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" |
88 | | - } |
89 | | - }, |
90 | 91 | "lint-staged": { |
91 | | - "README.md": [ |
| 92 | + "{README.md,.all-contributorsrc}": [ |
92 | 93 | "npm run toc", |
93 | | - "prettier --parser markdown --write", |
94 | | - "git add" |
95 | | - ], |
96 | | - ".all-contributorsrc": [ |
97 | 94 | "npm run contributors:generate", |
98 | | - "git add" |
| 95 | + "npx --no-install prettier --write README.md .all-contributorsrc", |
| 96 | + "git add README.md .all-contributorsrc" |
| 97 | + ], |
| 98 | + "src/**/*": [ |
| 99 | + "npx --no-install vitest related --run" |
| 100 | + ], |
| 101 | + "*.{js,cjs,ts,svelte,json,yml,yaml}": [ |
| 102 | + "npx --no-install prettier --check" |
99 | 103 | ], |
100 | | - "**/*.js": [ |
101 | | - "npm run lint", |
102 | | - "npm test", |
103 | | - "git add" |
| 104 | + "*.{js,cjs,ts,svelte}": [ |
| 105 | + "npx --no-install eslint" |
104 | 106 | ] |
105 | 107 | }, |
106 | 108 | "commitlint": { |
|
0 commit comments