Browse Source

Fix lint errors.

NaotoshiFujita 3 years ago
parent
commit
c404087a79

+ 2 - 0
dist/js/splide.js

@@ -1072,6 +1072,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
     function emit(event) {
       var _arguments = arguments;
       (handlers[event] || []).forEach(function (handler) {
+        // eslint-disable-next-line prefer-rest-params, prefer-spread
         handler.callback.apply(handler, slice(_arguments, 1));
       });
     }
@@ -1426,6 +1427,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
 
       if (!interval) {
         interval = RequestInterval(duration || 0, function () {
+          // eslint-disable-next-line prefer-rest-params
           func.apply(_this, _arguments2);
           interval = null;
         }, null, 1);

File diff suppressed because it is too large
+ 0 - 0
dist/js/splide.js.map


+ 1 - 0
dist/types/utils/error/index.d.ts

@@ -1,2 +1,3 @@
 export { assert } from './assert/assert';
+export { error } from './error/error';
 //# sourceMappingURL=../../../../src/js/utils/error/index.d.ts.map

+ 1 - 1
dist/types/utils/error/index.d.ts.map

@@ -1 +1 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC"}
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC"}

+ 1 - 0
src/js/constructors/EventBus/EventBus.ts

@@ -102,6 +102,7 @@ export function EventBus(): EventBusObject {
    */
   function emit( event: string ): void {
     ( handlers[ event ] || [] ).forEach( handler => {
+      // eslint-disable-next-line prefer-rest-params, prefer-spread
       handler.callback.apply( handler, slice( arguments, 1 ) );
     } );
   }

+ 1 - 0
src/js/constructors/Throttle/Throttle.ts

@@ -28,6 +28,7 @@ export function Throttle<F extends AnyFunction>(
   function throttled( this: ThisParameterType<F> ): void {
     if ( ! interval ) {
       interval = RequestInterval( duration || 0, () => {
+        // eslint-disable-next-line prefer-rest-params
         func.apply( this, arguments );
         interval = null;
       }, null, 1 );

+ 11 - 0
src/js/utils/error/error/error.ts

@@ -0,0 +1,11 @@
+import { PROJECT_CODE } from '../../../constants/project';
+
+
+/**
+ * Displays the error message on the console.
+ *
+ * @param message - A message.
+ */
+export function error( message: string ): void {
+  console.error( `[${ PROJECT_CODE }] ${ message }` );
+}

+ 1 - 0
src/js/utils/error/index.ts

@@ -1 +1,2 @@
 export { assert } from './assert/assert';
+export { error } from './error/error';

Some files were not shown because too many files changed in this diff