Просмотр исходного кода

Refine eslint config: limited exclusion and lint fixes (#32917)

ycw 3 недель назад
Родитель
Сommit
314a12b55a
2 измененных файлов с 10 добавлено и 3 удалено
  1. 2 2
      editor/js/libs/app.js
  2. 8 1
      eslint.config.js

+ 2 - 2
editor/js/libs/app.js

@@ -80,7 +80,7 @@ const APP = {
 
 			const scriptWrapResult = JSON.stringify( scriptWrapResultObj ).replace( /\"/g, '' );
 
-			for ( let uuid in json.scripts ) {
+			for ( const uuid in json.scripts ) {
 
 				const object = scene.getObjectByProperty( 'uuid', uuid, true );
 
@@ -99,7 +99,7 @@ const APP = {
 
 					const functions = ( new Function( scriptWrapParams, script.source + '\nreturn ' + scriptWrapResult + ';' ).bind( object ) )( this, renderer, scene, camera );
 
-					for ( let name in functions ) {
+					for ( const name in functions ) {
 
 						if ( functions[ name ] === undefined ) continue;
 

+ 8 - 1
eslint.config.js

@@ -12,7 +12,14 @@ export default [
 		ignores: [
 			'**/node_modules/**',
 			'**/build/**',
-			'**/libs/**',
+			'examples/jsm/libs/**',
+			'editor/js/libs/acorn/**',
+			'editor/js/libs/codemirror/**',
+			'editor/js/libs/tern-threejs/**',
+			'editor/js/libs/ternjs/**',
+			'editor/js/libs/esprima.js',
+			'editor/js/libs/jsonlint.js',
+			'editor/js/libs/signals.min.js',
 			'**/ifc/**',
 			'**/prettify.js',
 			'**/prettify/**',

粤ICP备19079148号