Skip to content

Commit efb48e9

Browse files
Merge branch 'develop' into feat/privatesketch
2 parents 5473069 + b03ec08 commit efb48e9

Some content is hidden

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

63 files changed

+4683
-5321
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: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,33 @@
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+
],
1932
"comma-dangle": 0, // not sure why airbnb turned this on. gross!
33+
"default-param-last": 0,
34+
"no-else-return" :0,
2035
"indent": 0,
2136
"no-console": 0,
2237
"no-alert": 0,
38+
"no-import-assign": 2,
39+
"no-promise-executor-return": 0, //temporarily off
40+
"no-restricted-exports": 1,
2341
"no-underscore-dangle": 0,
2442
"no-useless-catch": 2,
43+
"prefer-object-spread": 0,
2544
"max-len": [1, 120, 2, {"ignoreComments": true, "ignoreTemplateLiterals": true}],
45+
"max-classes-per-file": 0,
2646
"quote-props": [1, "as-needed"],
2747
"no-unused-vars": [1, {"vars": "local", "args": "none"}],
2848
"consistent-return": ["error", { "treatUndefinedAsUnspecified": true }],
@@ -36,7 +56,19 @@
3656
{ "ignorePureComponents": true
3757
}],
3858
"class-methods-use-this": 0,
39-
"react/jsx-no-bind": [2, {"allowBind": true, "allowArrowFunctions": true}],
59+
"react/button-has-type": 0,
60+
"react/destructuring-assignment":0,
61+
"react/function-component-definition": 0,
62+
"react/jsx-curly-newline":0,
63+
"react/jsx-fragments":0,
64+
"react/jsx-no-useless-fragment":0, // temporarily off
65+
"react/jsx-one-expression-per-line": 0,
66+
"react/jsx-props-no-spreading": 0,
67+
"react/jsx-wrap-multilines": 0,
68+
"react/jsx-no-bind": [2, {"allowBind": true, "allowArrowFunctions": true, "allowFunctions": true}],
69+
"react/no-deprecated": 0, //temporarily off
70+
"react/no-unused-class-component-methods": 1,
71+
"react/sort-comp": 0,
4072
"no-return-assign": [2, "except-parens"],
4173
"jsx-a11y/anchor-is-valid": [
4274
"error",
@@ -49,6 +81,8 @@
4981
]
5082
}
5183
],
84+
"jsx-a11y/control-has-associated-label": 0, //temporarily off
85+
"jsx-a11y/label-has-associated-control": 0, //temporarily off
5286
"jsx-a11y/label-has-for": [
5387
2,
5488
{
@@ -72,6 +106,11 @@
72106
],
73107
"settings": {
74108
"import/parser": "@babel/eslint-parser",
109+
"import/resolver": {
110+
"node": {
111+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
112+
}
113+
},
75114
"import/resolve": {
76115
"moduleDirectory": ["node_modules"]
77116
}
@@ -85,7 +124,12 @@
85124
},
86125
"overrides": [
87126
{
88-
"files": ["*.stories.jsx"],
127+
"files": ["*.ts", "*.tsx"],
128+
"parser": "@typescript-eslint/parser",
129+
"plugins": ["@typescript-eslint"]
130+
},
131+
{
132+
"files": ["*.stories.@(js|jsx|ts|tsx)"],
89133
"rules": {
90134
"import/no-extraneous-dependencies": "off"
91135
}

.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

.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: 1 addition & 1 deletion
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

client/common/useKeyDownHandlers.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,7 @@ export const DocumentKeyDown = ({ handlers }) => {
6666
DocumentKeyDown.propTypes = {
6767
handlers: PropTypes.objectOf(PropTypes.func)
6868
};
69+
70+
DocumentKeyDown.defaultProps = {
71+
handlers: {}
72+
};

client/components/RootPage.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ import styled from 'styled-components';
22
import { prop } from '../theme';
33

44
const RootPage = styled.div`
5-
min-height: 100%;
5+
min-height: 100vh;
6+
height: ${({ fixedHeight }) => fixedHeight || '100vh'};
67
display: flex;
7-
justify-content: start;
8+
justify-content: flex-start;
89
flex-direction: column;
910
color: ${prop('primaryTextColor')};
1011
background-color: ${prop('backgroundColor')};
11-
height: ${({ fixedHeight }) => fixedHeight || 'initial'};
1212
1313
@media (max-width: 770px) {
1414
height: 100%;
1515
overflow: hidden;
1616
}
17+
1718
@media print {
1819
@page {
1920
page-orientation: landscape;

0 commit comments

Comments
 (0)