mirror of
https://github.com/codex-team/editor.js
synced 2024-06-19 14:15:19 +02:00
Refactoring based on LGTM (#1635)
* Refactoring based on LGTM * Fixed jsdoc/no-undefined-types Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
This commit is contained in:
parent
a88dc8e30b
commit
9cdda110da
|
@ -7,7 +7,14 @@
|
|||
* Temporary suppress some errors. We need to fix them partially in next patches
|
||||
*/
|
||||
"import/no-duplicates": ["warn"],
|
||||
"@typescript-eslint/triple-slash-reference": ["off"]
|
||||
"@typescript-eslint/triple-slash-reference": ["off"],
|
||||
"jsdoc/no-undefined-types": ["warn", {"definedTypes": [
|
||||
"API",
|
||||
"BlockToolConstructable",
|
||||
"EditorConfig",
|
||||
"Tool",
|
||||
"ToolSettings"
|
||||
]}]
|
||||
},
|
||||
"settings": {
|
||||
"jsdoc": {
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
### 2.20.1
|
||||
|
||||
|
||||
- `Fix` — Fix sanitisation problem with Inline Tools [#1631](https://github.com/codex-team/editor.js/issues/1631)
|
||||
- `Refactoring` - The Sanitizer module is util now.
|
||||
- `Refactoring` - Tooltip module is util now.
|
||||
- `Refactoring` — Refactoring based on LGTM [#1577](https://github.com/codex-team/editor.js/issues/1577).
|
||||
|
||||
### 2.20.0
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import {
|
||||
BlockAPI as BlockAPIInterface,
|
||||
BlockTool as IBlockTool,
|
||||
BlockToolConstructable,
|
||||
BlockToolData,
|
||||
BlockTune as IBlockTune,
|
||||
SanitizerConfig,
|
||||
ToolConfig,
|
||||
ToolSettings
|
||||
ToolConfig
|
||||
} from '../../../types';
|
||||
|
||||
import { SavedData } from '../../../types/data-formats';
|
||||
|
|
|
@ -2,7 +2,7 @@ import SelectionUtils from '../selection';
|
|||
|
||||
import $ from '../dom';
|
||||
import * as _ from '../utils';
|
||||
import { API, InlineTool, SanitizerConfig } from '../../../types';
|
||||
import { InlineTool, SanitizerConfig } from '../../../types';
|
||||
import { Notifier, Toolbar, I18n } from '../../../types/api';
|
||||
|
||||
/**
|
||||
|
|
|
@ -531,7 +531,7 @@ export default class Caret extends Module {
|
|||
* If there is no child node, append empty one
|
||||
*/
|
||||
if (fragment.childNodes.length === 0) {
|
||||
fragment.appendChild(new Text(''));
|
||||
fragment.appendChild(new Text());
|
||||
}
|
||||
|
||||
const lastChild = fragment.lastChild;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import Module from '../../__module';
|
||||
import $ from '../../dom';
|
||||
import { BlockToolConstructable } from '../../../../types';
|
||||
import * as _ from '../../utils';
|
||||
import { SavedData } from '../../../../types/data-formats';
|
||||
import Flipper from '../../flipper';
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import Module from '../../__module';
|
||||
import $ from '../../dom';
|
||||
import * as _ from '../../utils';
|
||||
import { BlockToolConstructable, EditorConfig } from '../../../../types';
|
||||
import Flipper from '../../flipper';
|
||||
import { BlockToolAPI } from '../../block';
|
||||
import I18n from '../../i18n';
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
import Paragraph from '../../tools/paragraph/dist/bundle';
|
||||
import Module from '../__module';
|
||||
import * as _ from '../utils';
|
||||
import {
|
||||
EditorConfig,
|
||||
SanitizerConfig,
|
||||
Tool,
|
||||
ToolConstructable,
|
||||
ToolSettings
|
||||
} from '../../../types';
|
||||
import { SanitizerConfig, ToolConstructable, ToolSettings } from '../../../types';
|
||||
import BoldInlineTool from '../inline-tools/inline-tool-bold';
|
||||
import ItalicInlineTool from '../inline-tools/inline-tool-italic';
|
||||
import LinkInlineTool from '../inline-tools/inline-tool-link';
|
||||
|
|
Loading…
Reference in a new issue