Skip to content

textlint/textlint-rule-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

textlint-rule template

This is TEMPLATE REPOSITORY for creating textlint rule.

Install

Requirement:

  • Git
  • Node.js 16+
  • npm 8+

Use create-textlint-rule:

$ npx create-textlint-rule example

Or, Run following steps manually:

ruleName="textlint-rule-<rule-name>"
git clone --depth=1 https://github.com/textlint/textlint-rule-template.git ${ruleName}
cd ${ruleName}
# Initialize git
rm -rf .git/
rm -rf .github/
git init
# Initialize npm
npm init
npm install
# Initialize README
# Notice: force update exist README.md
./node_modules/.bin/textlint-scripts init

Usage

See textlint-scripts for more details.

Build

Builds source codes for publish to the lib folder. You can write ES2015+ source codes in src/ folder.

npm run build

Tests

Run test code in test folder. Test textlint rule by textlint-tester.

npm test

Publish

Publish your rule to npm.

# Update version and git tag `patch` or `minor` or `major`
npm version {patch|minor|major}
npm publish

How to write textlint rule?

See documents.

About

This is TEMPLATE REPOSITORY for creating textlint rule.

Topics

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •