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

fix(deps): update dependency textlint to v13 #81

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 2, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
textlint ^12.1.1 -> ^13.0.0 age adoption passing confidence

Release Notes

textlint/textlint

v13.3.2

Compare Source

What's Changed

Bug Fixes
Documentation
Refactoring
Dependency Updates
Other Changes

Full Changelog: textlint/textlint@v13.3.1...13.3.2

v13.3.1

Compare Source

What's Changed

Bug Fixes
Documentation
Dependency Updates

Full Changelog: textlint/textlint@v13.3.0...13.3.1

v13.3.0

Compare Source

What's Changed

Features
Dependency Updates
Other Changes

Full Changelog: textlint/textlint@v13.2.0...13.3.0

v13.2.0

Compare Source

What's Changed

Features
import TextLintTester from "textlint-tester";
import rule from "textlint-rule-no-todo";
const tester = new TextLintTester();
tester.run("rule name", rule, {
    valid: [
        { text: "This is ok", description: "It is normal text" }
    ],
    invalid: [
        {
            text: "- [ ] string",
            description: "It todo test",
            errors: [
                {
                    message: "Found TODO: '- [ ] string'",
                    range: [2, 6]
                }
            ]
        }
    ]
});
Dependency Updates

Full Changelog: textlint/textlint@v13.1.4...13.2.0

v13.1.4

Compare Source

What's Changed

Bug Fixes
Dependency Updates

Full Changelog: textlint/textlint@v13.1.3...13.1.4

v13.1.3

Compare Source

What's Changed

Bug Fixes

Full Changelog: textlint/textlint@v13.1.2...13.1.3

v13.1.2

Compare Source

What's Changed

Refactoring
Testing
Dependency Updates

Full Changelog: textlint/textlint@v13.1.1...13.1.2

v13.1.1

Compare Source

What's Changed

Bug Fixes
Refactoring

Full Changelog: textlint/textlint@v13.1.0...13.1.1

v13.1.0

Compare Source

What's Changed

Features
$ npm install textlint textlint-plugin-html textlint-rule-preset-ja-technical-writing
$ npx textlint --init

will generate .textlintrc.json

{
  "plugins": {
    "html": true
  },
  "filters": {},
  "rules": {
    "preset-ja-technical-writing": true
  }
}
Testing
Dependency Updates

Full Changelog: textlint/textlint@v13.0.5...13.1.0

v13.0.5

Compare Source

What's Changed

Bug Fixes

This release correct ast-node-type types.

Full Changelog: textlint/textlint@v13.0.4...13.0.5

v13.0.4

Compare Source

What's Changed

Dependency Updates

It will reduce textlint package size.

image

https://bundlephobia.com/package/textlint@13.0.3\
https://bundlephobia.com/package/textlint@13.0.4

172.8kb ⬇️

Full Changelog: textlint/textlint@v13.0.3...13.0.4

v13.0.3

Compare Source

What's Changed

Refactoring

It will reduce @textlint/kernel package size.

15.1kb ⬇️

Dependency Updates

Full Changelog: textlint/textlint@v13.0.2...13.0.3

v13.0.2

Compare Source

What's Changed

Bug Fixes

Full Changelog: textlint/textlint@v13.0.1...13.0.2

v13.0.1

Compare Source

What's Changed

Bug Fixes

If you have used TextNodeRange, TxtNodeLineLocation, TxtNodePosition, please change following:

- import type { TextNodeRange, TxtNodeLineLocation, TxtNodePosition } from "@​textlint/ast-node-types";
+ import type { TxtNodeRange, TxtNodeLocation, TxtNodePosition } from "@​textlint/ast-node-types";
Refactoring

Full Changelog: textlint/textlint@v13.0.0...13.0.1

v13.0.0

Compare Source

textlint v13 support ESM rules/plugins 🎉

We have rewritten CLI and textlint package.
However, it is not a breaking change for most textlint CLI users.
Almost CLI behaviors are the same as textlint v12.

Please share your feedback to us!

🔥 Breaking Changes

  • Require Node.js 16+
  • textlint --init output .textlintrc.json
    • Previously, textlint --init output .textlintrc
  • Improve @textlint/ast-node-types types
    • Now, All node types are defined!
    • It changes the existing node type and it is a breaking change
    • If you want to know TxtAST, please read TxtAST Interface
    • See also Release v13.0.1 · textlint/textlint
    • - import type { TextNodeRange, TxtNodeLineLocation, TxtNodePosition } from "@​textlint/ast-node-types";
      + import type { TxtNodeRange, TxtNodeLocation, TxtNodePosition } from "@​textlint/ast-node-types";
  • Use New-CLI instead of Old-CLI
    • textlint has introduced New-CLI and New-APIs in v12.3.0
    • New-CLI uses new APIs: createLinter/loadTextlintrc/loadLinterFormatter/loadFixerFormatter( If you want to know new APIs, please read Use as Node Modules)
    • It means that textlint support rules/plugins that are written by ESM 🎉
    • Remove Old-CLI
Difference between Old-CLI and New-CLI
  • New CLI support ESM rules/plugins
  • New CLI must require --stdin-filename with --stdin
    • --stdin-filename may be optional in Old-CLI
  • Correct exit status
Exit Status on new CLI

0: No Error

  • Not found lint error
  • --fix: found errors but fix all errors, so exit with 0
  • --output-file: Found lint error but --output-file is specified
  • --dryRun: Found lint error but --dryRun is specified

1: Lint Error

  • found lint error
  • --fix: found errors and could not fix all errors, so exit with 1

2: Fatal Error

  • Crash textlint process
  • Fail to load config/rule/plugin etc...
Remove undocumented way to override preset rule option

textlint v12 supported next textlintrc, but it is undocumented way.

{
  "rules": {
    "preset-ja-technical-writing": true,
    "ja-technical-writing/sentence-length": {
      "max": 100 // It override preset-ja-technical-writing's option
    }
  }
}

textlint v13 will remove this undocumented way.

You need to use next textlintrc.

{
  "rules": {
    "preset-ja-technical-writing": {
      "sentence-length": {
        "max": 100 // It override preset-ja-technical-writing's option
      }
    }
  }
}

For more details, see Configuring textlint · textlint

🆕 Features

Add individual Node type and Add Table/TableRow/TableCell node #​1008
  • Define all node types in @textlint/ast-node-types
  • Add Table/TableRow/TableCell node to @textlint/ast-node-types

These types are defined in @textlint/ast-node-types.

Type name Node type Description
ASTNodeTypes.Document TxtDocumentNode(TxtParentNode) Root Node
ASTNodeTypes.DocumentExit TxtDocumentNode(TxtParentNode)
ASTNodeTypes.Paragraph TxtParagraphNode(TxtParentNode) Paragraph Node
ASTNodeTypes.ParagraphExit TxtParagraphNode(TxtParentNode)
ASTNodeTypes.BlockQuote TxtBlockQuoteNode(TxtParentNode) > Block Quote Node
ASTNodeTypes.BlockQuoteExit TxtBlockQuoteNode(TxtParentNode)
ASTNodeTypes.List TxtListNode(TxtParentNode) List Node
ASTNodeTypes.ListExit TxtListNode(TxtParentNode)
ASTNodeTypes.ListItem TxtListItemNode(TxtParentNode) List (each) item Node
ASTNodeTypes.ListItemExit TxtListItemNode(TxtParentNode)
ASTNodeTypes.Header TxtHeaderNode(TxtParentNode) # Header Node
ASTNodeTypes.HeaderExit TxtHeaderNode(TxtParentNode)
ASTNodeTypes.CodeBlock TxtCodeBlockNode(TxtParentNode) Code Block Node
ASTNodeTypes.CodeBlockExit TxtCodeBlockNode(TxtParentNode)
ASTNodeTypes.HtmlBlock TxtHtmlBlockNode(TxtParentNode) HTML Block Node
ASTNodeTypes.HtmlBlockExit TxtHtmlBlockNode(TxtParentNode)
ASTNodeTypes.Link TxtLinkNode(TxtParentNode) Link Node
ASTNodeTypes.LinkExit TxtLinkNode(TxtParentNode)
ASTNodeTypes.Delete TxtDeleteNode(TxtParentNode) Delete Node(~Str~)
ASTNodeTypes.DeleteExit TxtDeleteNode(TxtParentNode)
ASTNodeTypes.Emphasis TxtEmphasisNode(TxtParentNode) Emphasis(*Str*)
ASTNodeTypes.EmphasisExit TxtEmphasisNode(TxtParentNode)
ASTNodeTypes.Strong TxtStrongNode(TxtParentNode) Strong Node(**Str**)
ASTNodeTypes.StrongExit TxtStrongNode(TxtParentNode)
ASTNodeTypes.Break TxtBreakNode Hard Break Node(Str<space><space>)
ASTNodeTypes.BreakExit TxtBreakNode
ASTNodeTypes.Image TxtImageNode Image Node
ASTNodeTypes.ImageExit TxtImageNode
ASTNodeTypes.HorizontalRule TxtHorizontalRuleNode Horizontal Node(---)
ASTNodeTypes.HorizontalRuleExit TxtHorizontalRuleNode
ASTNodeTypes.Comment TxtCommentNode Comment Node
ASTNodeTypes.CommentExit TxtCommentNode
ASTNodeTypes.Str TxtStrNode Str Node
ASTNodeTypes.StrExit TxtStrNode
ASTNodeTypes.Code TxtCodeNode Inline Code Node
ASTNodeTypes.CodeExit TxtCodeNode
ASTNodeTypes.Html TxtHtmlNode Inline HTML Node
ASTNodeTypes.HtmlExit TxtHtmlNode
ASTNodeTypes.Table TxtTableNode Table node. textlint 13+
ASTNodeTypes.TableExit TxtTableNode
ASTNodeTypes.TableRow TxtTableRowNode Table row node. textlint 13+
ASTNodeTypes.TableRowExit TxtTableRowNode
ASTNodeTypes.TableCell TxtTableCellNode Table cell node. textlint 13+
ASTNodeTypes.TableCellExit TxtTableCellNode

Some nodes have additional properties.
For example, TxtHeaderNode has level property.

export interface TxtHeaderNode extends TxtParentNode {
    type: "Header";
    depth: 1 | 2 | 3 | 4 | 5 | 6;
    children: PhrasingContent[];
}

For more details, see @textlint/ast-node-types.

CHANGELOGS

Breaking Changes
Other Changes

Full Changelog: textlint/textlint@v12.6.1...13.0.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from prisis as a code owner February 2, 2023 00:07
@renovate renovate bot added Changed Changelog Changed dependency labels Feb 2, 2023
@codecov
Copy link

codecov bot commented Feb 2, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@d14dd3b). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #81   +/-   ##
=======================================
  Coverage        ?   95.73%           
=======================================
  Files           ?       15           
  Lines           ?      211           
  Branches        ?       43           
=======================================
  Hits            ?      202           
  Misses          ?        9           
  Partials        ?        0           
Flag Coverage Δ
unittests 95.73% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions github-actions bot added the Stale label Mar 20, 2023
@github-actions github-actions bot closed this Apr 4, 2023
@renovate
Copy link
Contributor Author

renovate bot commented Apr 4, 2023

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 13.x releases. But if you manually upgrade to 13.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/textlint-13.x branch April 4, 2023 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants