This is a textlint preset used by documentation repositories of elastic path. It consist of the textlint rules and there configurations as per the documentation practices followed by elastic path.
Since this is a textlint preset, first install textlint by following the textlint getting started guide.
This is published as an npm package that can be installed as follows
- Using npm
npm install textlint-rule-preset-elasticpath
- Using yarn
yarn add textlint-rule-preset-elasticpath
- Create a
.textlintrc
file if none exists - Add the following configuration
{ "rules": { "preset-elasticpath": true } }
Please refer to configuring textlint for further details on configuring textlint
For any kind of contribution first follow these steps
- Install git and npm
- Clone this repository with command
git clone git@code.elasticpath.com:internal-pd/docs-tools-textlint-rule-preset.git
- Navigate to the repository
- Run
npm install
- Add the rule as npm dependency by running
npm install rule-package-name
- Add the
rule-package-name
as an element of json array inrulePackages.json
- By default all the rules added to
rulePackages.json
are enabled with default configuration. If custom configurations are required for this rule, add them incustomRulesConfig.js
. Note the key of custom configurations must berule-package-name
Modify customRulesConfig.js
as needed
- Remove rule from dependencies by running
npm uninstall rule-package-name --save
- Remove rule from the array in
rulePackages.json
- If the rule have custom configuration in
customRulesConfig.js
, remove those configurations and key value pair for the rule from the exported object.
- Check that the proposed changes passes against all the elastic path documentation projects
- Create a merge request and tag the maintainer for review