lint code

This commit is contained in:
Peter Savchenko 2020-06-03 11:03:51 +03:00
parent 8341c3380c
commit 239aaf6fb0
No known key found for this signature in database
GPG key ID: E68306B1AB0F727C
4 changed files with 22 additions and 20 deletions

View file

@ -193,12 +193,12 @@ export default class Block {
private readonly blockAPI: BlockAPIInterface; private readonly blockAPI: BlockAPIInterface;
/** /**
* @class * @param {object} options - block constructor options
* @param {string} tool - Tool name that passed on initialization * @param {string} options.name - Tool name that passed on initialization
* @param {BlockToolData} data - Tool's initial data * @param {BlockToolData} options.data - Tool's initial data
* @param {BlockToolConstructable} Tool Tool's class * @param {BlockToolConstructable} options.Tool Tool's class
* @param {ToolSettings} settings - default tool's config * @param {ToolSettings} options.settings - default tool's config
* @param {ApiModule} api - Editor API module for pass it to the Block Tunes * @param {ApiModule} options.api - Editor API module for pass it to the Block Tunes
*/ */
constructor({ constructor({
name, name,

View file

@ -65,8 +65,6 @@ export default class Flipper {
private readonly activateCallback: (item: HTMLElement) => void; private readonly activateCallback: (item: HTMLElement) => void;
/** /**
* @class
*
* @param {FlipperOptions} options - different constructing settings * @param {FlipperOptions} options - different constructing settings
*/ */
constructor(options: FlipperOptions) { constructor(options: FlipperOptions) {

View file

@ -204,8 +204,9 @@ export default class BlockManager extends Module {
/** /**
* Creates Block instance by tool name * Creates Block instance by tool name
* *
* @param {string} tool - tools passed in editor config {@link EditorConfig#tools} * @param {object} options - block creation options
* @param {BlockToolData} [data] - constructor params * @param {string} options.tool - tools passed in editor config {@link EditorConfig#tools}
* @param {BlockToolData} [options.data] - constructor params
* *
* @returns {Block} * @returns {Block}
*/ */
@ -228,11 +229,12 @@ export default class BlockManager extends Module {
/** /**
* Insert new block into _blocks * Insert new block into _blocks
* *
* @param {string} tool plugin name, by default method inserts initial block type * @param {object} options - insert options
* @param {object} data plugin data * @param {string} options.tool - plugin name, by default method inserts initial block type
* @param {number} index - index where to insert new Block * @param {object} options.data - plugin data
* @param {boolean} needToFocus - flag shows if needed to update current Block index * @param {number} options.index - index where to insert new Block
* @param {boolean} replace - flag shows if block by passed index should be replaced with inserted one * @param {boolean} options.needToFocus - flag shows if needed to update current Block index
* @param {boolean} options.replace - flag shows if block by passed index should be replaced with inserted one
* *
* @returns {Block} * @returns {Block}
*/ */
@ -274,8 +276,9 @@ export default class BlockManager extends Module {
/** /**
* Replace current working block * Replace current working block
* *
* @param {string} tool plugin name * @param {object} options - replace options
* @param {BlockToolData} data plugin data * @param {string} options.tool plugin name
* @param {BlockToolData} options.data plugin data
* *
* @returns {Block} * @returns {Block}
*/ */

View file

@ -14,7 +14,7 @@ export default class Stub implements BlockTool {
/** /**
* Stub styles * Stub styles
* *
* @type {{wrapper: string; info: string; title: string; subtitle: string}} * @type {{wrapper: string, info: string, title: string, subtitle: string}}
*/ */
private CSS = { private CSS = {
wrapper: 'ce-stub', wrapper: 'ce-stub',
@ -49,8 +49,9 @@ export default class Stub implements BlockTool {
private readonly savedData: BlockToolData; private readonly savedData: BlockToolData;
/** /**
* @param data - stub tool data * @param options - constructor options
* @param api - Editor.js API * @param options.data - stub tool data
* @param options.api - Editor.js API
*/ */
constructor({ data, api }: BlockToolConstructorOptions<StubData>) { constructor({ data, api }: BlockToolConstructorOptions<StubData>) {
this.api = api; this.api = api;