Skip to content

Commit b885bcc

Browse files
authored
Merge pull request #21237 from mrdoob/revert-21236-eslint-class-properties-fix
Revert "Eslint: add support for class properties"
2 parents 39104f3 + f9ac7cc commit b885bcc

File tree

4 files changed

+36
-66
lines changed

4 files changed

+36
-66
lines changed

package-lock.json

Lines changed: 1 addition & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@
2626
"test": "test"
2727
},
2828
"eslintConfig": {
29-
"parser": "@babel/eslint-parser",
30-
"parserOptions": {
31-
"babelOptions": {
32-
"configFile": "./utils/build/babel.config.json"
33-
}
34-
},
3529
"root": true,
3630
"extends": "mdcs",
3731
"plugins": [
@@ -89,7 +83,6 @@
8983
"homepage": "https://threejs.org/",
9084
"devDependencies": {
9185
"@babel/core": "^7.12.10",
92-
"@babel/eslint-parser": "^7.12.13",
9386
"@babel/plugin-proposal-class-properties": "^7.12.1",
9487
"@babel/preset-env": "^7.12.11",
9588
"@rollup/plugin-babel": "^5.2.2",
@@ -114,4 +107,4 @@
114107
],
115108
"directories": {}
116109
}
117-
}
110+
}

utils/build/babel.config.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

utils/build/rollup.config.js

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
import babel from '@rollup/plugin-babel';
22
import { nodeResolve } from '@rollup/plugin-node-resolve';
33
import { terser } from 'rollup-plugin-terser';
4-
import babelrc from './babel.config.json';
4+
5+
if ( String.prototype.replaceAll === undefined ) {
6+
7+
String.prototype.replaceAll = function ( find, replace ) {
8+
9+
return this.split( find ).join( replace );
10+
11+
};
12+
13+
}
514

615
function glconstants() {
716

@@ -285,6 +294,30 @@ function polyfills() {
285294

286295
}
287296

297+
const babelrc = {
298+
presets: [
299+
[
300+
'@babel/preset-env',
301+
{
302+
modules: false,
303+
// the supported browsers of the three.js browser bundle
304+
// https://browsersl.ist/?q=%3E0.3%25%2C+not+dead
305+
targets: '>0.3%, not dead',
306+
loose: true,
307+
bugfixes: true,
308+
},
309+
],
310+
],
311+
plugins: [
312+
[
313+
'@babel/plugin-proposal-class-properties',
314+
{
315+
loose: true
316+
}
317+
]
318+
]
319+
};
320+
288321
export default [
289322
{
290323
input: 'src/Three.js',

0 commit comments

Comments
 (0)