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 96ffce2 commit 710dbe9
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 19 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:` http://asciidoctor.org/docs/user-manual/#header-summary[document attribute].
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/converter/pages/revealjs-plugins.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For example, to disable all the default plugins set the following document attri

== Additional plugins

Additional reveal.js plugins can be installed and activated using AsciiDoc attributes and external javascript files.
Additional reveal.js plugins can be installed and activated using AsciiDoc attributes and external JavaScript files.

. Extract the plugin files in a directory
. Create a JavaScript file that will contain the JavaScript statements to load the plugin (only one required even if you are using several plugins)
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 @@ -63,7 +63,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
11 changes: 6 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 @@ -160,7 +160,8 @@ You can open the generated `.html` in `test/doctest/` in a Web browser.

=== Attribute inheritence

The attr and attr? methods inherit by default. That means if they don't find the attribute defined on the Node, they look on the document.
The `attr` and `attr?` methods inherit by default.
That means if they don't find the attribute defined on the `Node`, they look on the `Document`.

You only want to enable inheritance if you intend to allow an attribute of the same name to be controlled globally.
That might be good for configuring transitions. For instance:
Expand Down Expand Up @@ -221,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 a local asciidoctor-reveal.js version

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 @@ -280,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 710dbe9

Please sign in to comment.