-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(deps): update to setence-splitter@5 (#42)
* refactor(deps): update to setence-splitter@5 **BREAKING CHANGES** > [!WARNING] > Require Node.js 18+ - Update to sentence-splitter@5 - https://github.com/textlint-rule/sentence-splitter/releases/tag/v5.0.0 * CI: update node versions * CI: add .github/release.yml
- Loading branch information
Showing
9 changed files
with
1,346 additions
and
1,453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- 'Type: Meta' | ||
- 'Type: Question' | ||
- 'Type: Release' | ||
|
||
categories: | ||
- title: Security Fixes | ||
labels: ['Type: Security'] | ||
- title: Breaking Changes | ||
labels: ['Type: Breaking Change'] | ||
- title: Features | ||
labels: ['Type: Feature'] | ||
- title: Bug Fixes | ||
labels: ['Type: Bug'] | ||
- title: Documentation | ||
labels: ['Type: Documentation'] | ||
- title: Refactoring | ||
labels: ['Type: Refactoring'] | ||
- title: Testing | ||
labels: ['Type: Testing'] | ||
- title: Maintenance | ||
labels: ['Type: Maintenance'] | ||
- title: CI | ||
labels: ['Type: CI'] | ||
- title: Dependency Updates | ||
labels: ['Type: Dependencies', "dependencies"] | ||
- title: Other Changes | ||
labels: ['*'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import TextLintTester from "textlint-tester"; | ||
import rule from "../src/sentence-length"; | ||
|
||
const tester = new TextLintTester(); | ||
|
||
(async function testHTML() { | ||
const htmlPlugin = (await import("textlint-plugin-html")).default; | ||
tester.run( | ||
"textlint-rule-sentence-length:plugin", | ||
{ | ||
plugins: [ | ||
{ | ||
pluginId: "html", | ||
plugin: htmlPlugin | ||
} | ||
], | ||
rules: [ | ||
{ | ||
ruleId: "textlint-rule-sentence-length", | ||
rule: rule, | ||
options: { | ||
max: 15 | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
valid: [ | ||
{ | ||
text: "<p>this is a test.</p>", | ||
ext: ".html" | ||
}, | ||
{ | ||
text: "<p>TEST is <a href='https://example.com'>https://example.com</a></p>", | ||
ext: ".html" | ||
} | ||
], | ||
invalid: [ | ||
{ | ||
text: "<p>this is a test for textlint-rule-sentence-length with plugin</p>", | ||
ext: ".html", | ||
errors: [ | ||
{ | ||
message: `Line 1 sentence length(60) exceeds the maximum sentence length of 15. | ||
Over 45 characters.`, | ||
line: 1, | ||
column: 4 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.