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

refactor: Move to TS and update sentence-splitter/to-string #10

Merged
merged 5 commits into from
Feb 13, 2023
Merged

Conversation

azu
Copy link
Member

@azu azu commented Feb 13, 2023

Rewrite rule!

fix #9

@azu azu linked an issue Feb 13, 2023 that may be closed by this pull request
2 tasks
// get original index value of sentence.loc.start
const sentenceFragment = `${words.slice(0, 3).join(' ')} ...`;
const ruleError = new RuleError(`Maximum word count (${maxWordCount}) exceeded (${words.length}) by "${sentenceFragment}".`);
report(sentence as TxtNode, ruleError);
Copy link
Member Author

Choose a reason for hiding this comment

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

We want to just write report(sentence, ruleError);, but textlint report require TxtNode.
SentenceNode does not be included in TxtNode, but it is compatible.

@azu azu added the Type: Breaking Change Includes breaking changes label Feb 13, 2023
@azu azu added Type: Refactoring A code change that neither fixes a bug nor adds a feature and removed Type: Breaking Change Includes breaking changes labels Feb 13, 2023
@azu azu merged commit 64032f9 into master Feb 13, 2023
@azu azu deleted the feature/9 branch February 13, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Refactoring A code change that neither fixes a bug nor adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transfer en-max-word-count to textlint-rule
1 participant