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(ast-node-types): remove markdown extension && fix TxtNodeType #1033

Merged
merged 10 commits into from Jan 29, 2023

Conversation

azu
Copy link
Member

@azu azu commented Jan 29, 2023

  • Correct type value in some Nodes
  • Remove Markdown Extension from ast-node-types
  • Remove string from TxtNodeType
    • It make TxtNodeType as string
  • _shouldNotUsed use never type

@@ -23,5 +23,5 @@ export type TextlintRuleContextReportFunction = (args: TextlintRuleContextReport

export interface TextlintRuleContext extends TextlintBaseRuleContext {
fixer: TextlintRuleContextFixCommandGenerator;
report: (node: TxtNode, ruleError: TextlintRuleReportedObject | TextlintRuleError, _shouldNotUsed?: any) => void;
report: (node: TxtNode, ruleError: TextlintRuleReportedObject | TextlintRuleError, _shouldNotUsed?: never) => void;
Copy link
Member Author

Choose a reason for hiding this comment

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

It should be never type

@@ -6,6 +6,9 @@ import { TextlintRuleContext, TextlintRuleReportHandler } from "@textlint/types"
const reporter = (context: TextlintRuleContext): TextlintRuleReportHandler => {
const { Syntax, fixer, report, getSource } = context;
return {
["test"](_node) {
Copy link
Member Author

Choose a reason for hiding this comment

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

custom node type test

@@ -12,7 +12,7 @@ import type { ASTNodeTypes } from "./ASTNodeTypes";
* Key of ASTNodeTypes or any string
* For example, TxtNodeType is "Document".
*/
export type TxtNodeType = keyof typeof ASTNodeTypes | string;
export type TxtNodeType = keyof typeof ASTNodeTypes;
Copy link
Member Author

Choose a reason for hiding this comment

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

Its big change.
More type safe

@azu azu added Type: Bug Bug or Bug fixes Type: Typescript labels Jan 29, 2023
@azu azu merged commit 318e09f into master Jan 29, 2023
@azu azu deleted the fix-ast-node-types branch January 29, 2023 05:50
This was referenced Jan 29, 2023
creature-water-valley pushed a commit to ws-4020/mobile-app-crib-notes that referenced this pull request Feb 27, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [stylelint](https://stylelint.io)
([source](https://togithub.com/stylelint/stylelint)) | [`^14.0.0` ->
`^15.0.0`](https://renovatebot.com/diffs/npm/stylelint/14.16.1/15.2.0) |
[![age](https://badges.renovateapi.com/packages/npm/stylelint/15.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/stylelint/15.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/stylelint/15.2.0/compatibility-slim/14.16.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/stylelint/15.2.0/confidence-slim/14.16.1)](https://docs.renovatebot.com/merge-confidence/)
|
|
[stylelint-config-standard](https://togithub.com/stylelint/stylelint-config-standard)
| [`^29.0.0` ->
`^30.0.0`](https://renovatebot.com/diffs/npm/stylelint-config-standard/29.0.0/30.0.1)
|
[![age](https://badges.renovateapi.com/packages/npm/stylelint-config-standard/30.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/stylelint-config-standard/30.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/stylelint-config-standard/30.0.1/compatibility-slim/29.0.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/stylelint-config-standard/30.0.1/confidence-slim/29.0.0)](https://docs.renovatebot.com/merge-confidence/)
|
| [textlint](https://togithub.com/textlint/textlint) | [`^12.0.0` ->
`^13.0.0`](https://renovatebot.com/diffs/npm/textlint/12.6.1/13.3.1) |
[![age](https://badges.renovateapi.com/packages/npm/textlint/13.3.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/textlint/13.3.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/textlint/13.3.1/compatibility-slim/12.6.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/textlint/13.3.1/confidence-slim/12.6.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the
Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>stylelint/stylelint</summary>

###
[`v15.2.0`](https://togithub.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#&#8203;1520)

[Compare
Source](https://togithub.com/stylelint/stylelint/compare/15.1.0...15.2.0)

- Added: `messageArgs` to 76 rules
([#&#8203;6589](https://togithub.com/stylelint/stylelint/pull/6589))
([@&#8203;kizu](https://togithub.com/kizu)).
- Fixed: TypeScript error to export `Plugin` and `RuleContext`
([#&#8203;6664](https://togithub.com/stylelint/stylelint/pull/6664))
([@&#8203;henryruhs](https://togithub.com/henryruhs)).
- Fixed: `overrides.extends` order when including same rules
([#&#8203;6660](https://togithub.com/stylelint/stylelint/pull/6660))
([@&#8203;kuoruan](https://togithub.com/kuoruan)).
- Fixed: `annotation-no-unknown` false positives for CSS-in-JS template
literals
([#&#8203;6666](https://togithub.com/stylelint/stylelint/pull/6666))
([@&#8203;hudochenkov](https://togithub.com/hudochenkov)).
- Fixed: `declaration-property-value-no-unknown` false positives for
at-rule descriptors
([#&#8203;6669](https://togithub.com/stylelint/stylelint/pull/6669))
([@&#8203;FloEdelmann](https://togithub.com/FloEdelmann)).
- Fixed: `declaration-property-value-no-unknown` parse error for
`alpha(opacity=n)` to report as violation
([#&#8203;6650](https://togithub.com/stylelint/stylelint/pull/6650))
([@&#8203;romainmenke](https://togithub.com/romainmenke)).
- Fixed: `function-name-case` false positives for CSS-in-JS template
literals
([#&#8203;6666](https://togithub.com/stylelint/stylelint/pull/6666))
([@&#8203;hudochenkov](https://togithub.com/hudochenkov)).
- Fixed: `function-no-unknown` false positives for CSS-in-JS template
literals
([#&#8203;6666](https://togithub.com/stylelint/stylelint/pull/6666))
([@&#8203;hudochenkov](https://togithub.com/hudochenkov)).
- Fixed: `unit-no-unknown` false positives for CSS-in-JS template
literals
([#&#8203;6666](https://togithub.com/stylelint/stylelint/pull/6666))
([@&#8203;hudochenkov](https://togithub.com/hudochenkov)).
- Fixed: `value-keyword-case` false positives for CSS-in-JS template
literals
([#&#8203;6666](https://togithub.com/stylelint/stylelint/pull/6666))
([@&#8203;hudochenkov](https://togithub.com/hudochenkov)).

###
[`v15.1.0`](https://togithub.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#&#8203;1510)

[Compare
Source](https://togithub.com/stylelint/stylelint/compare/15.0.0...15.1.0)

- Added: `declaration-block-no-redundant-longhand-properties` autofix
([#&#8203;6580](https://togithub.com/stylelint/stylelint/pull/6580))
([@&#8203;mattxwang](https://togithub.com/mattxwang)).
- Fixed: `declaration-property-value-no-unknown` false positives for
`env()`
([#&#8203;6646](https://togithub.com/stylelint/stylelint/pull/6646))
([@&#8203;romainmenke](https://togithub.com/romainmenke)).
- Fixed: `function-calc-no-unspaced-operator` TypeError on empty
`calc()`
([#&#8203;6634](https://togithub.com/stylelint/stylelint/pull/6634))
([@&#8203;romainmenke](https://togithub.com/romainmenke)).
- Fixed: inaccurate `customSyntax` inference
([#&#8203;6645](https://togithub.com/stylelint/stylelint/pull/6645))
([@&#8203;ybiquitous](https://togithub.com/ybiquitous)).

###
[`v15.0.0`](https://togithub.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#&#8203;1500)

[Compare
Source](https://togithub.com/stylelint/stylelint/compare/14.16.1...15.0.0)

[Migrating to `15.0.0` guide](docs/migration-guide/to-15.md).

- Removed: Node.js 12 support
([#&#8203;6477](https://togithub.com/stylelint/stylelint/pull/6477))
([@&#8203;ybiquitous](https://togithub.com/ybiquitous)). (BREAKING)
- Removed: support for processors
([#&#8203;6479](https://togithub.com/stylelint/stylelint/pull/6479))
([@&#8203;ybiquitous](https://togithub.com/ybiquitous)). (BREAKING)
- Removed: `syntax` option
([#&#8203;6420](https://togithub.com/stylelint/stylelint/pull/6420))
([@&#8203;fpetrakov](https://togithub.com/fpetrakov)). (BREAKING)
- Changed: `extends` in `overrides` to merge to be consistent with
`plugins` behaviour
([#&#8203;6380](https://togithub.com/stylelint/stylelint/pull/6380))
([@&#8203;jasikpark](https://togithub.com/jasikpark)). (BREAKING)
- Changed: type definitions to reorganize
([#&#8203;6510](https://togithub.com/stylelint/stylelint/pull/6510))
([@&#8203;ybiquitous](https://togithub.com/ybiquitous)). (BREAKING)
- Changed: type names to be more consistent
([#&#8203;6503](https://togithub.com/stylelint/stylelint/pull/6503))
([@&#8203;ybiquitous](https://togithub.com/ybiquitous)). (BREAKING)
- Deprecated: stylistic rules handled by Prettier
([#&#8203;6504](https://togithub.com/stylelint/stylelint/pull/6504))
([@&#8203;ybiquitous](https://togithub.com/ybiquitous)).
- Added: `declaration-property-value-no-unknown` rule
([#&#8203;6511](https://togithub.com/stylelint/stylelint/pull/6511))
([@&#8203;jeddy3](https://togithub.com/jeddy3)).
- Added: `media-feature-name-unit-allowed-list` rule
([#&#8203;6550](https://togithub.com/stylelint/stylelint/pull/6550))
([@&#8203;mattxwang](https://togithub.com/mattxwang)).
- Added: `function-url-quotes` autofix
([#&#8203;6558](https://togithub.com/stylelint/stylelint/pull/6558))
([@&#8203;mattxwang](https://togithub.com/mattxwang)).
- Added: `ignore: ["custom-elements"]` to `selector-max-type`
([#&#8203;6588](https://togithub.com/stylelint/stylelint/pull/6588))
([@&#8203;muddv](https://togithub.com/muddv)).
- Added: `ignoreFunctions: []` to `unit-disallowed-list`
([#&#8203;6592](https://togithub.com/stylelint/stylelint/pull/6592))
([@&#8203;mattxwang](https://togithub.com/mattxwang)).
- Added: deprecated rule warnings
([#&#8203;6561](https://togithub.com/stylelint/stylelint/pull/6561))
([@&#8203;ybiquitous](https://togithub.com/ybiquitous)).
- Added: message arguments to `declaration-property-unit-allowed-list`
([#&#8203;6570](https://togithub.com/stylelint/stylelint/pull/6570))
([@&#8203;mattxwang](https://togithub.com/mattxwang)).
- Fixed: `overrides.files` in config to allow basename glob patterns
([#&#8203;6547](https://togithub.com/stylelint/stylelint/pull/6547))
([@&#8203;ybiquitous](https://togithub.com/ybiquitous)).
- Fixed: `at-rule-no-unknown` false positives for `@scroll-timeline`
([#&#8203;6554](https://togithub.com/stylelint/stylelint/pull/6554))
([@&#8203;mattxwang](https://togithub.com/mattxwang)).
- Fixed: `function-no-unknown` false positives for interpolation and
backticks in CSS-in-JS
([#&#8203;6565](https://togithub.com/stylelint/stylelint/pull/6565))
([@&#8203;hudochenkov](https://togithub.com/hudochenkov)).
- Fixed: `keyframe-selector-notation` false positives for named timeline
ranges
([#&#8203;6605](https://togithub.com/stylelint/stylelint/pull/6605))
([@&#8203;kimulaco](https://togithub.com/kimulaco)).
- Fixed: `property-no-unknown` false negatives for newer custom syntaxes
([#&#8203;6553](https://togithub.com/stylelint/stylelint/pull/6553))
([@&#8203;43081j](https://togithub.com/43081j)).
- Fixed: `selector-attribute-quotes` false positives for "never"
([#&#8203;6571](https://togithub.com/stylelint/stylelint/pull/6571))
([@&#8203;mattxwang](https://togithub.com/mattxwang)).
- Fixed: `selector-not-notation` autofix for "simple" option
([#&#8203;6608](https://togithub.com/stylelint/stylelint/pull/6608))
([@&#8203;Mouvedia](https://togithub.com/Mouvedia)).

</details>

<details>
<summary>stylelint/stylelint-config-standard</summary>

###
[`v30.0.1`](https://togithub.com/stylelint/stylelint-config-standard/blob/HEAD/CHANGELOG.md#&#8203;3001)

[Compare
Source](https://togithub.com/stylelint/stylelint-config-standard/compare/30.0.0...30.0.1)

- Fixed: updated to
[`stylelint-config-recommended@10.0.1`](https://togithub.com/stylelint/stylelint-config-recommended/releases/tag/10.0.1)

###
[`v30.0.0`](https://togithub.com/stylelint/stylelint-config-standard/blob/HEAD/CHANGELOG.md#&#8203;3000)

[Compare
Source](https://togithub.com/stylelint/stylelint-config-standard/compare/29.0.0...30.0.0)

-   Removed: `stylelint` less than `15.0.0` from peer dependencies.
- Removed: 64 rules deprecated in
[`stylelint@15.0.0`](https://togithub.com/stylelint/stylelint/releases/tag/15.0.0).
For details, see the [migration
guide](https://togithub.com/stylelint/stylelint/blob/15.0.0/docs/migration-guide/to-15.md).
-   Fixed: `length-zero-no-unit` to ignore custom properties.
-   Fixed: `value-no-vendor-prefix` to ignore `-webkit-inline-box`.

</details>

<details>
<summary>textlint/textlint</summary>

###
[`v13.3.1`](https://togithub.com/textlint/textlint/releases/tag/v13.3.1)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.3.0...v13.3.1)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Bug Fixes

- fix: allow missing parameters for loadTextlintrc by
[@&#8203;massongit](https://togithub.com/massongit) in
[textlint/textlint#1089
- fix(textlint): fix to print results when the `--dry-run` option is
specified. by [@&#8203;Sean0628](https://togithub.com/Sean0628) in
[textlint/textlint#1092

##### Documentation

- docs: improve failed-to-load-textlints-module.md by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1086

##### Dependency Updates

- chore(deps): update eslint to ^5.51.0 (minor) by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1076
- chore(deps): update dependency lint-staged to ^13.1.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1077
- chore(deps): update dependency
[@&#8203;types/node](https://togithub.com/types/node) to ^18.13.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1078
- chore(deps): update npm to v9.4.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1079
- chore(deps): update dependency lint-staged to ^13.1.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1080
- chore(deps): update dependency lerna to ^6.5.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1081
- chore(deps): update eslint to ^5.52.0 (minor) by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1082
- chore(deps): update dependency lerna to ^6.5.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1083
- chore(deps): update npm to v9.5.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1084
- chore(deps): update dependency
[@&#8203;types/node](https://togithub.com/types/node) to ^18.14.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1085
- fix(deps): update patch updates (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1087

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

###
[`v13.3.0`](https://togithub.com/textlint/textlint/releases/tag/v13.3.0)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.2.0...v13.3.0)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Features

- feat(config-loader): add `type` and `ruleKey` to config descriptor by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1074

##### Dependency Updates

- chore(deps): update eslint to ^5.50.0 (minor) by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1069
- chore(deps): update npm to v9.4.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1071
- chore(deps): update dependency
[@&#8203;types/node](https://togithub.com/types/node) to ^18.11.19 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1072

##### Other Changes

- CI: add benchmark script by [@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1065

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

###
[`v13.2.0`](https://togithub.com/textlint/textlint/releases/tag/v13.2.0)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.1.4...v13.2.0)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Features

- feat(textlint-tester): add description field by
[@&#8203;Sean0628](https://togithub.com/Sean0628) in
[textlint/textlint#1067

```js
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

- chore(deps): update dependency textlint-rule-eslint to ^4.0.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1066

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

###
[`v13.1.4`](https://togithub.com/textlint/textlint/releases/tag/v13.1.4)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.1.3...v13.1.4)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Bug Fixes

- fix(kernel): Descriptor#toJSON should return normalized option by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1062

##### Dependency Updates

- chore(deps): update dependency textlint-rule-helper to ^2.3.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1060

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

###
[`v13.1.3`](https://togithub.com/textlint/textlint/releases/tag/v13.1.3)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.1.2...v13.1.3)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Bug Fixes

- fix(textlint): Add `engines` to require Node.js 16+ by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1054

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

###
[`v13.1.2`](https://togithub.com/textlint/textlint/releases/tag/v13.1.2)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.1.1...v13.1.2)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Refactoring

- textlint: improve debug log by [@&#8203;azu](https://togithub.com/azu)
in
[textlint/textlint#1052

##### Testing

- test(textlint): add test for CLI by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1050

##### Dependency Updates

- chore(deps): update npm to v9.4.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1051

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

###
[`v13.1.1`](https://togithub.com/textlint/textlint/releases/tag/v13.1.1)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.1.0...v13.1.1)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Bug Fixes

- fix(textlint): fix regression of .textlintginore by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1048

##### Refactoring

- refactor: cleanup tests by [@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1046

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

###
[`v13.1.0`](https://togithub.com/textlint/textlint/releases/tag/v13.1.0)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.0.5...v13.1.0)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Features

- feat(textlint): support `plugins` for `--init` option by
[@&#8203;chick-p](https://togithub.com/chick-p) in
[textlint/textlint#1039

<!---->

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

will generate `.textlintrc.json`

```json
{
  "plugins": {
    "html": true
  },
  "filters": {},
  "rules": {
    "preset-ja-technical-writing": true
  }
}
```

##### Testing

- test(textlint): remove it.only and use ts-node/esm by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1043

##### Dependency Updates

- chore(deps): update dependency textlint-rule-preset-ja-spacing to
^2.3.0 by [@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1038
- chore(deps): update eslint to ^5.49.0 (minor) by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1040

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

###
[`v13.0.5`](https://togithub.com/textlint/textlint/releases/tag/v13.0.5)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.0.4...v13.0.5)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Bug Fixes

- fix(ast-node-types): remove markdown extension and fix TxtNodeType by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1033
- fix(ast-node-type): fix Node → TxtNode by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1035

This release correct `ast-node-type` types.

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

###
[`v13.0.4`](https://togithub.com/textlint/textlint/releases/tag/v13.0.4)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.0.3...v13.0.4)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Dependency Updates

- chore(deps): update to rc-config-loader@4 by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1031

It will reduce `textlint` package size.


![image](https://user-images.githubusercontent.com/19714/215273144-775c52c3-6377-440c-b086-1b9c9c78a9fc.png)

> 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`](https://togithub.com/textlint/textlint/releases/tag/v13.0.3)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.0.2...v13.0.3)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Refactoring

- refactor(kernel): use fast-equals instead of deep-equal by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1027

It will reduce `@textlint/kernel` package size.

-
https://bundlephobia.com/package/[@&#8203;textlint/kernel](https://togithub.com/textlint/kernel)[@&#8203;13](https://togithub.com/13).0.2
-
https://bundlephobia.com/package/[@&#8203;textlint/kernel](https://togithub.com/textlint/kernel)[@&#8203;13](https://togithub.com/13).0.3

15.1kb ⬇️

##### Dependency Updates

- chore(deps): update dependency
[@&#8203;types/glob](https://togithub.com/types/glob) to ^8.0.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1018
- chore(deps): update npm to v9.3.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#1026

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

###
[`v13.0.2`](https://togithub.com/textlint/textlint/releases/tag/v13.0.2)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.0.1...v13.0.2)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Bug Fixes

- fix(ast-node-types): export { TxtNodeType } by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1024

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

###
[`v13.0.1`](https://togithub.com/textlint/textlint/releases/tag/v13.0.1)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v13.0.0...v13.0.1)

<!-- Release notes generated using configuration in .github/release.yml
at master -->

#### What's Changed

##### Bug Fixes

- fix(ast-node-types): export { TxtNodeRange, TxtNodeLocation,
TxtNodePosition } by [@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1022

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

```diff
- import type { TextNodeRange, TxtNodeLineLocation, TxtNodePosition } from "@&#8203;textlint/ast-node-types";
+ import type { TxtNodeRange, TxtNodeLocation, TxtNodePosition } from "@&#8203;textlint/ast-node-types";
```

##### Refactoring

- refactor: add textlint-script/example\* to workspaces by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1019
- refactor: use npm 9+ instead of yarn v1 by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1020

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

###
[`v13.0.0`](https://togithub.com/textlint/textlint/releases/tag/v13.0.0)

[Compare
Source](https://togithub.com/textlint/textlint/compare/v12.6.1...v13.0.0)

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.

-   Blog: <https://textlint.github.io/blog/2023/01/27/textlint-13.html>

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](https://textlint.github.io/docs/txtnode.html)
- See also [Release v13.0.1 ·
textlint/textlint](https://togithub.com/textlint/textlint/releases/tag/v13.0.1)
    -   ```diff
- import type { TextNodeRange, TxtNodeLineLocation, TxtNodePosition }
from "@&#8203;textlint/ast-node-types";
+ import type { TxtNodeRange, TxtNodeLocation, TxtNodePosition } from
"@&#8203;textlint/ast-node-types";
        ```
-   Use New-CLI instead of Old-CLI
- textlint has introduced New-CLI and New-APIs in
[v12.3.0](https://togithub.com/textlint/textlint/releases/tag/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](https://textlint.github.io/docs/use-as-modules.html))
- 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.

```json5
{
  "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.

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

For more details, see [Configuring textlint ·
textlint](https://textlint.github.io/docs/configuring.html#rule-preset)

#### 🆕 Features

##### Add individual Node type and Add Table/TableRow/TableCell node
[#&#8203;1008](https://togithub.com/textlint/textlint/issues/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`](https://togithub.com/textlint/textlint/tree/master/packages/%40textlint/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.

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

For more details, see
[`@textlint/ast-node-types`](https://togithub.com/textlint/textlint/tree/master/packages/%40textlint/ast-node-types).

-
[`@textlint/ast-node-types/src/NodeType.ts`](https://togithub.com/textlint/textlint/tree/master/packages/%40textlint/ast-node-types/src/NodeType.ts).

#### CHANGELOGS

##### Breaking Changes

- feat(ast-node-types): Add individual Node type and Add
Table/TableRow/TableCell node by [@&#8203;azu](https://togithub.com/azu)
in
[textlint/textlint#1008
- refactor(textlint): use New CLI by default by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1011
- fix(textlint): textlint --init create .textlintrc.json by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1013
- chore: Change "target" to "ES2018" by
[@&#8203;azu](https://togithub.com/azu) in
[textlint/textlint#1014

##### Other Changes

- chore(deps): update node.js to v18 by
[@&#8203;renovate](https://togithub.com/renovate) in
[textlint/textlint#917

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

</details>

---

### 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 becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/ws-4020/mobile-app-crib-notes).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNTIuNSIsInVwZGF0ZWRJblZlciI6IjM0LjE1Mi41In0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

None yet

1 participant