Skip to content

Commit 2b20449

Browse files
committed
merge 'develop' branch
1 parent d6aa359 commit 2b20449

File tree

348 files changed

+44011
-31453
lines changed

Some content is hidden

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

348 files changed

+44011
-31453
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"presets": [
33
"@babel/preset-react",
4-
"@babel/preset-env"
4+
"@babel/preset-env",
5+
"@babel/preset-typescript"
56
],
67
"env": {
78
"production": {

.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": "off",
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/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ I have verified that this pull request:
88
* [ ] has no test errors (`npm run test`)
99
* [ ] is from a uniquely-named feature branch and is up to date with the `develop` branch.
1010
* [ ] is descriptively named and links to an issue number, i.e. `Fixes #123`
11+
* [ ] meets the standards outlined in the [accessibility guidelines](https://github.com/processing/p5.js-web-editor/blob/develop/contributor_docs/accessibility.md)

.github/workflows/test.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ jobs:
77
name: Test and lint code base
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
11-
- name: Use Node.js
12-
uses: actions/setup-node@v1
13-
with:
14-
node-version: '16.14.x'
15-
- run: npm install
16-
- run: npm run test
17-
- run: npm run lint
18-
19-
10+
- uses: actions/checkout@v2
11+
- name: Use Node.js
12+
uses: actions/setup-node@v1
13+
with:
14+
node-version: '18.20.x'
15+
- run: npm install
16+
- run: npm run test
17+
- run: npm run typecheck
18+
- 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-

.storybook/preview.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import React from 'react';
22
import { Provider } from 'react-redux';
33
import { MemoryRouter } from 'react-router';
44

5-
import configureStore from '../client/store';
5+
import { setupStore } from '../client/store';
66
import '../client/i18n-test';
7-
import '../client/styles/storybook.css'
7+
import '../client/styles/storybook.css';
88
import { withThemeProvider, themeToolbarItem } from './decorator-theme';
99

1010
const initialState = window.__INITIAL_STATE__;
1111

12-
const store = configureStore(initialState);
12+
const store = setupStore(initialState);
1313

1414
export const decorators = [
1515
(Story) => (

.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:

0 commit comments

Comments
 (0)