Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typescript): refactor paragraph tool #69

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ilyamore88
Copy link
Member

I've replaced Webpack builder with Vite. Also, I've added TypeScript support. Now builder generates declaration files.

@talyguryn
Copy link
Member

/**
* Tool data for input and output
*/
private _data: ParagraphToolData = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private _data: ParagraphToolData = {};
private data: ParagraphToolData = {};

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are already getters and setters for data. So, there is no point in changing.

src/index.ts Show resolved Hide resolved
*/
private readonly placeholder: string;

private readonly preserveBlank: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplication. You already have config

src/types/index.ts Outdated Show resolved Hide resolved
src/types/index.ts Show resolved Hide resolved
vite.config.ts Outdated Show resolved Hide resolved
@GeekaN2 GeekaN2 marked this pull request as ready for review March 2, 2023 17:53
Copy link
Contributor

@neSpecc neSpecc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install our eslint config

Comment on lines +46 to +56
export interface PasteConfig {
tags: string[];
}

/**
* Used by Editor API to display the module in the toolbox
*/
export interface Toolbox {
icon: string;
title: string;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need these types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants