ソースを参照

Reformat code.

Naotoshi Fujita 3 年 前
コミット
2b0b7f489e

+ 6 - 6
scripts/serve.js

@@ -5,8 +5,8 @@ const server = http.createServer();
 
 const mime = {
   '.html': 'text/html',
-	'.css' : 'text/css',
-	'.jpg' : 'image/jpeg',
+  '.css' : 'text/css',
+  '.jpg' : 'image/jpeg',
   '.js'  : 'application/javascript',
 };
 
@@ -17,15 +17,15 @@ server.on( 'request', async ( request, response ) => {
   if ( url === '/' ) {
     fullPath = path.resolve( './src/js/test/html/index.html' );
   } else if ( url.startsWith( '/' ) ) {
-	  fullPath = path.resolve( `.${ url }` );
+    fullPath = path.resolve( `.${ url }` );
   } else {
     fullPath = url;
   }
 
-  const type   = mime[ path.extname( fullPath ) ] || 'text/plain';
-	const buffer = await fs.readFile( fullPath ).catch( e => console.warn( e ) );
+  const type = mime[ path.extname( fullPath ) ] || 'text/plain';
+  const buffer = await fs.readFile( fullPath ).catch( e => console.warn( e ) );
 
-	response.writeHead( 200, { 'Content-Type': type } );
+  response.writeHead( 200, { 'Content-Type': type } );
   response.end( buffer );
 } );
 

+ 1 - 1
src/js/components/Media/Media.ts

@@ -4,7 +4,7 @@ import { EventBinder } from '../../constructors';
 import { Splide } from '../../core/Splide/Splide';
 import { BaseComponent, Components, Options } from '../../types';
 import { merge, omit, ownKeys } from '../../utils';
-import { EVENT_UPDATED } from "../../constants/events";
+import { EVENT_UPDATED } from '../../constants/events';
 
 
 /**

+ 1 - 1
src/js/components/Slides/Slides.ts

@@ -27,7 +27,7 @@ import { Slide, SlideComponent } from './Slide';
  *
  * @since 3.0.0
  */
-export interface  SlidesComponent extends BaseComponent {
+export interface SlidesComponent extends BaseComponent {
   update(): void;
   register( slide: HTMLElement, index: number, slideIndex: number ): void;
   get( excludeClones?: boolean ): SlideComponent[];

+ 1 - 1
src/js/core/Splide/Splide.ts

@@ -10,7 +10,7 @@ import { EventInterface, EventInterfaceObject, State, StateObject } from '../../
 import { Fade, Slide } from '../../transitions';
 import { AnyFunction, ComponentConstructor, Components, EventMap, Options, SyncTarget } from '../../types';
 import { addClass, assert, assign, empty, forOwn, getAttribute, isString, merge, query, slice } from '../../utils';
-import { ARIA_LABEL, ARIA_LABELLEDBY } from "../../constants/attributes";
+import { ARIA_LABEL, ARIA_LABELLEDBY } from '../../constants/attributes';
 
 
 /**