Skip to content

Commit 7290b04

Browse files
committed
Merge branch 'develop' into develop-codemirror-v6
2 parents eae004b + c6dcc20 commit 7290b04

File tree

225 files changed

+8704
-6962
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+8704
-6962
lines changed

.eslintrc

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,36 @@
1616
"import/no-unresolved": 0,
1717
"import/no-named-as-default": 0,
1818
"import/no-named-as-default-member": 0,
19+
"import/no-useless-path-segments": 1,
20+
"import/no-cycle":0, //temporarily off
21+
"import/no-import-module-exports": 0, //temporarily off
22+
"import/extensions": [ // override airbnb setting to allow imports of js, jsx, ts, and tsx files to auto-resolve instead of error
23+
"error",
24+
"ignorePackages",
25+
{
26+
"js": "never",
27+
"jsx": "never",
28+
"ts": "never",
29+
"tsx": "never"
30+
}
31+
],
32+
"import/prefer-default-export": "off",
33+
"react/jsx-filename-extension": [1, { "extensions": [".jsx", ".tsx"] }],
1934
"comma-dangle": 0, // not sure why airbnb turned this on. gross!
35+
"default-param-last": 0,
36+
"no-else-return" :0,
2037
"indent": 0,
2138
"no-console": 0,
2239
"no-alert": 0,
40+
"no-import-assign": 2,
41+
"no-promise-executor-return": 0, //temporarily off
42+
"no-restricted-exports": 1,
2343
"no-underscore-dangle": 0,
2444
"no-useless-catch": 2,
45+
"no-plusplus": "off",
46+
"prefer-object-spread": 0,
2547
"max-len": [1, 120, 2, {"ignoreComments": true, "ignoreTemplateLiterals": true}],
48+
"max-classes-per-file": 0,
2649
"quote-props": [1, "as-needed"],
2750
"no-unused-vars": [1, {"vars": "local", "args": "none"}],
2851
"consistent-return": ["error", { "treatUndefinedAsUnspecified": true }],
@@ -36,7 +59,19 @@
3659
{ "ignorePureComponents": true
3760
}],
3861
"class-methods-use-this": 0,
39-
"react/jsx-no-bind": [2, {"allowBind": true, "allowArrowFunctions": true}],
62+
"react/button-has-type": 0,
63+
"react/destructuring-assignment":0,
64+
"react/function-component-definition": 0,
65+
"react/jsx-curly-newline":0,
66+
"react/jsx-fragments":0,
67+
"react/jsx-no-useless-fragment":0, // temporarily off
68+
"react/jsx-one-expression-per-line": 0,
69+
"react/jsx-props-no-spreading": 0,
70+
"react/jsx-wrap-multilines": 0,
71+
"react/jsx-no-bind": [2, {"allowBind": true, "allowArrowFunctions": true, "allowFunctions": true}],
72+
"react/no-deprecated": 0, //temporarily off
73+
"react/no-unused-class-component-methods": 1,
74+
"react/sort-comp": 0,
4075
"no-return-assign": [2, "except-parens"],
4176
"jsx-a11y/anchor-is-valid": [
4277
"error",
@@ -49,6 +84,8 @@
4984
]
5085
}
5186
],
87+
"jsx-a11y/control-has-associated-label": 0, //temporarily off
88+
"jsx-a11y/label-has-associated-control": 0, //temporarily off
5289
"jsx-a11y/label-has-for": [
5390
2,
5491
{
@@ -72,6 +109,11 @@
72109
],
73110
"settings": {
74111
"import/parser": "@babel/eslint-parser",
112+
"import/resolver": {
113+
"node": {
114+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
115+
}
116+
},
75117
"import/resolve": {
76118
"moduleDirectory": ["node_modules"]
77119
}
@@ -85,7 +127,22 @@
85127
},
86128
"overrides": [
87129
{
88-
"files": ["*.stories.jsx"],
130+
"files": ["*.ts", "*.tsx"],
131+
"parser": "@typescript-eslint/parser",
132+
"plugins": ["@typescript-eslint"],
133+
"rules": {
134+
"no-use-before-define": "off",
135+
"import/no-extraneous-dependencies": "off",
136+
"no-unused-vars": "off",
137+
"import/no-default-export": "warn",
138+
"no-underscore-dangle": "warn",
139+
"react/require-default-props": "off",
140+
"no-shadow": "off",
141+
"@typescript-eslint/no-shadow": "error"
142+
}
143+
},
144+
{
145+
"files": ["*.stories.@(js|jsx|ts|tsx)"],
89146
"rules": {
90147
"import/no-extraneous-dependencies": "off"
91148
}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Use Node.js
1212
uses: actions/setup-node@v1
1313
with:
14-
node-version: '16.14.x'
14+
node-version: '18.20.x'
1515
- run: npm install
1616
- run: npm run test
1717
- run: npm run lint

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ terraform/.terraform/
2121
storybook-static
2222
duplicates.json
2323

24-
coverage
24+
coverage
25+
26+
*.tsbuildinfo

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.14.2
1+
18.20.8

.prettierrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"insertPragma": false,
66
"jsxBracketSameLine": false,
77
"jsxSingleQuote": false,
8-
"parser": "babel",
98
"printWidth": 80,
109
"proseWrap": "never",
1110
"requirePragma": false,

.storybook/main.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type { import('@storybook/react-webpack5').StorybookConfig } */
22
const config = {
3-
stories: ['../client/**/*.stories.(jsx|mdx)'],
3+
stories: ['../client/**/*.stories.(jsx|mdx|tsx)'],
44
addons: [
55
'@storybook/addon-links',
66
'@storybook/addon-essentials',
@@ -18,19 +18,19 @@ const config = {
1818
// https://storybook.js.org/docs/react/builders/webpack
1919
// this modifies the existing image rule to exclude .svg files
2020
// since we want to handle those files with @svgr/webpack
21-
const imageRule = config.module.rules.find(rule => rule.test.test('.svg'))
22-
imageRule.exclude = /\.svg$/
21+
const imageRule = config.module.rules.find((rule) =>
22+
rule.test.test('.svg')
23+
);
24+
imageRule.exclude = /\.svg$/;
2325

2426
// configure .svg files to be loaded with @svgr/webpack
2527
config.module.rules.push({
2628
test: /\.svg$/,
2729
use: ['@svgr/webpack']
28-
})
30+
});
2931

30-
return config
31-
},
32+
return config;
33+
}
3234
};
3335

3436
export default config;
35-
36-

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sudo: required
22
language: node_js
33
node_js:
4-
- "16.14.2"
4+
- "18.20.8"
55

66
cache:
77
directories:

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16.14.2 AS base
1+
FROM node:18.20.8 AS base
22
ENV APP_HOME=/usr/src/app \
33
TERM=xterm
44
RUN mkdir -p $APP_HOME
@@ -28,4 +28,4 @@ ENV NODE_ENV=production
2828
COPY package.json package-lock.json index.js ./
2929
RUN npm install --production
3030
COPY --from=build $APP_HOME/dist ./dist
31-
CMD ["npm", "run", "start:prod"]
31+
CMD ["npm", "run", "start:prod"]

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ We are a community of, and in solidarity with, people from every gender identity
1010

1111
Learn more about [our community](https://p5js.org/community/) and read our [Community Statement and Code of Conduct](./.github/CODE_OF_CONDUCT.md). You can directly support our work with p5.js by [donating to the Processing Foundation](https://processingfoundation.org/support).
1212

13+
Stay in touch with Processing Foundation across other platforms:
14+
- [Instagram](https://www.instagram.com/p5xjs)
15+
- [Youtube](https://www.youtube.com/@ProcessingFoundation)
16+
- [X](https://x.com/p5xjs)
17+
- [Discord](https://discord.com/invite/esmGA6H6wm)
18+
- [Forum](https://discourse.processing.org)
19+
20+
1321
## Using the p5.js Editor 🤔
1422

1523
Make your first sketch in the [p5.js Editor](https://editor.p5js.org/)! Learn more about sketching with p5.js on the [Get Started](https://p5js.org/tutorials/get-started/) and find everything you can do in the [Reference](https://p5js.org/reference/). You can also look at [examples](https://editor.p5js.org/p5/sketches) and remix them in the p5.js Editor.
@@ -26,6 +34,13 @@ The p5.js Editor is a collaborative project created by many individuals, mostly
2634

2735
3. [All Contributors list on the p5.js repository](https://github.com/processing/p5.js?tab=readme-ov-file#contributors) - Explore the All Contributors list to see the wide range of contributions by our amazing community!
2836

37+
> **TypeScript Migration:**
38+
> As of July 2025, we are working on migrating the repo to TypeScript as part of the **[p5.js Web Editor pr05 Grant](https://github.com/processing/pr05-grant/wiki/2025-pr05-Program-Page)**.
39+
> This migration will occur in two phases:
40+
> 1. **Grant Work (July – October 31, 2025)** – Setting up TypeScript configuration, tooling, and starting partial migration. Contributions will be **closed** during this period.
41+
> 2. **Open Contribution (After October 31, 2025)** – TypeScript migration tasks will **open** to all contributors, with guidelines and tutorials available.
42+
>
43+
> For full details, see [TypeScript Migration Plan](./contributor_docs/typescript-migration.md).
2944
3045
## Acknowledgements 🙏
3146

client/common/Button.stories.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { action } from '@storybook/addon-actions';
33

4-
import Button from './Button';
4+
import { Button, ButtonDisplays, ButtonKinds, ButtonTypes } from './Button';
55
import { GithubIcon, DropdownArrowIcon, PlusIcon } from './icons';
66

77
export default {
@@ -15,13 +15,13 @@ export default {
1515
};
1616

1717
export const AllFeatures = (args) => (
18-
<Button disabled={args.disabled} type="submit" label={args.label}>
18+
<Button disabled={args.disabled} type={ButtonTypes.SUBMIT} label={args.label}>
1919
{args.children}
2020
</Button>
2121
);
2222

2323
export const SubmitButton = () => (
24-
<Button type="submit" label="submit">
24+
<Button type={ButtonTypes.SUBMIT} label="submit">
2525
This is a submit button
2626
</Button>
2727
);
@@ -59,7 +59,7 @@ export const ButtonWithIconAfter = () => (
5959
);
6060

6161
export const InlineButtonWithIconAfter = () => (
62-
<Button iconAfter={<DropdownArrowIcon />} display={Button.displays.inline}>
62+
<Button iconAfter={<DropdownArrowIcon />} display={ButtonDisplays.INLINE}>
6363
File name
6464
</Button>
6565
);
@@ -68,6 +68,6 @@ export const InlineIconOnlyButton = () => (
6868
<Button
6969
aria-label="Add to collection"
7070
iconBefore={<PlusIcon />}
71-
display={Button.displays.inline}
71+
display={ButtonDisplays.INLINE}
7272
/>
7373
);

0 commit comments

Comments
 (0)