@textlint/types
TypeScript icon, indicating that this package has built-in type declarations

15.2.1 • Public • Published

@textlint/types

Type definition and Typed object package for textlint and textlint rule.

If you import types from @textlint/kernel in your rule module, please use @textlint/types instead of it.

Types

Rule types

Rule types includes following definition.

  • Rule module types
  • Rule report function types
  • Rule Context types

Rule types is depended from textlint's rule module and @textlint/kernel. By contrasts, textlint's rule module should not depended on @textlint/kernel

  • OK: Rule types <--- Rule module
  • OK: Rule types <--- Kernel module
  • NG: Kernel module <--- Rule module
  • NG: Kernel module ---> Rule module

Abstraction Layer

@textlint/types does not includes implementations. In other words, It has only type definition file.

Install

Install with npm:

npm install @textlint/types

Usage

import type { TextlintSourceCode, TextlintSourceCodeArgs, TextlintSourceCodeLocation, TextlintSourceCodePosition, TextlintSourceCodeRange } from "@textlint/types";
import type { TextlintRuleContextFixCommand } from "@textlint/types";
import type { TextlintRuleContextFixCommandGenerator } from "@textlint/types";
import type { TextlintRuleError, TextlintRuleErrorPadding, TextlintRuleReportedObject } from "@textlint/types";
import type { TextlintRuleSeverityLevel } from "@textlint/types";
import type { TextlintRuleContext, TextlintRuleContextArgs, TextlintRuleContextReportFunction, TextlintRuleContextReportFunctionArgs } from "@textlint/types";
import type { TextlintRuleOptions } from "@textlint/types";
import type { TextlintRuleReporter, TextlintFixableRuleModule, TextlintRuleModule, TextlintRuleReportHandler } from "@textlint/types";
import type { TextlintFilterRuleContext, TextlintFilterRuleShouldIgnoreFunction, TextlintFilterRuleShouldIgnoreFunctionArgs } from "@textlint/types";
import type { TextlintFilterRuleModule, TextlintFilterRuleOptions, TextlintFilterRuleReporter, TextlintFilterRuleReportHandler } from "@textlint/types";
import type { TextlintPluginCreator, TextlintPluginOptions, TextlintPluginProcessor, TextlintPluginProcessorConstructor } from "@textlint/types";

FAQ

Occur incompatible types between @textlint/types and other module like textlint-rule-helper

You should check if your @textlint/types dependencies is duplicated.

@textlint/types should be deduped.

npm ls @textlint/types

If your dependencies is duplicated, you should update modules that are depended on @textlint/types.

Versioning Policy

@textlint/types is not semantic versioning. Because, This library provide only TypeScript definition.

It is hard that we follow a semantic versioning.

  • patch: fix bugs, maybe includes breaking change
  • minor: add new types, maybe includes breaking change
  • major: includes breaking change

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
13.4.2-next.00next
12.0.0-beta.30beta
15.2.176,767latest

Version History

VersionDownloads (Last 7 Days)Published
15.2.176,767
15.2.027,646
15.1.1686
15.1.01,112
15.0.1148
15.0.015
14.8.483,636
14.8.31
14.8.11,135
14.8.02,092
14.7.215,111
14.7.16,831
14.7.00
14.6.06,194
14.5.0905
14.4.29,428
14.4.10
14.4.0868
14.3.01,464
14.2.13,551
14.2.01,020
14.1.00
14.0.5177
14.0.41,305
14.0.3813
14.0.23
14.0.153
14.0.0208
13.4.2-next.00
13.4.129,281
13.4.013
13.3.32,419
13.3.21,184
13.3.116
13.3.014
13.2.0160
13.1.42
13.1.30
13.1.20
13.1.131
13.1.039
13.0.56
13.0.40
13.0.30
13.0.24
13.0.10
13.0.05
12.6.123,317
12.6.023
12.5.20
12.5.0160
12.3.01
12.2.3272
12.2.2763
12.2.11,244
12.2.00
12.1.14,267
12.1.01,589
12.0.2598
12.0.02,385
12.0.0-beta.30
12.0.0-beta.20
12.0.0-beta.10
12.0.0-beta.00
1.5.55,721
1.5.4116
1.5.316
1.5.2105
1.5.11
1.5.00
1.4.6118
1.4.53,550
1.4.40
1.4.30
1.4.20
1.4.10
1.4.00
1.3.1504
1.3.01,309
1.2.31,667
1.2.2140
1.2.149
1.2.00
1.1.5225
1.1.40
1.1.3261
1.1.217
1.1.10
1.1.00

Package Sidebar

Install

npm i @textlint/types

Weekly Downloads

322,761

Version

15.2.1

License

MIT

Unpacked Size

74.4 kB

Total Files

83

Last publish

Collaborators

  • azu
  • textlint-user