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

@@ -22,25 +22,25 @@ describe('FileModel', () => {
describe('extension', () => {
it('should return the extension if file has it', () => {
const file = new FileModel(<File> { name: 'tyrion-lannister.doc' });
const file = new FileModel({ name: 'tyrion-lannister.doc' } as File);
expect(file.extension).toBe('doc');
});
it('should return the empty string if file has NOT got it', () => {
const file = new FileModel(<File> { name: 'daenerys-targaryen' });
const file = new FileModel({ name: 'daenerys-targaryen' } as File);
expect(file.extension).toBe('');
});
it('should return the empty string if file is starting with . and doesn\'t have extension', () => {
const file = new FileModel(<File> { name: '.white-walkers' });
const file = new FileModel({ name: '.white-walkers' } as File);
expect(file.extension).toBe('');
});
it('should return the last extension string if file contains many dot', () => {
const file = new FileModel(<File> { name: 'you.know.nothing.jon.snow.exe' });
const file = new FileModel({ name: 'you.know.nothing.jon.snow.exe' } as File);
expect(file.extension).toBe('exe');
});

View File

@@ -74,6 +74,7 @@ export class FileUploadOptions {
versioningEnabled?: boolean;
}
// eslint-disable-next-line no-shadow
export enum FileUploadStatus {
Pending = 0,
Complete = 1,

View File

@@ -24,7 +24,7 @@ export class LogLevelsEnum extends Number {
static SILENT: number = 0;
}
export let logLevels: any[] = [
export const logLevels: any[] = [
{level: LogLevelsEnum.TRACE, name: 'TRACE'},
{level: LogLevelsEnum.DEBUG, name: 'DEBUG'},
{level: LogLevelsEnum.INFO, name: 'INFO'},

View File

@@ -15,6 +15,7 @@
* limitations under the License.
*/
// eslint-disable-next-line no-shadow
export enum SearchTextStateEnum {
expanded = 'expanded',
collapsed = 'collapsed'