Skip to content

Commit

Permalink
Add textlint terminology rule
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Jan 12, 2021
1 parent 859ec5a commit 3d8296d
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 18 deletions.
20 changes: 13 additions & 7 deletions .textlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ module.exports = {
],
rules: {
//'spelling': true,
'terminology': {
defaultTerms: true,
skip: ['Blockquote', 'CodeBlock'],
terms: [
// checks correct capitalization
'Asciidoctor',
'AsciiDoc',
'Bundler',
'npm',
'Ruby',
'Node',
]
},
'no-repetition': true,
//'title-case': true,
'stop-words': {
skip: ['BlockQuote', 'CodeBlock'],
defaultWords: false,
words: [
// checks correct capitalization
['asciidoctor', 'Asciidoctor'],
['npm', 'npm'],
['asciidoc', 'AsciiDoc'],
['bundler', 'Bundler'],
['ruby', 'Ruby'],
['node', 'Node'],
// checks for use of first person pronouns.
['I'],
['I\'ve'],
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/converter/pages/features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ There are a few ways to have no titles on slides.

See {url-project-repo}/blob/master/examples/concealed-slide-titles.adoc[concealed-slide-titles.adoc].

NOTE: `conceal` and `notitle` have the advantage that the slide still has an id so it can be linked to.
NOTE: `conceal` and `notitle` have the advantage that the slide still has an ID so it can be linked to.

IMPORTANT: Like the first page of an AsciiDoc document, the first slide is handled differently.
To hide the whole slide use the `:notitle:` xref:asciidoc:document:header-ref.adoc[document attribute].
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/converter/pages/syntax/background.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ It sets reveal.js`' `data-background-image` attribute.
The `size` attribute is also supported.
See the link:{url-revealjs-doc}#image-backgrounds[relevant reveal.js documentation] for details.

NOTE: Background images file names are now relative to the `:imagesdir:` attribute if set.
NOTE: Background images filenames are now relative to the `:imagesdir:` attribute if set.

NOTE: The `canvas` keyword can be used instead of `background` for the same effect.

Expand Down
10 changes: 5 additions & 5 deletions docs/modules/project/pages/hacking.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To understand what you have access to in templates you can inject some Ruby.
With the slim templating system, this is done by prepending the lines with a dash (`-`) and inserting a Ruby statement.
Two complementary approaches can be used to explore the context offered by Asciidoctor through the template system:

* logging on the command line via print-like statements
* logging on the command-line via print-like statements
* jump into the context through an interactive debugger

[NOTE]
Expand Down Expand Up @@ -185,7 +185,7 @@ Relevant documentation: {url-asciidoctor-abstractnode-attr}

== Merge / Review policy

Any non-trivial change should be integrated in master via a pull-request.
Any non-trivial change should be integrated in `master` branch via a pull-request.
This gives the community a chance to participate and helps write better code because it encourages people to review their own patches.

Pull requests should come from personal forks in order not the clutter the upstream repository.
Expand Down Expand Up @@ -222,11 +222,11 @@ You can apply that label to a pull request that is complete and ready for review

Makes triaging easier.

== Node package
== Node.js package

=== Test locally

In order to test the Node package, you first need to build the converter into JavaScript and create a tarball of the project.
In order to test the Node.js package, you first need to build the converter into JavaScript and create a tarball of the project.

$ bundle exec rake build:js
$ npm pack
Expand Down Expand Up @@ -281,7 +281,7 @@ For example:

npx --node-arg=--inspect-brk asciidoctor-revealjs -v presentation.adoc

Then open the Chrome Dev Tools and click on the Node logo in the top left corner.
Then open the Chrome Dev Tools and click on the Node.js logo in the top left corner.


== RubyGem package
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/setup/pages/node-js-setup.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
= Node / JavaScript Setup
:navtitle: Node / JavaScript
= Node.js / JavaScript Setup
:navtitle: Node.js / JavaScript

== Prerequisites

First you must install and configure {url-nodejs-download}[Node] on your machine.
First you must install and configure {url-nodejs-download}[Node.js] on your machine.

[[node-install]]
== Install
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/setup/pages/standalone-executable.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Pre-built binary packages can be downloaded from our {url-project-repo}/releases[GitHub release page].
We provide them for Windows 64-bit, Linux 64-bit and macOS 64-bit (x86-64).
Open an issue if your platform isn't supported.
The executables are built using the xref:node-js-setup.adoc[Node / JavaScript] toolchain.
The executables are built using the xref:node-js-setup.adoc[Node.js / JavaScript] toolchain.

== Install

Expand Down
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"textlint-rule-no-repetition": "git+https://github.com/mogztter/textlint-rule-no-repetition.git#main",
"textlint-rule-spelling": "^0.3.0",
"textlint-rule-stop-words": "^2.0.9",
"textlint-rule-terminology": "^2.1.4",
"textlint-rule-title-case": "^1.0.0"
}
}

0 comments on commit 3d8296d

Please sign in to comment.