Skip to content

Commit 24b9a72

Browse files
Update all dependencies and fix react code warnings (#647)
* fix eslint errors with latest eslint version * update code to latest react api * update all dependencies, remove non used dependencies, properly separate devDependencies * fresh package-lock.json * revert to using the spread syntax * ignore new rules * React import not needed with new jsx runtime * inline the svg in the js bundle * define three as external to be able to import jsm file from three package * add three dependency * use GLTFExporter from three r145 * remove vendor/GLTFExporter.js * format files on pre-commit * update package-lock.json
1 parent 2cc3e21 commit 24b9a72

27 files changed

+17904
-23272
lines changed

.babelrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"plugins": ["transform-class-properties"],
3-
"presets": [["env", { exclude: ["transform-es2015-classes"] }], "react"]
2+
"presets": ["@babel/preset-env", ["@babel/preset-react", {"runtime": "automatic"}]]
43
}

.eslintrc

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,41 @@
11
{
2-
"extends": ["eslint:recommended", "plugin:react/recommended", "standard"],
2+
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:react/jsx-runtime", "standard"],
33
"rules": {
4+
"multiline-ternary": "off",
5+
"no-console": "off",
6+
"no-lone-blocks": "off",
7+
"no-var": "off",
8+
"object-shorthand": "off",
9+
"no-useless-return": "off",
10+
"prefer-const": "off",
411
"react/jsx-indent-props": [2, 2],
512
"semi": [2, "always"],
6-
"space-before-function-paren": "off",
7-
"no-console": "off"
13+
"space-before-function-paren": "off"
814
},
915
"env": {
10-
"es6": true,
1116
"browser": true,
17+
"es2021": true,
1218
"node": true
1319
},
1420
"globals": {
1521
"AFRAME": true,
1622
"ga": true,
1723
"THREE": true
1824
},
19-
"parser": "babel-eslint",
25+
"parser": "@babel/eslint-parser",
2026
"parserOptions": {
21-
"ecmaVersion": 7,
22-
"sourceType": "module",
2327
"ecmaFeatures": {
24-
"classes": true,
25-
"jsx": true,
26-
"experimentalObjectRestSpread": true
27-
}
28+
"jsx": true
29+
},
30+
"ecmaVersion": "latest",
31+
"sourceType": "module"
2832
},
2933
"plugins": [
3034
"react"
31-
]
35+
],
36+
"settings": {
37+
"react": {
38+
"version": "detect"
39+
}
40+
}
3241
}

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

0 commit comments

Comments
 (0)