mirror of
https://github.com/codex-team/editor.js
synced 2024-06-10 09:52:36 +02:00
Refactoring based on ESLint (#1637)
* Refactoring based on ESLint * Update .eslintrc Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
This commit is contained in:
parent
14acef136c
commit
d5217067a6
|
@ -9,6 +9,7 @@
|
|||
"import/no-duplicates": ["warn"],
|
||||
"@typescript-eslint/triple-slash-reference": ["off"],
|
||||
"jsdoc/no-undefined-types": ["warn", {"definedTypes": [
|
||||
"ConstructorOptions",
|
||||
"API",
|
||||
"BlockToolConstructable",
|
||||
"EditorConfig",
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
- `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).
|
||||
- `Refactoring` — Refactoring based on ESLint [#1636](https://github.com/codex-team/editor.js/issues/1636).
|
||||
|
||||
### 2.20.0
|
||||
|
||||
|
|
|
@ -92,9 +92,8 @@ export default class Module<T extends ModuleNodes = {}> {
|
|||
|
||||
/**
|
||||
* @class
|
||||
* @param {object} moduleConfiguration - Module Configuration
|
||||
* @param {EditorConfig} moduleConfiguration.config - Editor's config
|
||||
* @param {EventsDispatcher} moduleConfiguration.eventsDispatcher - Editor's event dispatcher
|
||||
*
|
||||
* @param {ModuleConfig} - Module config
|
||||
*/
|
||||
constructor({ config, eventsDispatcher }: ModuleConfig) {
|
||||
if (new.target === Module) {
|
||||
|
|
|
@ -107,15 +107,14 @@ export default class Saver extends Module {
|
|||
return;
|
||||
}
|
||||
|
||||
const output: any = {
|
||||
const output = {
|
||||
type: tool,
|
||||
data,
|
||||
...!_.isEmpty(tunes) && {
|
||||
tunes,
|
||||
},
|
||||
};
|
||||
|
||||
if (!_.isEmpty(tunes)) {
|
||||
output.tunes = tunes;
|
||||
}
|
||||
|
||||
blocks.push(output);
|
||||
});
|
||||
|
||||
|
|
|
@ -175,13 +175,7 @@ export default abstract class BaseTool<Type extends Tool = Tool> {
|
|||
/**
|
||||
* @class
|
||||
*
|
||||
* @param name - Tool name
|
||||
* @param constructable - Tool constructable blueprint
|
||||
* @param config - user specified Tool config
|
||||
* @param api - EditorJS API module
|
||||
* @param defaultTool - default Tool name
|
||||
* @param isInternal - is current Tool internal
|
||||
* @param defaultPlaceholder - default user specified placeholder
|
||||
* @param {ConstructorOptions} - Constructor options
|
||||
*/
|
||||
constructor({
|
||||
name,
|
||||
|
@ -278,5 +272,6 @@ export default abstract class BaseTool<Type extends Tool = Tool> {
|
|||
*
|
||||
* @param args
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
public abstract create(...args: any[]): Type;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue