Fir eslint errors

This commit is contained in:
Paulo Gustavo Veiga 2021-12-23 11:55:07 -08:00
parent 7bae385924
commit 77d88986b7
3 changed files with 11 additions and 10 deletions

View File

@ -19,13 +19,12 @@
"no-underscore-dangle": "off",
"no-plusplus": "off",
"no-param-reassign": "off",
"max-len": [1,250],
"max-len": [1,300],
"class-methods-use-this": "off",
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["!cypress/**/*.js"]}],
"func-names": ["error", "as-needed"],
"no-console" : "off",
"no-unused-vars": ["error", { "args": "none" }],
"camelcase": ["error", {"allow": ["XML"]}],
"new-cap": ["error", { "properties": false }]
"camelcase": ["error", {"allow": ["XML"]}]
},
"settings": {
"import/resolver": {

View File

@ -58,6 +58,7 @@ XMLSerializerFactory.getSerializer = function getSerializer(version = ModelCodeN
for (let i = 0; i < codeNames.length; i++) {
if (!found) {
found = codeNames[i].codeName === version;
// eslint-disable-next-line new-cap
if (found) serializer = new (codeNames[i].serializer)();
} else {
const { migrator: Migrator } = codeNames[i];

View File

@ -2,6 +2,7 @@ import { $notify } from '@wisemapping/core-js';
import { buildDesigner, buildDefaultOptions } from './components/DesignerBuilder';
import RESTPersistenceManager from './components/RestPersistenceManager';
import PersistenceManager from './components/PersistenceManager';
import LocalStorageManager from './components/LocalStorageManager';
global.memoryPersistence = false;
global.readOnlyMode = false;
@ -13,10 +14,9 @@ global.lockSession = 111111;
global.lockTimestamp = 11111;
// Configure designer options ...
const options = buildDefaultOptions();
let persistenceManager;
if (!global.memoryPersistence && !global.readOnlyMode) {
options.persistenceManager = new RESTPersistenceManager(
persistenceManager = new RESTPersistenceManager(
{
documentUrl: 'c/restful/maps/{id}/document',
revertUrl: 'c/restful/maps/{id}/history/latest',
@ -26,11 +26,12 @@ if (!global.memoryPersistence && !global.readOnlyMode) {
},
);
} else {
// options.persistenceManager = new LocalStorageManager("c/restful/maps/{id}${hid != null ? '/' : ''}${hid != null ? hid : ''}/document/xml${principal != null ? '' : '-pub'}", true);
// persistenceManager = new LocalStorageManager('c/restful/maps/{id}${hid != null ? '/' : ''}${hid != null ? hid : ''}/document/xml${principal != null ? '' : '-pub'}", true);
// @todo: review ...
persistenceManager = new LocalStorageManager('c/restful/maps/{id}', true);
}
const options = buildDefaultOptions(persistenceManager, false);
options.zoom = global.userOptions.zoom;
options.readOnly = false;
// Set map id ...
options.mapId = global.mapId;