fix eslint warnigs for core project (#7506)

This commit is contained in:
Denys Vuika
2022-02-17 14:35:33 +00:00
committed by GitHub
parent 5b7f255eec
commit bca5a783ab
246 changed files with 5127 additions and 5065 deletions

View File

@@ -28,6 +28,7 @@ export class FileUtils {
const files: FileInfo[] = [];
return new Promise((resolve) => {
const iterations = [];
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
(function traverse() {
reader.readEntries((entries) => {
if (!entries.length) {
@@ -36,10 +37,10 @@ export class FileUtils {
iterations.push(Promise.all(entries.map((entry) => {
if (entry.isFile) {
return new Promise<void>((resolveFile) => {
entry.file(function(file: File) {
entry.file((file: File) => {
files.push({
entry: entry,
file: file,
entry,
file,
relativeFolder: entry.fullPath.replace(/\/[^\/]*$/, '')
});
resolveFile();

View File

@@ -194,6 +194,7 @@ export class MomentDateAdapter extends DateAdapter<Moment> {
let isValidDateInstance = false;
if (date) {
// eslint-disable-next-line no-underscore-dangle
isValidDateInstance = date._isAMomentObject;
}

View File

@@ -19,6 +19,7 @@ export class ObjectUtils {
/**
* Gets a value from an object by composed key
* ObjectUtils.getValue({ item: { nodeType: 'cm:folder' }}, 'item.nodeType') ==> 'cm:folder'
*
* @param target
* @param key
*/