diff --git a/wax-prosemirror-core/src/config/defaultServices/PortalService/AbstractNodeView.js b/wax-prosemirror-core/src/config/defaultServices/PortalService/AbstractNodeView.js index c8ee404c64c2f6d76f9ced16b47c355d7a6bdba0..92fd9234cce332a17c8ce8acabd27359a2c5ff6e 100644 --- a/wax-prosemirror-core/src/config/defaultServices/PortalService/AbstractNodeView.js +++ b/wax-prosemirror-core/src/config/defaultServices/PortalService/AbstractNodeView.js @@ -1,4 +1,3 @@ -/* eslint-disable class-methods-use-this */ import { v4 as uuidv4 } from 'uuid'; export default class AbstractNodeView { @@ -40,6 +39,7 @@ export default class AbstractNodeView { return innerView && innerView.dom.contains(event.target); } + // eslint-disable-next-line class-methods-use-this ignoreMutation() { return true; } diff --git a/wax-prosemirror-core/src/config/defaultServices/SchemaService/Mark.js b/wax-prosemirror-core/src/config/defaultServices/SchemaService/Mark.js index b1dc8d2681b9d6fcd51694d29668e3844abe5243..4c7c4bfe4859d4fa98b237a1ea70f2d7ee1ba281 100644 --- a/wax-prosemirror-core/src/config/defaultServices/SchemaService/Mark.js +++ b/wax-prosemirror-core/src/config/defaultServices/SchemaService/Mark.js @@ -1,4 +1,3 @@ -/* eslint-disable no-underscore-dangle */ import { isPlainObject } from 'lodash'; import Middleware from '../../../utilities/lib/Middleware'; import ParseRule from './ParseRule'; diff --git a/wax-prosemirror-core/src/utilities/lib/Tools.js b/wax-prosemirror-core/src/utilities/lib/Tools.js index 6e6eb09c0d7fa5300aa2d0c52b162348863ce238..0d3490a3b6c2879a6c8bd76c93b0596ff9b68fa4 100644 --- a/wax-prosemirror-core/src/utilities/lib/Tools.js +++ b/wax-prosemirror-core/src/utilities/lib/Tools.js @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* eslint-disable no-underscore-dangle */ import React from 'react'; import { v4 as uuidv4 } from 'uuid'; import { isEmpty } from 'lodash'; @@ -55,7 +55,7 @@ class Tools { if (isEmpty(view)) return null; return this._isDisplayed ? ( - <Button key={uuidv4()} item={this.toJSON()} view={view} /> + <Button item={this.toJSON()} key={uuidv4()} view={view} /> ) : null; } diff --git a/wax-prosemirror-services/src/EnterService/plugins/GetContentOnEnterPlugin.js b/wax-prosemirror-services/src/EnterService/plugins/GetContentOnEnterPlugin.js index 102844cdbf4fe63bdc94155ff79118c13b3b5a4a..1573bde85c9e9177910b2afc9318b6fe9439b463 100644 --- a/wax-prosemirror-services/src/EnterService/plugins/GetContentOnEnterPlugin.js +++ b/wax-prosemirror-services/src/EnterService/plugins/GetContentOnEnterPlugin.js @@ -1,5 +1,4 @@ import { EditorState, Plugin, PluginKey } from 'prosemirror-state'; -// eslint-disable-next-line import/no-extraneous-dependencies import { DOMSerializer, DOMParser } from 'prosemirror-model'; const getContentOnEnterPlugin = new PluginKey('getContentOnEnterPlugin'); @@ -28,8 +27,8 @@ export default props => { return new Plugin({ key: getContentOnEnterPlugin, state: { - init: (_, state) => {}, - apply(tr, prev, _, newState) {}, + init: () => {}, + apply() {}, }, props: { handleKeyDown(view, event) { diff --git a/wax-prosemirror-services/src/EssayService/components/EditorComponent.js b/wax-prosemirror-services/src/EssayService/components/EditorComponent.js index 66112477a7f8a3405fb1ace7a6d7cde1fe102fed..02a97a20723c50bf6475affb760ff63bb388b53b 100644 --- a/wax-prosemirror-services/src/EssayService/components/EditorComponent.js +++ b/wax-prosemirror-services/src/EssayService/components/EditorComponent.js @@ -72,7 +72,6 @@ const EditorComponent = ({ node, view, getPos }) => { const plugins = [keymap(createKeyBindings()), ...app.getPlugins()]; - // eslint-disable-next-line no-shadow const createPlaceholder = placeholder => { return Placeholder({ content: placeholder, diff --git a/wax-prosemirror-services/src/EssayService/components/EssayAnswerComponent.js b/wax-prosemirror-services/src/EssayService/components/EssayAnswerComponent.js index 3fcf806ded2eaa1b6146bd6f55277a62a4102d3c..78ff4361c82a69b9ceda3d7fc628674e6a53390b 100644 --- a/wax-prosemirror-services/src/EssayService/components/EssayAnswerComponent.js +++ b/wax-prosemirror-services/src/EssayService/components/EssayAnswerComponent.js @@ -103,7 +103,6 @@ const EssayAnswerComponent = ({ node, view, getPos }) => { const plugins = [keymap(createKeyBindings()), ...app.getPlugins()]; - // eslint-disable-next-line no-shadow const createPlaceholder = placeholder => { return Placeholder({ content: placeholder, diff --git a/wax-prosemirror-services/src/EssayService/components/EssayQuestionComponent.js b/wax-prosemirror-services/src/EssayService/components/EssayQuestionComponent.js index d5be0000786e64282546a229c21ced5bc0e90e26..ce4b2c268ab044e3787c31cbc766c972e7c1c00d 100644 --- a/wax-prosemirror-services/src/EssayService/components/EssayQuestionComponent.js +++ b/wax-prosemirror-services/src/EssayService/components/EssayQuestionComponent.js @@ -102,7 +102,6 @@ const EssayQuestionComponent = ({ node, view, getPos }) => { const plugins = [keymap(createKeyBindings()), ...app.getPlugins()]; - // eslint-disable-next-line no-shadow const createPlaceholder = placeholder => { return Placeholder({ content: placeholder, diff --git a/wax-prosemirror-services/src/ImageService/schema/imageNode.js b/wax-prosemirror-services/src/ImageService/schema/imageNode.js index 2dba4d90dce02cbe39d4fde2bef69254aaa6c8a1..f009e4f13b98457c1f92935b4814a50aee5e504a 100644 --- a/wax-prosemirror-services/src/ImageService/schema/imageNode.js +++ b/wax-prosemirror-services/src/ImageService/schema/imageNode.js @@ -1,5 +1,4 @@ // import { SchemaHelpers } from 'wax-prosemirror-core'; -import { isEmpty } from 'lodash'; const imageNode = { attrs: { diff --git a/wax-prosemirror-services/src/ListsService/ListItemService/schema/listItemNode.js b/wax-prosemirror-services/src/ListsService/ListItemService/schema/listItemNode.js index fefea9264c154fb58b1ab8cef1d2a19e2ec913b4..b8f382fa283bec26f0e288264cad5ea90b9400e8 100644 --- a/wax-prosemirror-services/src/ListsService/ListItemService/schema/listItemNode.js +++ b/wax-prosemirror-services/src/ListsService/ListItemService/schema/listItemNode.js @@ -1,4 +1,3 @@ -/* eslint-disable camelcase */ import { SchemaHelpers } from 'wax-prosemirror-core'; const listItemNode = { @@ -22,6 +21,7 @@ const listItemNode = { if (hook.node.attrs.track && hook.node.attrs.track.length) { attrs['data-track'] = JSON.stringify(hook.node.attrs.track); } + // eslint-disable-next-line no-param-reassign hook.value = ['li', attrs, 0]; next(); }, diff --git a/wax-prosemirror-services/src/MatchingService/components/EditorComponent.js b/wax-prosemirror-services/src/MatchingService/components/EditorComponent.js index 3da67cf4d327bcfd64ae383f766d91d00a4b40de..6f2b08ca8d782e3b5292006b6b129d3cb72f35b2 100644 --- a/wax-prosemirror-services/src/MatchingService/components/EditorComponent.js +++ b/wax-prosemirror-services/src/MatchingService/components/EditorComponent.js @@ -87,7 +87,6 @@ const EditorComponent = ({ node, view, getPos }) => { const plugins = [keymap(createKeyBindings()), ...app.getPlugins()]; - // eslint-disable-next-line no-shadow const createPlaceholder = placeholder => { return Placeholder({ content: placeholder, diff --git a/wax-prosemirror-services/src/MathService/BlockInputRule.js b/wax-prosemirror-services/src/MathService/BlockInputRule.js index 2ca7c909456b83f802b77a2a8d2f9a8958436b13..3c4f1d79c7c6501020c0e47d3c71800a8b652086 100644 --- a/wax-prosemirror-services/src/MathService/BlockInputRule.js +++ b/wax-prosemirror-services/src/MathService/BlockInputRule.js @@ -1,11 +1,10 @@ -/* eslint-disable */ import { InputRule } from 'prosemirror-inputrules'; import { NodeSelection } from 'prosemirror-state'; const blockInputRule = (pattern, nodeType, getAttrs) => { return new InputRule(pattern, (state, match, start, end) => { - let $start = state.doc.resolve(start); - let attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs; + const $start = state.doc.resolve(start); + const attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs; if ( !$start @@ -14,7 +13,7 @@ const blockInputRule = (pattern, nodeType, getAttrs) => { ) return null; - let tr = state.tr + const tr = state.tr .delete(start, end) .setBlockType(start, start, nodeType, attrs); return tr.setSelection( diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseSingleCorrectQuestionService/TrueFalseSingleCorrectQuestion.js b/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseSingleCorrectQuestionService/TrueFalseSingleCorrectQuestion.js index d9cd55726c77ea42cf0fd786f95b7f3ff795376e..ce39f1988a081d0aea143e10a8fc947b22c50963 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseSingleCorrectQuestionService/TrueFalseSingleCorrectQuestion.js +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseSingleCorrectQuestionService/TrueFalseSingleCorrectQuestion.js @@ -61,7 +61,6 @@ class TrueFalseSingleCorrectQuestion extends Tools { renderTool(view) { if (isEmpty(view)) return null; - // eslint-disable-next-line no-underscore-dangle return this.isDisplayed() ? ( <ToolBarBtn item={this.toJSON()} key={uuidv4()} view={view} /> ) : null; diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/EditorComponent.js b/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/EditorComponent.js index 7d257773f29b7a4855f29629f176c718d289ca5b..59f95977f4001754d838af4479cd3948dd57d0ac 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/EditorComponent.js +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/EditorComponent.js @@ -84,7 +84,6 @@ const EditorComponent = ({ node, view, getPos }) => { const plugins = [keymap(createKeyBindings()), ...app.getPlugins()]; - // eslint-disable-next-line no-shadow const createPlaceholder = placeholder => { return Placeholder({ content: placeholder, diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/QuestionEditorComponent.js b/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/QuestionEditorComponent.js index d7cb23c812fbfb099250b4801bc48368405b1791..9ee99c9f717f464bb97e7ca76098b503cfe703c1 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/QuestionEditorComponent.js +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/QuestionEditorComponent.js @@ -118,7 +118,6 @@ const QuestionEditorComponent = ({ node, view, getPos }) => { const plugins = [keymap(createKeyBindings()), ...app.getPlugins()]; - // eslint-disable-next-line no-shadow const createPlaceholder = placeholder => { return Placeholder({ content: placeholder, diff --git a/wax-prosemirror-services/src/TablesService/components/InsertTableTool.js b/wax-prosemirror-services/src/TablesService/components/InsertTableTool.js index 9e85eaaf9ead36e93d2d91e4011da48f7bd12b27..52197e38e617d77224304ad4d4b199043841ad10 100644 --- a/wax-prosemirror-services/src/TablesService/components/InsertTableTool.js +++ b/wax-prosemirror-services/src/TablesService/components/InsertTableTool.js @@ -4,15 +4,7 @@ * TO DO -- Implement a gdocs-style CSS only solution to dramatically cut back on renders */ -/* eslint-disable react/jsx-handler-names */ -/* eslint-disable react/destructuring-assignment */ -/* eslint-disable react/no-find-dom-node */ -/* eslint-disable no-underscore-dangle */ -/* eslint-disable no-plusplus */ -/* eslint-disable prefer-template */ -/* eslint-disable prefer-destructuring */ -/* eslint-disable max-classes-per-file */ -/* eslint-disable jsx-a11y/no-static-element-interactions */ +/* eslint-disable*/ import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; diff --git a/wax-prosemirror-services/src/WaxToolGroups/OENLeftToolGroupService/OENTools.js b/wax-prosemirror-services/src/WaxToolGroups/OENLeftToolGroupService/OENTools.js index fe5c02cf398632bff928b87e95d2f396f60e6144..5a30dc70c090592663cc9c67947802e1ed8f9bf2 100644 --- a/wax-prosemirror-services/src/WaxToolGroups/OENLeftToolGroupService/OENTools.js +++ b/wax-prosemirror-services/src/WaxToolGroups/OENLeftToolGroupService/OENTools.js @@ -1,4 +1,3 @@ -/* eslint-disable no-underscore-dangle */ import React, { useMemo } from 'react'; import { injectable, inject } from 'inversify'; import { isEmpty } from 'lodash'; @@ -49,6 +48,7 @@ class OENTools extends ToolGroup { disabled: false, component: ( <BlockLevelTools + // eslint-disable-next-line no-underscore-dangle groups={this._toolGroups[0].groups.map(group => ({ groupName: group.title === 'Custom Block' || group.title === 'OEN Containers'