Skip to content

Commit 2c73d0a

Browse files
authored
Merge pull request #4038 from ProjectMirador/vite-cleanup
Vite cleanup
2 parents fb534c7 + 99313f5 commit 2c73d0a

5 files changed

Lines changed: 49 additions & 12 deletions

File tree

.eslintrc

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,59 @@
11
{
2-
"env": {
3-
"jest/globals": true
2+
"parserOptions": {
3+
"ecmaVersion": 2022,
4+
"sourceType": "module",
5+
"ecmaFeatures": {
6+
"jsx": true
7+
}
48
},
5-
"extends": ["airbnb","react-app", "plugin:jest-dom/recommended", "plugin:testing-library/react"],
9+
"extends": [
10+
"airbnb",
11+
"plugin:react/recommended",
12+
"plugin:react-hooks/recommended",
13+
"plugin:testing-library/react"
14+
],
615
"globals": {
716
"page": true,
817
"document": true,
9-
"vi": true,
18+
"vi": true
1019
},
11-
"plugins": ["jest", "jest-dom", "react", "react-hooks", "testing-library"],
20+
"plugins": [
21+
"react",
22+
"react-hooks",
23+
"testing-library"
24+
],
1225
"rules": {
1326
"import/no-unresolved": [
1427
2, { "ignore": ["test-utils"] }
1528
],
1629
"import/prefer-default-export": "off",
1730
"no-console": "off",
31+
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }],
32+
"no-unused-vars": "off",
33+
"no-undef": "off",
34+
"no-restricted-syntax": ["warn", "WithStatement"],
35+
"no-restricted-globals": ["error"],
36+
"eqeqeq": ["warn", "smart"],
37+
"no-use-before-define": [
38+
"warn",
39+
{
40+
"functions": false,
41+
"classes": false,
42+
"variables": false
43+
},
44+
],
45+
"no-mixed-operators": [
46+
"warn",
47+
{
48+
"groups": [
49+
["&", "|", "^", "~", "<<", ">>", ">>>"],
50+
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
51+
["&&", "||"],
52+
["in", "instanceof"],
53+
],
54+
"allowSamePrecedence": false,
55+
},
56+
],
1857
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
1958
"require-jsdoc": ["error", {
2059
"require": {

package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@
9292
"chalk": "^5.3.0",
9393
"eslint": "^8.11.0",
9494
"eslint-config-airbnb": "^19.0.4",
95-
"eslint-config-react-app": "^7.0.0",
9695
"eslint-plugin-flowtype": "^8.0.3",
9796
"eslint-plugin-import": "^2.25.4",
98-
"eslint-plugin-jest": "^27.1.5",
9997
"eslint-plugin-jest-dom": "^5.1.0",
10098
"eslint-plugin-jsx-a11y": "^6.4.1",
10199
"eslint-plugin-react": "^7.29.4",
@@ -104,10 +102,6 @@
104102
"glob": "^10.3.0",
105103
"happy-dom": "^15.11.3",
106104
"http-server": "^14.1.0",
107-
"jest": "^29.3.1",
108-
"jest-environment-jsdom": "^29.4.3",
109-
"jest-fetch-mock": "^3.0.0",
110-
"jest-puppeteer": "^10.1.0",
111105
"jsdom": "^25.0.0",
112106
"puppeteer": "^23.0.0",
113107
"react": "^18.0.0",

src/components/PluginHook.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ export const PluginHook = forwardRef((props, ref) => {
1818
))
1919
) : null;
2020
});
21+
22+
PluginHook.displayName = 'PluginHook';

src/components/WindowCanvasNavigationControls.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,5 @@ WindowCanvasNavigationControls.defaultProps = {
8787
showZoomControls: false,
8888
visible: true,
8989
};
90+
91+
WindowCanvasNavigationControls.displayName = 'WindowCanvasNavigationControls';

src/lib/CanvasWorld.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default class CanvasWorld {
3838
let canvasHeight = 0;
3939
let canvasWidth = 0;
4040

41-
if (!isNaN(canvas.aspectRatio)) {
41+
if (!Number.isNaN(canvas.aspectRatio)) {
4242
if (dirY === 0) {
4343
// constant height
4444
canvasHeight = scale;

0 commit comments

Comments
 (0)