Best Python code snippet using toolium_python
Three.Legacy.js
Source:Three.Legacy.js
...3 */4Object.defineProperties( THREE.Box2.prototype, {5 empty: {6 value: function () {7 console.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );8 return this.isEmpty();9 }10 },11 isIntersectionBox: {12 value: function ( box ) {13 console.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' );14 return this.intersectsBox( box );15 }16 }17} );18Object.defineProperties( THREE.Box3.prototype, {19 empty: {20 value: function () {21 console.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' );22 return this.isEmpty();23 }24 },25 isIntersectionBox: {26 value: function ( box ) {27 console.warn( 'THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().' );28 return this.intersectsBox( box );29 }30 },31 isIntersectionSphere: {32 value: function ( sphere ) {33 console.warn( 'THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().' );34 return this.intersectsSphere( sphere );35 }36 }37} );38Object.defineProperties( THREE.Matrix3.prototype, {39 multiplyVector3: {40 value: function ( vector ) {41 console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );42 return vector.applyMatrix3( this );43 }44 },45 multiplyVector3Array: {46 value: function ( a ) {47 console.warn( 'THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );48 return this.applyToVector3Array( a );49 }50 }51} );52Object.defineProperties( THREE.Matrix4.prototype, {53 extractPosition: {54 value: function ( m ) {55 console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );56 return this.copyPosition( m );57 }58 },59 setRotationFromQuaternion: {60 value: function ( q ) {61 console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );62 return this.makeRotationFromQuaternion( q );63 }64 },65 multiplyVector3: {66 value: function ( vector ) {67 console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.' );68 return vector.applyProjection( this );69 }70 },71 multiplyVector4: {72 value: function ( vector ) {73 console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );74 return vector.applyMatrix4( this );75 }76 },77 multiplyVector3Array: {78 value: function ( a ) {79 console.warn( 'THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );80 return this.applyToVector3Array( a );81 }82 },83 rotateAxis: {84 value: function ( v ) {85 console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );86 v.transformDirection( this );87 }88 },89 crossVector: {90 value: function ( vector ) {91 console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );92 return vector.applyMatrix4( this );93 }94 },95 translate: {96 value: function ( v ) {97 console.error( 'THREE.Matrix4: .translate() has been removed.' );98 }99 },100 rotateX: {101 value: function ( angle ) {102 console.error( 'THREE.Matrix4: .rotateX() has been removed.' );103 }104 },105 rotateY: {106 value: function ( angle ) {107 console.error( 'THREE.Matrix4: .rotateY() has been removed.' );108 }109 },110 rotateZ: {111 value: function ( angle ) {112 console.error( 'THREE.Matrix4: .rotateZ() has been removed.' );113 }114 },115 rotateByAxis: {116 value: function ( axis, angle ) {117 console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );118 }119 }120} );121Object.defineProperties( THREE.Plane.prototype, {122 isIntersectionLine: {123 value: function ( line ) {124 console.warn( 'THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().' );125 return this.intersectsLine( line );126 }127 }128} );129Object.defineProperties( THREE.Quaternion.prototype, {130 multiplyVector3: {131 value: function ( vector ) {132 console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );133 return vector.applyQuaternion( this );134 }135 }136} );137Object.defineProperties( THREE.Ray.prototype, {138 isIntersectionBox: {139 value: function ( box ) {140 console.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' );141 return this.intersectsBox( box );142 }143 },144 isIntersectionPlane: {145 value: function ( plane ) {146 console.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' );147 return this.intersectsPlane( plane );148 }149 },150 isIntersectionSphere: {151 value: function ( sphere ) {152 console.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' );153 return this.intersectsSphere( sphere );154 }155 }156} );157Object.defineProperties( THREE.Vector3.prototype, {158 setEulerFromRotationMatrix: {159 value: function () {160 console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );161 }162 },163 setEulerFromQuaternion: {164 value: function () {165 console.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );166 }167 },168 getPositionFromMatrix: {169 value: function ( m ) {170 console.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );171 return this.setFromMatrixPosition( m );172 }173 },174 getScaleFromMatrix: {175 value: function ( m ) {176 console.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );177 return this.setFromMatrixScale( m );178 }179 },180 getColumnFromMatrix: {181 value: function ( index, matrix ) {182 console.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );183 return this.setFromMatrixColumn( index, matrix );184 }185 }186} );187//188THREE.Face4 = function ( a, b, c, d, normal, color, materialIndex ) {189 console.warn( 'THREE.Face4 has been removed. A THREE.Face3 will be created instead.' );190 return new THREE.Face3( a, b, c, normal, color, materialIndex );191};192THREE.Vertex = function ( x, y, z ) {193 console.warn( 'THREE.Vertex has been removed. Use THREE.Vector3 instead.' );194 return new THREE.Vector3( x, y, z );195};196//197Object.defineProperties( THREE.Object3D.prototype, {198 eulerOrder: {199 get: function () {200 console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );201 return this.rotation.order;202 },203 set: function ( value ) {204 console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );205 this.rotation.order = value;206 }207 },208 getChildByName: {209 value: function ( name ) {210 console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );211 return this.getObjectByName( name );212 }213 },214 renderDepth: {215 set: function ( value ) {216 console.warn( 'THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.' );217 }218 },219 translate: {220 value: function ( distance, axis ) {221 console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );222 return this.translateOnAxis( axis, distance );223 }224 },225 useQuaternion: {226 get: function () {227 console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );228 },229 set: function ( value ) {230 console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );231 }232 }233} );234//235Object.defineProperties( THREE, {236 PointCloud: {237 value: function ( geometry, material ) {238 console.warn( 'THREE.PointCloud has been renamed to THREE.Points.' );239 return new THREE.Points( geometry, material );240 }241 },242 ParticleSystem: {243 value: function ( geometry, material ) {244 console.warn( 'THREE.ParticleSystem has been renamed to THREE.Points.' );245 return new THREE.Points( geometry, material );246 }247 }248} );249//250Object.defineProperties( THREE.Light.prototype, {251 onlyShadow: {252 set: function ( value ) {253 console.warn( 'THREE.Light: .onlyShadow has been removed.' );254 }255 },256 shadowCameraFov: {257 set: function ( value ) {258 console.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' );259 this.shadow.camera.fov = value;260 }261 },262 shadowCameraLeft: {263 set: function ( value ) {264 console.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' );265 this.shadow.camera.left = value;266 }267 },268 shadowCameraRight: {269 set: function ( value ) {270 console.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' );271 this.shadow.camera.right = value;272 }273 },274 shadowCameraTop: {275 set: function ( value ) {276 console.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' );277 this.shadow.camera.top = value;278 }279 },280 shadowCameraBottom: {281 set: function ( value ) {282 console.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' );283 this.shadow.camera.bottom = value;284 }285 },286 shadowCameraNear: {287 set: function ( value ) {288 console.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' );289 this.shadow.camera.near = value;290 }291 },292 shadowCameraFar: {293 set: function ( value ) {294 console.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' );295 this.shadow.camera.far = value;296 }297 },298 shadowCameraVisible: {299 set: function ( value ) {300 console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.' );301 }302 },303 shadowBias: {304 set: function ( value ) {305 console.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' );306 this.shadow.bias = value;307 }308 },309 shadowDarkness: {310 set: function ( value ) {311 console.warn( 'THREE.Light: .shadowDarkness has been removed.' );312 }313 },314 shadowMapWidth: {315 set: function ( value ) {316 console.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' );317 this.shadow.mapSize.width = value;318 }319 },320 shadowMapHeight: {321 set: function ( value ) {322 console.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' );323 this.shadow.mapSize.height = value;324 }325 }326} );327//328Object.defineProperties( THREE.BufferAttribute.prototype, {329 length: {330 get: function () {331 console.warn( 'THREE.BufferAttribute: .length has been deprecated. Please use .count.' );332 return this.array.length;333 }334 }335} );336Object.defineProperties( THREE.BufferGeometry.prototype, {337 drawcalls: {338 get: function () {339 console.error( 'THREE.BufferGeometry: .drawcalls has been renamed to .groups.' );340 return this.groups;341 }342 },343 offsets: {344 get: function () {345 console.warn( 'THREE.BufferGeometry: .offsets has been renamed to .groups.' );346 return this.groups;347 }348 },349 addIndex: {350 value: function ( index ) {351 console.warn( 'THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().' );352 this.setIndex( index );353 }354 },355 addDrawCall: {356 value: function ( start, count, indexOffset ) {357 if ( indexOffset !== undefined ) {358 console.warn( 'THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.' );359 }360 console.warn( 'THREE.BufferGeometry: .addDrawCall() is now .addGroup().' );361 this.addGroup( start, count );362 }363 },364 clearDrawCalls: {365 value: function () {366 console.warn( 'THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().' );367 this.clearGroups();368 }369 },370 computeTangents: {371 value: function () {372 console.warn( 'THREE.BufferGeometry: .computeTangents() has been removed.' );373 }374 },375 computeOffsets: {376 value: function () {377 console.warn( 'THREE.BufferGeometry: .computeOffsets() has been removed.' );378 }379 }380} );381//382Object.defineProperties( THREE.Material.prototype, {383 wrapAround: {384 get: function () {385 console.warn( 'THREE.' + this.type + ': .wrapAround has been removed.' );386 },387 set: function ( value ) {388 console.warn( 'THREE.' + this.type + ': .wrapAround has been removed.' );389 }390 },391 wrapRGB: {392 get: function () {393 console.warn( 'THREE.' + this.type + ': .wrapRGB has been removed.' );394 return new THREE.Color();395 }396 }397} );398Object.defineProperties( THREE, {399 PointCloudMaterial: {400 value: function ( parameters ) {401 console.warn( 'THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.' );402 return new THREE.PointsMaterial( parameters );403 }404 },405 ParticleBasicMaterial: {406 value: function ( parameters ) {407 console.warn( 'THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.' );408 return new THREE.PointsMaterial( parameters );409 }410 },411 ParticleSystemMaterial:{412 value: function ( parameters ) {413 console.warn( 'THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.' );414 return new THREE.PointsMaterial( parameters );415 }416 }417} );418Object.defineProperties( THREE.MeshPhongMaterial.prototype, {419 metal: {420 get: function () {421 console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.' );422 return false;423 },424 set: function ( value ) {425 console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead' );426 }427 }428} );429Object.defineProperties( THREE.ShaderMaterial.prototype, {430 derivatives: {431 get: function () {432 console.warn( 'THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );433 return this.extensions.derivatives;434 },435 set: function ( value ) {436 console.warn( 'THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );437 this.extensions.derivatives = value;438 }439 }440} );441//442Object.defineProperties( THREE.WebGLRenderer.prototype, {443 supportsFloatTextures: {444 value: function () {445 console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );446 return this.extensions.get( 'OES_texture_float' );447 }448 },449 supportsHalfFloatTextures: {450 value: function () {451 console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' );452 return this.extensions.get( 'OES_texture_half_float' );453 }454 },455 supportsStandardDerivatives: {456 value: function () {457 console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' );458 return this.extensions.get( 'OES_standard_derivatives' );459 }460 },461 supportsCompressedTextureS3TC: {462 value: function () {463 console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' );464 return this.extensions.get( 'WEBGL_compressed_texture_s3tc' );465 }466 },467 supportsCompressedTexturePVRTC: {468 value: function () {469 console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' );470 return this.extensions.get( 'WEBGL_compressed_texture_pvrtc' );471 }472 },473 supportsBlendMinMax: {474 value: function () {475 console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' );476 return this.extensions.get( 'EXT_blend_minmax' );477 }478 },479 supportsVertexTextures: {480 value: function () {481 return this.capabilities.vertexTextures;482 }483 },484 supportsInstancedArrays: {485 value: function () {486 console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' );487 return this.extensions.get( 'ANGLE_instanced_arrays' );488 }489 },490 enableScissorTest: {491 value: function ( boolean ) {492 console.warn( 'THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().' );493 this.setScissorTest( boolean );494 }495 },496 initMaterial: {497 value: function () {498 console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );499 }500 },501 addPrePlugin: {502 value: function () {503 console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );504 }505 },506 addPostPlugin: {507 value: function () {508 console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );509 }510 },511 updateShadowMap: {512 value: function () {513 console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );514 }515 },516 shadowMapEnabled: {517 get: function () {518 return this.shadowMap.enabled;519 },520 set: function ( value ) {521 console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );522 this.shadowMap.enabled = value;523 }524 },525 shadowMapType: {526 get: function () {527 return this.shadowMap.type;528 },529 set: function ( value ) {530 console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );531 this.shadowMap.type = value;532 }533 },534 shadowMapCullFace: {535 get: function () {536 return this.shadowMap.cullFace;537 },538 set: function ( value ) {539 console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.' );540 this.shadowMap.cullFace = value;541 }542 }543} );544//545Object.defineProperties( THREE.WebGLRenderTarget.prototype, {546 wrapS: {547 get: function () {548 console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );549 return this.texture.wrapS;550 },551 set: function ( value ) {552 console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );553 this.texture.wrapS = value;554 }555 },556 wrapT: {557 get: function () {558 console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );559 return this.texture.wrapT;560 },561 set: function ( value ) {562 console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );563 this.texture.wrapT = value;564 }565 },566 magFilter: {567 get: function () {568 console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );569 return this.texture.magFilter;570 },571 set: function ( value ) {572 console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );573 this.texture.magFilter = value;574 }575 },576 minFilter: {577 get: function () {578 console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );579 return this.texture.minFilter;580 },581 set: function ( value ) {582 console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );583 this.texture.minFilter = value;584 }585 },586 anisotropy: {587 get: function () {588 console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );589 return this.texture.anisotropy;590 },591 set: function ( value ) {592 console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );593 this.texture.anisotropy = value;594 }595 },596 offset: {597 get: function () {598 console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );599 return this.texture.offset;600 },601 set: function ( value ) {602 console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );603 this.texture.offset = value;604 }605 },606 repeat: {607 get: function () {608 console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );609 return this.texture.repeat;610 },611 set: function ( value ) {612 console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );613 this.texture.repeat = value;614 }615 },616 format: {617 get: function () {618 console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );619 return this.texture.format;620 },621 set: function ( value ) {622 console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );623 this.texture.format = value;624 }625 },626 type: {627 get: function () {628 console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );629 return this.texture.type;630 },631 set: function ( value ) {632 console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );633 this.texture.type = value;634 }635 },636 generateMipmaps: {637 get: function () {638 console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );639 return this.texture.generateMipmaps;640 },641 set: function ( value ) {642 console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );643 this.texture.generateMipmaps = value;644 }645 }646} );647//648THREE.GeometryUtils = {649 merge: function ( geometry1, geometry2, materialIndexOffset ) {650 console.warn( 'THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.' );651 var matrix;652 if ( geometry2 instanceof THREE.Mesh ) {653 geometry2.matrixAutoUpdate && geometry2.updateMatrix();654 matrix = geometry2.matrix;655 geometry2 = geometry2.geometry;656 }657 geometry1.merge( geometry2, matrix, materialIndexOffset );658 },659 center: function ( geometry ) {660 console.warn( 'THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.' );661 return geometry.center();662 }663};664THREE.ImageUtils = {665 crossOrigin: undefined,666 loadTexture: function ( url, mapping, onLoad, onError ) {667 console.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' );668 var loader = new THREE.TextureLoader();669 loader.setCrossOrigin( this.crossOrigin );670 var texture = loader.load( url, onLoad, undefined, onError );671 if ( mapping ) texture.mapping = mapping;672 return texture;673 },674 loadTextureCube: function ( urls, mapping, onLoad, onError ) {675 console.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' );676 var loader = new THREE.CubeTextureLoader();677 loader.setCrossOrigin( this.crossOrigin );678 var texture = loader.load( urls, onLoad, undefined, onError );679 if ( mapping ) texture.mapping = mapping;680 return texture;681 },682 loadCompressedTexture: function () {683 console.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' );684 },685 loadCompressedTextureCube: function () {686 console.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' );687 }688};689//690THREE.Projector = function () {691 console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );692 this.projectVector = function ( vector, camera ) {693 console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );694 vector.project( camera );695 };696 this.unprojectVector = function ( vector, camera ) {697 console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );698 vector.unproject( camera );699 };700 this.pickingRay = function ( vector, camera ) {701 console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );702 };703};704//705THREE.CanvasRenderer = function () {706 console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );707 this.domElement = document.createElement( 'canvas' );708 this.clear = function () {};709 this.render = function () {};710 this.setClearColor = function () {};711 this.setSize = function () {};...
index.js
Source:index.js
1/**2 * Copyright (c) 2015-present, Facebook, Inc.3 *4 * This source code is licensed under the MIT license found in the5 * LICENSE file in the root directory of this source tree.6 */7'use strict';8// Inspired by https://github.com/airbnb/javascript but less opinionated.9// We use eslint-loader so even warnings are very visible.10// This is why we prefer to use "WARNING" level for potential errors,11// and we try not to use "ERROR" level at all.12// In the future, we might create a separate list of rules for production.13// It would probably be more strict.14// The ESLint browser environment defines all browser globals as valid,15// even though most people don't know some of them exist (e.g. `name` or `status`).16// This is dangerous as it hides accidentally undefined variables.17// We blacklist the globals that we deem potentially confusing.18// To use them, explicitly reference them, e.g. `window.name` or `window.status`.19const restrictedGlobals = require('confusing-browser-globals');20module.exports = {21 extends: [require.resolve('./base')],22 plugins: ['import', 'flowtype', 'jsx-a11y', 'react-hooks'],23 overrides: [24 {25 files: ['**/*.ts?(x)'],26 parser: '@typescript-eslint/parser',27 parserOptions: {28 ecmaVersion: 2018,29 sourceType: 'module',30 ecmaFeatures: {31 jsx: true,32 },33 // typescript-eslint specific options34 warnOnUnsupportedTypeScriptVersion: true,35 },36 plugins: ['@typescript-eslint'],37 // If adding a typescript-eslint version of an existing ESLint rule,38 // make sure to disable the ESLint rule here.39 rules: {40 // TypeScript's `noFallthroughCasesInSwitch` option is more robust (#6906)41 'default-case': 'off',42 // 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/291)43 'no-dupe-class-members': 'off',44 // 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/477)45 'no-undef': 'off',46 // Add TypeScript specific rules (and turn off ESLint equivalents)47 '@typescript-eslint/consistent-type-assertions': 'warn',48 'no-array-constructor': 'off',49 '@typescript-eslint/no-array-constructor': 'warn',50 'no-redeclare': 'off',51 '@typescript-eslint/no-redeclare': 'warn',52 'no-use-before-define': 'off',53 '@typescript-eslint/no-use-before-define': [54 'warn',55 {56 functions: false,57 classes: false,58 variables: false,59 typedefs: false,60 },61 ],62 'no-unused-expressions': 'off',63 '@typescript-eslint/no-unused-expressions': [64 'error',65 {66 allowShortCircuit: true,67 allowTernary: true,68 allowTaggedTemplates: true,69 },70 ],71 'no-unused-vars': 'off',72 '@typescript-eslint/no-unused-vars': [73 'warn',74 {75 args: 'none',76 ignoreRestSiblings: true,77 },78 ],79 'no-useless-constructor': 'off',80 '@typescript-eslint/no-useless-constructor': 'warn',81 },82 },83 ],84 // NOTE: When adding rules here, you need to make sure they are compatible with85 // `typescript-eslint`, as some rules such as `no-array-constructor` aren't compatible.86 rules: {87 // http://eslint.org/docs/rules/88 'array-callback-return': 'warn',89 'default-case': ['warn', { commentPattern: '^no default$' }],90 'dot-location': ['warn', 'property'],91 eqeqeq: ['warn', 'smart'],92 'new-parens': 'warn',93 'no-array-constructor': 'warn',94 'no-caller': 'warn',95 'no-cond-assign': ['warn', 'except-parens'],96 'no-const-assign': 'warn',97 'no-control-regex': 'warn',98 'no-delete-var': 'warn',99 'no-dupe-args': 'warn',100 'no-dupe-class-members': 'warn',101 'no-dupe-keys': 'warn',102 'no-duplicate-case': 'warn',103 'no-empty-character-class': 'warn',104 'no-empty-pattern': 'warn',105 'no-eval': 'warn',106 'no-ex-assign': 'warn',107 'no-extend-native': 'warn',108 'no-extra-bind': 'warn',109 'no-extra-label': 'warn',110 'no-fallthrough': 'warn',111 'no-func-assign': 'warn',112 'no-implied-eval': 'warn',113 'no-invalid-regexp': 'warn',114 'no-iterator': 'warn',115 'no-label-var': 'warn',116 'no-labels': ['warn', { allowLoop: true, allowSwitch: false }],117 'no-lone-blocks': 'warn',118 'no-loop-func': 'warn',119 'no-mixed-operators': [120 'warn',121 {122 groups: [123 ['&', '|', '^', '~', '<<', '>>', '>>>'],124 ['==', '!=', '===', '!==', '>', '>=', '<', '<='],125 ['&&', '||'],126 ['in', 'instanceof'],127 ],128 allowSamePrecedence: false,129 },130 ],131 'no-multi-str': 'warn',132 'no-native-reassign': 'warn',133 'no-negated-in-lhs': 'warn',134 'no-new-func': 'warn',135 'no-new-object': 'warn',136 'no-new-symbol': 'warn',137 'no-new-wrappers': 'warn',138 'no-obj-calls': 'warn',139 'no-octal': 'warn',140 'no-octal-escape': 'warn',141 'no-redeclare': 'warn',142 'no-regex-spaces': 'warn',143 'no-restricted-syntax': ['warn', 'WithStatement'],144 'no-script-url': 'warn',145 'no-self-assign': 'warn',146 'no-self-compare': 'warn',147 'no-sequences': 'warn',148 'no-shadow-restricted-names': 'warn',149 'no-sparse-arrays': 'warn',150 'no-template-curly-in-string': 'warn',151 'no-this-before-super': 'warn',152 'no-throw-literal': 'warn',153 'no-undef': 'error',154 'no-restricted-globals': ['error'].concat(restrictedGlobals),155 'no-unreachable': 'warn',156 'no-unused-expressions': [157 'error',158 {159 allowShortCircuit: true,160 allowTernary: true,161 allowTaggedTemplates: true,162 },163 ],164 'no-unused-labels': 'warn',165 'no-unused-vars': [166 'warn',167 {168 args: 'none',169 ignoreRestSiblings: true,170 },171 ],172 'no-use-before-define': [173 'warn',174 {175 functions: false,176 classes: false,177 variables: false,178 },179 ],180 'no-useless-computed-key': 'warn',181 'no-useless-concat': 'warn',182 'no-useless-constructor': 'warn',183 'no-useless-escape': 'warn',184 'no-useless-rename': [185 'warn',186 {187 ignoreDestructuring: false,188 ignoreImport: false,189 ignoreExport: false,190 },191 ],192 'no-with': 'warn',193 'no-whitespace-before-property': 'warn',194 'react-hooks/exhaustive-deps': 'warn',195 'require-yield': 'warn',196 'rest-spread-spacing': ['warn', 'never'],197 strict: ['warn', 'never'],198 'unicode-bom': ['warn', 'never'],199 'use-isnan': 'warn',200 'valid-typeof': 'warn',201 'no-restricted-properties': [202 'error',203 {204 object: 'require',205 property: 'ensure',206 message:207 'Please use import() instead. More info: https://facebook.github.io/create-react-app/docs/code-splitting',208 },209 {210 object: 'System',211 property: 'import',212 message:213 'Please use import() instead. More info: https://facebook.github.io/create-react-app/docs/code-splitting',214 },215 ],216 'getter-return': 'warn',217 // https://github.com/benmosher/eslint-plugin-import/tree/master/docs/rules218 'import/first': 'error',219 'import/no-amd': 'error',220 'import/no-anonymous-default-export': 'warn',221 'import/no-webpack-loader-syntax': 'error',222 // https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules223 'react/forbid-foreign-prop-types': ['warn', { allowInPropTypes: true }],224 'react/jsx-no-comment-textnodes': 'warn',225 'react/jsx-no-duplicate-props': 'warn',226 'react/jsx-no-target-blank': 'warn',227 'react/jsx-no-undef': 'error',228 'react/jsx-pascal-case': [229 'warn',230 {231 allowAllCaps: true,232 ignore: [],233 },234 ],235 'react/no-danger-with-children': 'warn',236 // Disabled because of undesirable warnings237 // See https://github.com/facebook/create-react-app/issues/5204 for238 // blockers until its re-enabled239 // 'react/no-deprecated': 'warn',240 'react/no-direct-mutation-state': 'warn',241 'react/no-is-mounted': 'warn',242 'react/no-typos': 'error',243 'react/require-render-return': 'error',244 'react/style-prop-object': 'warn',245 // https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules246 'jsx-a11y/alt-text': 'warn',247 'jsx-a11y/anchor-has-content': 'warn',248 'jsx-a11y/anchor-is-valid': [249 'warn',250 {251 aspects: ['noHref', 'invalidHref'],252 },253 ],254 'jsx-a11y/aria-activedescendant-has-tabindex': 'warn',255 'jsx-a11y/aria-props': 'warn',256 'jsx-a11y/aria-proptypes': 'warn',257 'jsx-a11y/aria-role': ['warn', { ignoreNonDOM: true }],258 'jsx-a11y/aria-unsupported-elements': 'warn',259 'jsx-a11y/heading-has-content': 'warn',260 'jsx-a11y/iframe-has-title': 'warn',261 'jsx-a11y/img-redundant-alt': 'warn',262 'jsx-a11y/no-access-key': 'warn',263 'jsx-a11y/no-distracting-elements': 'warn',264 'jsx-a11y/no-redundant-roles': 'warn',265 'jsx-a11y/role-has-required-aria-props': 'warn',266 'jsx-a11y/role-supports-aria-props': 'warn',267 'jsx-a11y/scope': 'warn',268 // https://github.com/facebook/react/tree/master/packages/eslint-plugin-react-hooks269 'react-hooks/rules-of-hooks': 'error',270 // https://github.com/gajus/eslint-plugin-flowtype271 'flowtype/define-flow-type': 'warn',272 'flowtype/require-valid-file-annotation': 'warn',273 'flowtype/use-flow-type': 'warn',274 },...
.eslintrc.js
Source:.eslintrc.js
1module.exports = {2 'env': {3 'browser': true,4 'es6': true,5 'node': true,6 'mocha': true7 },8 'extends': 'eslint:recommended',9 'plugins': ['import'],10 "parser": "babel-eslint",11 'parserOptions': {12 'sourceType': 'module'13 },14 'globals': {15 'jpeg': true,16 'JpegImage': true,17 'JpxImage': true,18 'CharLS': true,19 'OpenJPEG': true20 },21 'rules': {22 'accessor-pairs': 'warn',23 'array-bracket-spacing': 'warn',24 'array-callback-return': 'warn',25 'arrow-body-style': 'warn',26 'arrow-parens': 'warn',27 'arrow-spacing': 'warn',28 //'block-scoped-var': 'warn',29 'block-spacing': 'warn',30 'brace-style': 'warn',31 'callback-return': 'warn',32 //'camelcase': 'warn',33 //'capitalized-comments': 'warn',34 'class-methods-use-this': 'warn',35 'comma-dangle': 'warn',36 'comma-spacing': [37 'warn',38 {39 'after': true,40 'before': false41 }42 ],43 'comma-style': 'warn',44 'complexity': 'warn',45 'computed-property-spacing': 'warn',46 //'consistent-return': 'warn',47 'consistent-this': 'warn',48 'curly': 'warn',49 //'default-case': 'warn',50 'dot-location': 'warn',51 'dot-notation': 'warn',52 'eol-last': 'warn',53 'eqeqeq': 'warn',54 'func-call-spacing': 'warn',55 'func-name-matching': 'warn',56 'func-names': [57 'warn',58 'never'59 ],60 //'func-style': 'warn',61 'generator-star-spacing': 'warn',62 'global-require': 'warn',63 //'guard-for-in': 'warn',64 'handle-callback-err': 'warn',65 'id-blacklist': 'warn',66 'id-length': 'off',67 'id-match': 'warn',68 'indent': ['warn', 2],69 //'init-declarations': 'warn',70 'import/default': 'warn',71 'import/export': 'warn',72 'import/extensions': ['warn', { "js": "always" }],73 'import/first': 'warn',74 'import/named': 'warn',75 'import/namespace': 'warn',76 'import/newline-after-import': 'warn',77 'import/no-unresolved': 'warn',78 'import/no-webpack-loader-syntax': 'warn',79 'jsx-quotes': 'warn',80 'key-spacing': 'warn',81 'keyword-spacing': [82 'warn',83 {84 'after': true,85 'before': true86 }87 ],88 //'line-comment-position': 'warn',89 'linebreak-style': [90 'warn',91 'unix'92 ],93 'lines-around-comment': 'warn',94 'lines-around-directive': 'warn',95 'max-depth': 'warn',96 /*'max-len': ['warn', {97 'code': 100,98 'tabWidth': 2,99 'comments': 80,100 'ignoreComments': false,101 'ignoreTrailingComments': true,102 'ignoreUrls': true,103 'ignoreTemplateLiterals': false,104 'ignoreRegExpLiterals': true105 }],*/106 //'max-lines': 'warn',107 'max-nested-callbacks': 'warn',108 //'max-params': 'warn',109 //'max-statements': 'warn',110 'max-statements-per-line': 'warn',111 'multiline-ternary': 'off',112 //'new-cap': 'warn',113 'new-parens': 'warn',114 'newline-after-var': 'warn',115 'newline-before-return': 'warn',116 //'newline-per-chained-call': 'warn',117 'no-alert': 'warn',118 'no-array-constructor': 'warn',119 'no-bitwise': 'warn',120 'no-caller': 'warn',121 'no-catch-shadow': 'warn',122 'no-confusing-arrow': 'warn',123 'no-console': 'off',124 //'no-continue': 'warn',125 'no-div-regex': 'warn',126 'no-duplicate-imports': 'warn',127 'no-else-return': 'warn',128 'no-empty-function': 'off',129 'no-eq-null': 'warn',130 'no-eval': 'warn',131 'no-extend-native': 'warn',132 'no-extra-bind': 'warn',133 'no-extra-label': 'warn',134 'no-extra-parens': 'off',135 'no-floating-decimal': 'warn',136 'no-implicit-coercion': 'warn',137 'no-implicit-globals': 'warn',138 'no-implied-eval': 'warn',139 //'no-inline-comments': 'warn',140 'no-invalid-this': 'off',141 'no-iterator': 'warn',142 'no-label-var': 'warn',143 'no-labels': 'warn',144 'no-lone-blocks': 'warn',145 'no-lonely-if': 'warn',146 'no-loop-func': 'warn',147 'no-magic-numbers': 'off',148 //'no-mixed-operators': 'warn',149 'no-mixed-requires': 'warn',150 'no-multi-spaces': 'warn',151 'no-multi-str': 'warn',152 'no-multiple-empty-lines': 'warn',153 'no-native-reassign': 'warn',154 'no-negated-condition': 'warn',155 'no-negated-in-lhs': 'warn',156 'no-nested-ternary': 'warn',157 //'no-new': 'warn',158 'no-new-func': 'warn',159 'no-new-object': 'warn',160 'no-new-require': 'warn',161 'no-new-wrappers': 'warn',162 'no-octal-escape': 'warn',163 //'no-param-reassign': 'warn',164 'no-path-concat': 'warn',165 //'no-plusplus': 'warn',166 'no-process-env': 'warn',167 'no-process-exit': 'warn',168 'no-proto': 'warn',169 //'no-prototype-builtins': 'warn',170 'no-restricted-globals': 'warn',171 'no-restricted-imports': 'warn',172 'no-restricted-modules': 'warn',173 'no-restricted-properties': 'warn',174 'no-restricted-syntax': 'warn',175 'no-return-assign': 'warn',176 'no-return-await': 'warn',177 'no-script-url': 'warn',178 'no-self-compare': 'warn',179 'no-sequences': 'warn',180 //'no-shadow': 'warn',181 'no-shadow-restricted-names': 'warn',182 'no-spaced-func': 'warn',183 'no-sync': 'warn',184 'no-tabs': 'warn',185 'no-template-curly-in-string': 'warn',186 'no-ternary': 'off',187 'no-throw-literal': 'warn',188 'no-trailing-spaces': 'warn',189 'no-undef': 'error',190 'no-undef-init': 'warn',191 'no-undefined': 'off',192 'no-unused-vars': 'warn',193 //'no-underscore-dangle': 'warn',194 'no-unmodified-loop-condition': 'warn',195 'no-unneeded-ternary': 'warn',196 'no-unused-expressions': 'warn',197 //'no-use-before-define': 'warn',198 'no-useless-call': 'warn',199 'no-useless-computed-key': 'warn',200 'no-useless-concat': 'warn',201 'no-useless-constructor': 'warn',202 'no-useless-escape': 'warn',203 'no-useless-rename': 'warn',204 'no-useless-return': 'off',205 'no-var': 'warn',206 'no-void': 'warn',207 //'no-warning-comments': 'warn',208 'no-whitespace-before-property': 'warn',209 'no-with': 'warn',210 'object-curly-spacing': [211 'warn',212 'always'213 ],214 'object-property-newline': 'warn',215 'object-shorthand': 'warn',216 'one-var': 'off',217 'one-var-declaration-per-line': 'warn',218 'operator-assignment': 'warn',219 'operator-linebreak': 'warn',220 'padded-blocks': 'off',221 'prefer-arrow-callback': 'off',222 'prefer-const': 'warn',223 'prefer-numeric-literals': 'warn',224 //'prefer-reflect': 'warn',225 //'prefer-rest-params': 'warn',226 'prefer-spread': 'warn',227 'prefer-template': 'warn',228 'quote-props': ['warn', 'as-needed'],229 'quotes': [230 'warn',231 'single'232 ],233 'radix': 'warn',234 'require-await': 'warn',235 //'require-jsdoc': 'warn',236 'rest-spread-spacing': 'warn',237 'semi': 'warn',238 'semi-spacing': 'warn',239 'sort-imports': 'off',240 'sort-keys': 'off',241 'sort-vars': 'off',242 'space-before-blocks': 'warn',243 'space-before-function-paren': 'warn',244 'space-in-parens': [245 'warn',246 'never'247 ],248 'space-infix-ops': 'warn',249 'space-unary-ops': 'warn',250 'spaced-comment': 'warn',251 'strict': 'warn',252 'symbol-description': 'warn',253 'template-curly-spacing': 'warn',254 'unicode-bom': [255 'warn',256 'never'257 ],258 //'valid-jsdoc': 'warn',259 'vars-on-top': 'warn',260 'wrap-iife': ['warn', 'inside'],261 'wrap-regex': 'warn',262 'yield-star-spacing': 'warn',263 'yoda': 'warn'264 }...
eslint.js
Source:eslint.js
1/**2 * Copyright (c) 2015-present, Facebook, Inc.3 * All rights reserved.4 *5 * This source code is licensed under the BSD-style license found in the6 * LICENSE file in the root directory of this source tree. An additional grant7 * of patent rights can be found in the PATENTS file in the same directory.8 */9// Inspired by https://github.com/airbnb/javascript but less opinionated.10// We use eslint-loader so even warnings are very visibile.11// This is why we only use "WARNING" level for potential errors,12// and we don't use "ERROR" level at all.13// In the future, we might create a separate list of rules for production.14// It would probably be more strict.15module.exports = {16 root: true,17 parser: 'babel-eslint',18 // import plugin is termporarily disabled, scroll below to see why19 plugins: [/*'import', */'flowtype', 'jsx-a11y', 'react'],20 env: {21 browser: true,22 commonjs: true,23 es6: true,24 node: true25 },26 parserOptions: {27 ecmaVersion: 6,28 sourceType: 'module',29 ecmaFeatures: {30 jsx: true,31 generators: true,32 experimentalObjectRestSpread: true33 }34 },35 settings: {36 'import/ignore': [37 'node_modules',38 '\\.(json|css|jpg|png|gif|eot|svg|ttf|woff|woff2|mp4|webm)$',39 ],40 'import/extensions': ['.js'],41 'import/resolver': {42 node: {43 extensions: ['.js', '.json']44 }45 }46 },47 rules: {48 // http://eslint.org/docs/rules/49 'array-callback-return': 'warn',50 'default-case': ['warn', { commentPattern: '^no default$' }],51 'dot-location': ['warn', 'property'],52 eqeqeq: ['warn', 'allow-null'],53 'guard-for-in': 'warn',54 'new-cap': ['warn', { newIsCap: true }],55 'new-parens': 'warn',56 'no-array-constructor': 'warn',57 'no-caller': 'warn',58 'no-cond-assign': ['warn', 'always'],59 'no-const-assign': 'warn',60 'no-control-regex': 'warn',61 'no-delete-var': 'warn',62 'no-dupe-args': 'warn',63 'no-dupe-class-members': 'warn',64 'no-dupe-keys': 'warn',65 'no-duplicate-case': 'warn',66 'no-empty-character-class': 'warn',67 'no-empty-pattern': 'warn',68 'no-eval': 'warn',69 'no-ex-assign': 'warn',70 'no-extend-native': 'warn',71 'no-extra-bind': 'warn',72 'no-extra-label': 'warn',73 'no-fallthrough': 'warn',74 'no-func-assign': 'warn',75 'no-implied-eval': 'warn',76 'no-invalid-regexp': 'warn',77 'no-iterator': 'warn',78 'no-label-var': 'warn',79 'no-labels': ['warn', { allowLoop: false, allowSwitch: false }],80 'no-lone-blocks': 'warn',81 'no-loop-func': 'warn',82 'no-mixed-operators': ['warn', {83 groups: [84 ['&', '|', '^', '~', '<<', '>>', '>>>'],85 ['==', '!=', '===', '!==', '>', '>=', '<', '<='],86 ['&&', '||'],87 ['in', 'instanceof']88 ],89 allowSamePrecedence: false90 }],91 'no-multi-str': 'warn',92 'no-native-reassign': 'warn',93 'no-negated-in-lhs': 'warn',94 'no-new-func': 'warn',95 'no-new-object': 'warn',96 'no-new-symbol': 'warn',97 'no-new-wrappers': 'warn',98 'no-obj-calls': 'warn',99 'no-octal': 'warn',100 'no-octal-escape': 'warn',101 'no-redeclare': 'warn',102 'no-regex-spaces': 'warn',103 'no-restricted-syntax': [104 'warn',105 'LabeledStatement',106 'WithStatement',107 ],108 'no-return-assign': 'warn',109 'no-script-url': 'warn',110 'no-self-assign': 'warn',111 'no-self-compare': 'warn',112 'no-sequences': 'warn',113 'no-shadow-restricted-names': 'warn',114 'no-sparse-arrays': 'warn',115 'no-this-before-super': 'warn',116 'no-throw-literal': 'warn',117 'no-undef': 'warn',118 'no-unexpected-multiline': 'warn',119 'no-unreachable': 'warn',120 'no-unused-expressions': 'warn',121 'no-unused-labels': 'warn',122 'no-unused-vars': ['warn', { vars: 'local', args: 'none' }],123 'no-use-before-define': ['warn', 'nofunc'],124 'no-useless-computed-key': 'warn',125 'no-useless-concat': 'warn',126 'no-useless-constructor': 'warn',127 'no-useless-escape': 'warn',128 'no-useless-rename': ['warn', {129 ignoreDestructuring: false,130 ignoreImport: false,131 ignoreExport: false,132 }],133 'no-with': 'warn',134 'no-whitespace-before-property': 'warn',135 'operator-assignment': ['warn', 'always'],136 radix: 'warn',137 'require-yield': 'warn',138 'rest-spread-spacing': ['warn', 'never'],139 strict: ['warn', 'never'],140 'unicode-bom': ['warn', 'never'],141 'use-isnan': 'warn',142 'valid-typeof': 'warn',143 // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/144 // TODO: import rules are temporarily disabled because they don't play well145 // with how eslint-loader only checks the file you change. So if module A146 // imports module B, and B is missing a default export, the linter will147 // record this as an issue in module A. Now if you fix module B, the linter148 // will not be aware that it needs to re-lint A as well, so the error149 // will stay until the next restart, which is really confusing.150 // This is probably fixable with a patch to eslint-loader.151 // When file A is saved, we want to invalidate all files that import it152 // *and* that currently have lint errors. This should fix the problem.153 // 'import/default': 'warn',154 // 'import/export': 'warn',155 // 'import/named': 'warn',156 // 'import/namespace': 'warn',157 // 'import/no-amd': 'warn',158 // 'import/no-duplicates': 'warn',159 // 'import/no-extraneous-dependencies': 'warn',160 // 'import/no-named-as-default': 'warn',161 // 'import/no-named-as-default-member': 'warn',162 // 'import/no-unresolved': ['warn', { commonjs: true }],163 // https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules164 'react/jsx-equals-spacing': ['warn', 'never'],165 'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],166 'react/jsx-no-undef': 'warn',167 'react/jsx-pascal-case': ['warn', {168 allowAllCaps: true,169 ignore: [],170 }],171 'react/jsx-uses-react': 'warn',172 'react/jsx-uses-vars': 'warn',173 'react/no-deprecated': 'warn',174 'react/no-direct-mutation-state': 'warn',175 'react/no-is-mounted': 'warn',176 'react/react-in-jsx-scope': 'warn',177 'react/require-render-return': 'warn',178 // https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules179 'jsx-a11y/aria-role': 'warn',180 'jsx-a11y/img-has-alt': 'warn',181 'jsx-a11y/img-redundant-alt': 'warn',182 'jsx-a11y/no-access-key': 'warn',183 // https://github.com/gajus/eslint-plugin-flowtype184 'flowtype/define-flow-type': 'warn',185 'flowtype/require-valid-file-annotation': 'warn',186 'flowtype/use-flow-type': 'warn'187 }...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!