mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix eslint warnigs for core project (#7506)
This commit is contained in:
@@ -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');
|
||||
});
|
||||
|
@@ -74,6 +74,7 @@ export class FileUploadOptions {
|
||||
versioningEnabled?: boolean;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
export enum FileUploadStatus {
|
||||
Pending = 0,
|
||||
Complete = 1,
|
||||
|
@@ -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'},
|
||||
|
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
export enum SearchTextStateEnum {
|
||||
expanded = 'expanded',
|
||||
collapsed = 'collapsed'
|
||||
|
Reference in New Issue
Block a user