Skip to content

[p5.js 2.x] chore: enable pre-commit hooks #7933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: dev-2.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 55 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,72 @@
{
"name": "p5",
"version": "2.0.3",
"description": "[![npm version](https://badge.fury.io/js/p5.svg)](https://www.npmjs.com/package/p5)",
"homepage": "https://p5js.org",
"bugs": {
"url": "https://github.com/processing/p5.js/issues"
},
"repository": "processing/p5.js",
"license": "LGPL-2.1",
"author": "",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand, the "author" field is a best practice to include but optional. Because this project follows the All Contributors specification, I think it could either be omitted or using something like "p5.js contributors"? Any thoughts on this? Minor preference against adding this as a blank field.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The author field here is not quite added but just rearranged from elsewhere in this file, ie. it is there already before as a blank string. I'm not sure this field is read by anything specific (that I know of) to populate something so I think something like "p5.js contributors" is fine either way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah Ok I saw other rearranged fields but missed this one. Sorry!

"exports": {
".": "./dist/app.js",
"./core": "./dist/core/main.js",
"./shape": "./dist/shape/index.js",
"./accessibility": "./dist/accessibility/index.js",
"./friendlyErrors": "./dist/core/friendlyErrors/index.js",
"./data": "./dist/data/index.js",
"./dom": "./dist/dom/index.js",
"./events": "./dist/events/index.js",
"./image": "./dist/image/index.js",
"./io": "./dist/io/index.js",
"./math": "./dist/math/index.js",
"./utilities": "./dist/utilities/index.js",
"./webgl": "./dist/webgl/index.js",
"./type": "./dist/type/index.js"
},
"browser": "./lib/p5.min.js",
"types": "./types/p5.d.ts",
"directories": {
"doc": "docs",
"test": "test"
},
"files": [
"dist/**",
"license.txt",
"lib/p5.min.js",
"lib/p5.js",
"lib/p5.esm.js",
"translations/**",
"types/**"
],
"scripts": {
"bench": "vitest bench",
"bench:report": "vitest bench --reporter=verbose",
"build": "rollup -c",
"dev": "vite preview/",
"dev:global": "concurrently -n build,server \"rollup -c -w\" \"npx vite preview/global/\"",
"docs": "documentation build ./src/**/*.js ./src/**/**/*.js -o ./docs/data.json && node ./utils/convert.mjs",
"bench": "vitest bench",
"bench:report": "vitest bench --reporter=verbose",
"test": "vitest",
"generate-types": "npm run docs && node utils/generate-types.mjs && node utils/patch.mjs",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"generate-types": "npm run docs && node utils/generate-types.mjs && node utils/patch.mjs"
"test": "vitest"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.js": "eslint",
"src/**/*.js": "eslint --max-warnings=0",
"test/**/*.js": "eslint",
"utils/**/*.{js,mjs}": "eslint"
},
"version": "2.0.3",
"msw": {
"workerDirectory": [
"test"
]
},
"dependencies": {
"@davepagurek/bezier-path": "^0.0.2",
"@japont/unicode-range": "^1.0.0",
Expand Down Expand Up @@ -65,51 +113,5 @@
"vite-plugin-string": "^1.2.2",
"vitest": "^2.1.5",
"webdriverio": "^9.0.7"
},
"license": "LGPL-2.1",
"browser": "./lib/p5.min.js",
"exports": {
".": "./dist/app.js",
"./core": "./dist/core/main.js",
"./shape": "./dist/shape/index.js",
"./accessibility": "./dist/accessibility/index.js",
"./friendlyErrors": "./dist/core/friendlyErrors/index.js",
"./data": "./dist/data/index.js",
"./dom": "./dist/dom/index.js",
"./events": "./dist/events/index.js",
"./image": "./dist/image/index.js",
"./io": "./dist/io/index.js",
"./math": "./dist/math/index.js",
"./utilities": "./dist/utilities/index.js",
"./webgl": "./dist/webgl/index.js",
"./type": "./dist/type/index.js"
},
"files": [
"dist/**",
"license.txt",
"lib/p5.min.js",
"lib/p5.js",
"lib/p5.esm.js",
"translations/**",
"types/**"
],
"description": "[![npm version](https://badge.fury.io/js/p5.svg)](https://www.npmjs.com/package/p5)",
"bugs": {
"url": "https://github.com/processing/p5.js/issues"
},
"homepage": "https://p5js.org",
"directories": {
"doc": "docs",
"test": "test"
},
"author": "",
"husky": {
"hooks": {}
},
"msw": {
"workerDirectory": [
"test"
]
},
"types": "./types/p5.d.ts"
}
}
Loading