Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethbruskiewicz committed Dec 18, 2024
1 parent 7736fe9 commit 8aa5420
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 20 deletions.
4 changes: 2 additions & 2 deletions lib/AppContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,11 +593,11 @@ export default class AppContext {
context.setDataHarmonizers(dhs);

// COMMENTED OUT: WIP feature
if (!!context.oneToManyAppContext) {
if (context.oneToManyAppContext) {
context.oneToManyAppContext.destroy();
}
const appContext = buildAppContext(schema);
context.oneToManyAppContext = setup1M(appContext, dhs); // returns an event manager
context.oneToManyAppContext = setup1M(appContext, dhs); // returns an event manager

return context;
});
Expand Down
5 changes: 1 addition & 4 deletions lib/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ import {
LocaleNotSupportedError,
} from '../lib/utils/templates';

import {
findLocalesForLangcodes,
interface_translation,
} from './utils/i18n';
import { findLocalesForLangcodes, interface_translation } from './utils/i18n';
import i18next from 'i18next';

import template from './toolbar.html';
Expand Down
6 changes: 1 addition & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ export { default as Footer } from './Footer';
export { default as Toolbar } from './Toolbar';
export { default as DataHarmonizer } from './DataHarmonizer';
export { default as AppContext } from './AppContext';
export {
DATE_OBJECT,
JSON_SCHEMA_FORMAT,
INPUT_FORMAT,
} from './utils/fields';
export { DATE_OBJECT, JSON_SCHEMA_FORMAT, INPUT_FORMAT } from './utils/fields';
5 changes: 1 addition & 4 deletions lib/utils/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import jqueryI18next from 'jquery-i18next';

import { flattenObject } from './objects';
import label_translations_file from '../../web/translations/translations.json';
import {
MULTIVALUED_DELIMITER,
formatMultivaluedValue,
} from './fields';
import { MULTIVALUED_DELIMITER, formatMultivaluedValue } from './fields';
import { renderContent } from './content';

export const interface_translation = transformStructFirstSpec(
Expand Down
6 changes: 5 additions & 1 deletion lib/utils/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ export async function templatePathForSchemaURI(schemaURI) {
// for now, this is just the manifest
for (let i = 0; i < template_manifest.children.length; i++) {
const template = template_manifest.children[i];
if (typeof template.children !== 'undefined' && template.children.length > 0 && template.children.some(c => c.name.includes("schema.json"))) {
if (
typeof template.children !== 'undefined' &&
template.children.length > 0 &&
template.children.some((c) => c.name.includes('schema.json'))
) {
const schema = await getSchema(template.name);
if (schema.id === schemaURI) {
const templatePath = `${template.path.split('/').slice(-1)}/${schemaURI
Expand Down
5 changes: 1 addition & 4 deletions lib/utils/validation.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
formatMultivaluedValue,
parseMultivaluedValue,
} from './fields';
import { formatMultivaluedValue, parseMultivaluedValue } from './fields';

/**
* Test cellVal against "DataHarmonizer provenance: vX.Y.Z" pattern and if it
Expand Down

0 comments on commit 8aa5420

Please sign in to comment.