Skip to content

Commit

Permalink
feat: adding text linting
Browse files Browse the repository at this point in the history
  • Loading branch information
prisis committed Feb 4, 2021
1 parent da65f92 commit ef17216
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 3 deletions.
1 change: 1 addition & 0 deletions common/autoinstallers/rush-commitlint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
}
},
"dependencies": {
"commitizen": "^4.2.3",
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@commitlint/core": "11.0.0",
Expand Down
2 changes: 2 additions & 0 deletions common/autoinstallers/rush-commitlint/pnpm-lock.yaml

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

14 changes: 14 additions & 0 deletions common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@
"autoinstallerName": "rush-commitlint",
"shellCommand": "commitlint"
},
{
"name": "commitizen",
"commandKind": "global",
"summary": "Used by the prepare-commit-msg Git hook. This command invokes commitizen to lint text files.",
"autoinstallerName": "rush-commitlint",
"shellCommand": "cz"
},
{
"name": "jest",
"commandKind": "global",
Expand Down Expand Up @@ -348,6 +355,13 @@
"argumentName": "COMMIT_EDITMSG",
"associatedCommands": ["commitlint"],
"required": false
},
{
"parameterKind": "flag",
"longName": "--hook",
"description": "A custom flag parameter that is passed to the scripts that are invoked when commitizen",
"associatedCommands": ["commitizen"],
"required": false
}
]
}
9 changes: 9 additions & 0 deletions common/git-hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

echo --------------------------------------------
echo Starting Git hook: prepare-commit-msg

exec < /dev/tty && common/scripts/install-run-rush.js commitizen --hook || true

echo Finished Git hook: prepare-commit-msg
echo --------------------------------------------
5 changes: 2 additions & 3 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
},
"main": "index.js",
"files": [
"base.js",
"index.js",
"typescript.js",
"react.js",
"config.js",
"rules",
"lib",
"README.md",
"CHANGELOG.md",
"LICENSE.md"
Expand Down
8 changes: 8 additions & 0 deletions packages/textlint/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package-lock.json

src
__tests__
__stories__
__fixture__
.rpt2_cache

21 changes: 21 additions & 0 deletions packages/textlint/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Anolilab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Empty file added packages/textlint/README.md
Empty file.
Empty file.
53 changes: 53 additions & 0 deletions packages/textlint/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "@anolilab/textlint",
"version": "0.0.0",
"private": false,
"description": "Anolilab Coding Standard for text linting.",
"keywords": [
"css",
"anolilab",
"lint",
"text",
"textlint"
],
"homepage": "http://anolilab.com/nodejs/packages/browserslist-config",
"repository": "https://github.com/anolilab/javascript-style-guide.git",
"license": "MIT",
"author": {
"name": "Daniel Bannert",
"email": "d.bannert@anolilab.de"
},
"files": [
"lib",
"index.js",
"README.md",
"CHANGELOG.md",
"LICENSE.md"
],
"scripts": {
"postinstall": "node lib/postinstall.js"
},
"dependencies": {
"@textlint-rule/textlint-rule-no-invalid-control-character": "1.2.0",
"@textlint-rule/textlint-rule-no-unmatched-pair": "1.0.7",
"@textlint-rule/textlint-rule-preset-google": "0.1.2",
"textlint": "11.8.1",
"textlint-rule-abbr-within-parentheses": "1.0.2",
"textlint-rule-alex": "3.0.0",
"textlint-rule-apostrophe": "2.0.0",
"textlint-rule-common-misspellings": "1.0.1",
"textlint-rule-diacritics": "1.0.0",
"textlint-rule-en-capitalization": "2.0.3",
"textlint-rule-footnote-order": "1.0.3",
"textlint-rule-helper": "2.1.1",
"textlint-rule-no-dead-link": "4.7.0",
"textlint-rule-no-empty-section": "1.1.0",
"textlint-rule-no-todo": "2.0.1",
"textlint-rule-terminology": "2.1.5",
"textlint-rule-write-good": "1.6.2",
"write-good": "1.0.4"
},
"publishConfig": {
"access": "public"
}
}

0 comments on commit ef17216

Please sign in to comment.