Skip to content

Commit d76a1ef

Browse files
authored
Editor: ESLint: migrate to flat config, note missing eqeqeq rule (#32754)
1 parent 3fbfa2c commit d76a1ef

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

editor/.eslintrc.json

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

editor/js/Menubar.File.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
2+
import { FileLoader } from 'three';
23

34
function MenubarFile( editor ) {
45

@@ -69,7 +70,7 @@ function MenubarFile( editor ) {
6970
{ title: 'menubar/file/new/Shaders', file: 'shaders.app.json' }
7071
];
7172

72-
const loader = new THREE.FileLoader();
73+
const loader = new FileLoader();
7374

7475
for ( let i = 0; i < examples.length; i ++ ) {
7576

editor/js/Menubar.Render.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,10 @@ class RenderVideoDialog {
496496
} );
497497

498498
const qualityToBitrate = {
499-
'low': 2_000_000,
500-
'medium': 5_000_000,
501-
'high': 10_000_000,
502-
'ultra': 20_000_000
499+
'low': 2e6,
500+
'medium': 5e6,
501+
'high': 10e6,
502+
'ultra': 20e6
503503
};
504504

505505
videoEncoder.configure( {

eslint.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export default [
9999
'no-irregular-whitespace': 'error',
100100
'no-duplicate-imports': 'error',
101101
'prefer-spread': 'error',
102+
// 'eqeqeq': 'error',
102103

103104
'no-useless-escape': 'off',
104105
'no-case-declarations': 'off',
@@ -119,5 +120,15 @@ export default [
119120
'jsdoc/require-returns-description': 'off',
120121
'jsdoc/require-param-type': 'error'
121122
}
123+
},
124+
125+
// editor rules
126+
{
127+
name: 'editor rules',
128+
files: [ 'editor/**/*.js' ],
129+
languageOptions: {
130+
ecmaVersion: 2020,
131+
sourceType: 'module'
132+
}
122133
}
123134
];

0 commit comments

Comments
 (0)