├── .changeset ├── README.md └── config.json ├── .github ├── release.yml └── workflows │ ├── prepare-release.yml │ ├── release.yml │ ├── test.yml │ └── website.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── example ├── .textlintrc.json ├── package-lock.json └── package.json ├── lib └── textlint-rule-preset-ja-technical-writing.js ├── package-lock.json ├── package.json ├── renovate.json └── test └── textlint-rule-preset-ja-technical-writing-test.js /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | このリポジトリは[Changesets](https://github.com/atlassian/changesets)を使ったリリース管理をしています。 4 | Pull Requestを出すと、`.changesets/UNIQUE_ID.md` に変更履歴を書くように要求されます。 5 | 6 | changesetファイルには、次の形式で変更点を書いていきます。 7 | 8 | 既存のルールを更新するとき 9 | 10 | ```markdown 11 | --- 12 | "textlint-rule-preset-ja-technical-writing": major 13 | --- 14 | 15 | :sparkles: [ルール名](https://example.com)をアップデート 16 | 17 | 変更点の解説 18 | 19 | ``` 20 | 21 | 新しいルールを追加するとき 22 | 23 | ```markdown 24 | --- 25 | "textlint-rule-preset-ja-technical-writing": major 26 | --- 27 | 28 | :new: [ルール名](https://example.com)を追加 29 | 30 | 追加したルールの解説 31 | 32 | ``` 33 | 34 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 35 | with multi-package repos, or single-package repos to help you version and publish your code. You can 36 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 37 | 38 | We have a quick list of common questions to get you started engaging with this project in 39 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 40 | 41 | 42 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "linked": [], 6 | "access": "public", 7 | "baseBranch": "master", 8 | "updateInternalDependencies": "minor", 9 | "ignore": [] 10 | } 11 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | changelog: 2 | exclude: 3 | labels: 4 | - 'Type: Meta' 5 | - 'Type: Question' 6 | - 'Type: Release' 7 | 8 | categories: 9 | - title: Security Fixes 10 | labels: ['Type: Security'] 11 | - title: Breaking Changes 12 | labels: ['Type: Breaking Change'] 13 | - title: Features 14 | labels: ['Type: Feature'] 15 | - title: Bug Fixes 16 | labels: ['Type: Bug'] 17 | - title: Documentation 18 | labels: ['Type: Documentation'] 19 | - title: Refactoring 20 | labels: ['Type: Refactoring'] 21 | - title: Testing 22 | labels: ['Type: Testing'] 23 | - title: Maintenance 24 | labels: ['Type: Maintenance'] 25 | - title: CI 26 | labels: ['Type: CI'] 27 | - title: Dependency Updates 28 | labels: ['Type: Dependencies', "dependencies"] 29 | - title: Other Changes 30 | labels: ['*'] 31 | -------------------------------------------------------------------------------- /.github/workflows/prepare-release.yml: -------------------------------------------------------------------------------- 1 | name: Create ReleaseIssue 2 | on: 3 | schedule: 4 | # 1月/7月にリリース 5 | - cron: "0 0 1 */6 *" 6 | 7 | jobs: 8 | create_issue: 9 | name: Create ReleaseIssue 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: write 13 | steps: 14 | - name: Create team sync issue 15 | uses: imjohnbo/issue-bot@v3.4 16 | with: 17 | assignees: "azu" 18 | labels: "Type: Release" 19 | title: "Next Release" 20 | body: | 21 | ### 次のリリースの準備ができました 22 | 23 | - [ ] マージ忘れのPRがないかを確認 24 | - [ ] Version PackagesのPRをマージ 25 | - [ ] 新しいバージョンがリリースされたことを確認 26 | 27 | pinned: false 28 | close-previous: true 29 | env: 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | permissions: 9 | contents: write 10 | pull-requests: write 11 | 12 | jobs: 13 | release: 14 | name: Release 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout Repo 18 | uses: actions/checkout@v4 19 | with: 20 | # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits 21 | fetch-depth: 0 22 | - name: Setup Node.js 23 | uses: actions/setup-node@v4 24 | with: 25 | registry-url: 'https://registry.npmjs.org' # to create .npmrc file with NODE_AUTH_TOKEN 26 | node-version: 22 27 | - name: Install Dependencies 28 | run: npm ci 29 | - name: Create Release Pull Request or Publish to npm 30 | id: changesets 31 | uses: changesets/action@v1 32 | with: 33 | publish: npm run release 34 | env: 35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 36 | NPM_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }} 37 | NODE_AUTH_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }} 38 | - name: Publish next snapshot 39 | if: steps.changesets.outputs.published != 'true' 40 | run: | 41 | git checkout master # reset current branch to master 42 | npm exec -- changeset version --snapshot next 43 | npm exec -- changeset publish --no-git-tag --snapshot --tag next 44 | env: 45 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 46 | NPM_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }} 47 | NODE_AUTH_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }} 48 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test 2 | on: [ push, pull_request ] 3 | env: 4 | CI: true 5 | jobs: 6 | test: 7 | name: "Test on Node.js ${{ matrix.node_version }}" 8 | runs-on: ubuntu-latest 9 | strategy: 10 | matrix: 11 | node_version: [ 18, 20, 22 ] 12 | steps: 13 | - name: checkout 14 | uses: actions/checkout@v4 15 | - name: setup Node.js ${{ matrix.node_version }} 16 | uses: actions/setup-node@v4 17 | with: 18 | node-version: ${{ matrix.node_version }} 19 | - name: Install 20 | run: npm ci 21 | - name: Test 22 | run: npm test 23 | -------------------------------------------------------------------------------- /.github/workflows/website.yml: -------------------------------------------------------------------------------- 1 | name: website 2 | on: 3 | push: 4 | branches: 5 | - master 6 | workflow_dispatch: 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - name: Setup Node.js 14 | uses: actions/setup-node@v4 15 | with: 16 | node-version: 22 17 | - name: Set Env 18 | run: | 19 | echo "OWNER_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}')" >> $GITHUB_ENV 20 | echo "REPO_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')" >> $GITHUB_ENV 21 | echo "CURRENT_VERSION=$(node -p 'require("./package.json").version')" >> $GITHUB_ENV 22 | - name: Install 23 | run: npm ci 24 | - name: Build 25 | run: | 26 | npm ci 27 | npm run website -- --metadataVersion="${CURRENT_VERSION}" 28 | env: 29 | OWNER_NAME: ${{ env.OWNER_NAME }} 30 | REPO_NAME: ${{ env.REPO_NAME }} 31 | CURRENT_VERSION: ${{ env.CURRENT_VERSION }} 32 | working-directory: example/ 33 | - name: Deploy 34 | uses: peaceiris/actions-gh-pages@v4 35 | with: 36 | github_token: ${{ secrets.GITHUB_TOKEN }} 37 | publish_dir: ./example/dist 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | ### https://raw.github.com/github/gitignore/608690d6b9a78c2a003affc792e49a84905b3118/Node.gitignore 3 | 4 | # Logs 5 | logs 6 | *.log 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | 13 | # Directory for instrumented libs generated by jscoverage/JSCover 14 | lib-cov 15 | 16 | # Coverage directory used by tools like istanbul 17 | coverage 18 | 19 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 20 | .grunt 21 | 22 | # node-waf configuration 23 | .lock-wscript 24 | 25 | # Compiled binary addons (http://nodejs.org/api/addons.html) 26 | build/Release 27 | 28 | # Dependency directory 29 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- 30 | node_modules 31 | 32 | # Debug log from npm 33 | npm-debug.log 34 | 35 | 36 | ### https://raw.github.com/github/gitignore/608690d6b9a78c2a003affc792e49a84905b3118/Global/JetBrains.gitignore 37 | 38 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 39 | 40 | *.iml 41 | 42 | ## Directory-based project format: 43 | .idea/ 44 | # if you remove the above rule, at least ignore the following: 45 | 46 | # User-specific stuff: 47 | # .idea/workspace.xml 48 | # .idea/tasks.xml 49 | # .idea/dictionaries 50 | 51 | # Sensitive or high-churn files: 52 | # .idea/dataSources.ids 53 | # .idea/dataSources.xml 54 | # .idea/sqlDataSources.xml 55 | # .idea/dynamic.xml 56 | # .idea/uiDesigner.xml 57 | 58 | # Gradle: 59 | # .idea/gradle.xml 60 | # .idea/libraries 61 | 62 | # Mongo Explorer plugin: 63 | # .idea/mongoSettings.xml 64 | 65 | ## File-based project format: 66 | *.ipr 67 | *.iws 68 | 69 | ## Plugin-specific files: 70 | 71 | # IntelliJ 72 | out/ 73 | 74 | # mpeltonen/sbt-idea plugin 75 | .idea_modules/ 76 | 77 | # JIRA plugin 78 | atlassian-ide-plugin.xml 79 | 80 | # Crashlytics plugin (for Android Studio and IntelliJ) 81 | com_crashlytics_export_strings.xml 82 | crashlytics.properties 83 | crashlytics-build.properties 84 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # textlint-rule-preset-ja-technical-writing 2 | 3 | ## 12.0.2 4 | 5 | ### Patch Changes 6 | 7 | - dba9f59: CI: prevent snapshot release from branch 8 | 9 | ## 12.0.1 10 | 11 | ### Patch Changes 12 | 13 | - c1881a7: ReRelease 14 | 15 | ## 12.0.0 16 | 17 | ### Major Changes 18 | 19 | - a2089cb: Re Relase 20 | 21 | ## 11.0.0 22 | 23 | ### Major Changes 24 | 25 | - e9893b5: fix(deps): update dependency textlint-rule-preset-jtf-style to v3 26 | 27 | Node.js 18+が必要になります。peerDependencies の記述の改善など 28 | https://github.com/textlint-ja/textlint-rule-preset-JTF-style/releases/tag/v3.0.0 29 | 30 | ### Patch Changes 31 | 32 | - 1e7958b: Node.js 16 のサポートを終了しました 33 | - a00b809: ⬆️ @textlint-rule/textlint-rule-no-invalid-control-character@v3 34 | 35 | - Node.js 18+が必要になります。 36 | 37 | ## 10.0.1 38 | 39 | ### Patch Changes 40 | 41 | - ac442b6: CI: merge snapshot release 42 | 43 | ## 10.0.0 44 | 45 | ### Major Changes 46 | 47 | - 3e3b2d5: fix(deps): update dependency textlint-rule-no-mix-dearu-desumasu to v6 48 | 49 | 文体が統一されていても preferIn 設定に違反する場合は、エラーとなるように変更 50 | 以前は、prefer とは異なる文体に統一されていた時にエラーになっていませんでした。 51 | https://github.com/textlint-ja/textlint-rule-no-mix-dearu-desumasu/releases/tag/v6.0.0 52 | 53 | ## 9.0.0 54 | 55 | ### Major Changes 56 | 57 | - c270fed: [sentence-splitter v5.0.0](https://github.com/textlint-rule/sentence-splitter/releases/tag/v5.0.0)へのアップデートに対応する変更が含まれています。 58 | 59 | > [!WARNING] 60 | > Node.js 18+が必要になります。 61 | 62 | 次のルールをアップデートしています。 63 | 64 | - [textlint-rule/textlint-rule-no-unmatched-pair](https://github.com/textlint-rule/textlint-rule-no-unmatched-pair) 65 | - [Release v2.0.2 · textlint-rule/textlint-rule-no-unmatched-pair](https://github.com/textlint-rule/textlint-rule-no-unmatched-pair/releases/tag/v2.0.2) 66 | - [textlint-ja/textlint-rule-max-ten: textlint rule that limit maxinum ten(、) count of sentence.](https://github.com/textlint-ja/textlint-rule-max-ten) 67 | - [Release v5.0.0 · textlint-ja/textlint-rule-max-ten](https://github.com/textlint-ja/textlint-rule-max-ten/releases/tag/v5.0.0) 68 | - [textlint-ja/textlint-rule-no-doubled-conjunction: textlint plugin to check duplicated same conjunctions.](https://github.com/textlint-ja/textlint-rule-no-doubled-conjunction) 69 | - [Release v3.0.0 · textlint-ja/textlint-rule-no-doubled-conjunction](https://github.com/textlint-ja/textlint-rule-no-doubled-conjunction/releases/tag/v3.0.0) 70 | - [textlint-ja/textlint-rule-no-doubled-conjunctive-particle-ga: textlint rule plugin to check duplicated conjunctive particle `ga` in a sentence.](https://github.com/textlint-ja/textlint-rule-no-doubled-conjunctive-particle-ga) 71 | - [Release v3.0.0 · textlint-ja/textlint-rule-no-doubled-conjunctive-particle-ga](https://github.com/textlint-ja/textlint-rule-no-doubled-conjunctive-particle-ga/releases/tag/v3.0.0) 72 | - [textlint-ja/textlint-rule-no-doubled-joshi: 文中に同じ助詞が複数出てくるのをチェックする textlint ルール](https://github.com/textlint-ja/textlint-rule-no-doubled-joshi) 73 | - [Release v5.0.0 · textlint-ja/textlint-rule-no-doubled-joshi](https://github.com/textlint-ja/textlint-rule-no-doubled-joshi/releases/tag/v5.0.0) 74 | - [textlint-rule/textlint-rule-sentence-length: textlint rule that limit maximum length of sentence.](https://github.com/textlint-rule/textlint-rule-sentence-length) 75 | - [Release v5.0.0 · textlint-rule/textlint-rule-sentence-length](https://github.com/textlint-rule/textlint-rule-sentence-length/releases/tag/v5.0.0) 76 | - [textlint-rule/textlint-rule-max-comma: textlint rule is that limit maximum comma(,) count of sentence.](https://github.com/textlint-rule/textlint-rule-max-comma) 77 | - [Release v4.0.0 · textlint-rule/textlint-rule-max-comma](https://github.com/textlint-rule/textlint-rule-max-comma/releases/tag/v4.0.0) 78 | - [textlint-ja/textlint-rule-max-ten: textlint rule that limit maxinum ten(、) count of sentence.](https://github.com/textlint-ja/textlint-rule-max-ten) 79 | - [Release v5.0.0 · textlint-ja/textlint-rule-max-ten](https://github.com/textlint-ja/textlint-rule-max-ten/releases/tag/v5.0.0) 80 | 81 | **Note** 82 | 83 | [GitHub に追加](https://github.com/orgs/community/discussions/16925)された次の構文で、一部ルールに影響が出ていました。 84 | 85 | ``` 86 | > [!NOTE] 87 | > some content 88 | ``` 89 | 90 | この構文が sentence-splitter v3 だと正しく解析できないため、sentence-splitter v5 へアップデートしています。 91 | 92 | ## 8.0.0 93 | 94 | ### Major Changes 95 | 96 | - 8d685f3: Update dependency textlint-rule-max-comma to v3 97 | 98 | Node.js 16+が必要になります。 99 | 100 | - 33b2a7f: - update dependency textlint-rule-ja-no-mixed-period to v3 101 | 102 | Node.js 16+が必要になっています。 103 | 104 | - d393923: chore(deps): update textlint-rule-sentence-length@4 105 | 106 | - Node.js 16+が必要となりました 107 | - `exclusionPatterns`オプションが廃止されたため、 `skipPatterns`オプションを利用してください 108 | - https://github.com/textlint-rule/textlint-rule-sentence-length/releases/tag/v4.0.0 109 | 110 | - ad91c7a: fix(deps): update dependency textlint-rule-no-hankaku-kana to v2 111 | 112 | - https://github.com/textlint-ja/textlint-rule-no-hankaku-kana/releases/tag/v2.0.0 113 | - Node.js 14+が必要になりました 114 | - textlint v12.3.0 が必要になりました 115 | 116 | - cd3d790: fix(deps): update dependency textlint-rule-no-nfd to v2 117 | 118 | textlint v12.2.0+が必要になります。 119 | 120 | ### Patch Changes 121 | 122 | - ae7c716: docs: オプションを完全なものに変更。ルールの説明を書き直し 123 | 124 | README のオプション表記やルールの説明を書き直しました。 125 | 126 | ## 7.0.0 127 | 128 | ### Major Changes 129 | 130 | - ac46d78: :sparkles: [textlint-rule/textlint-rule-sentence-length v3.0.0](https://github.com/textlint-rule/textlint-rule-sentence-length/releases/v3.0.0)へアップデート 131 | 132 | 3.0.0 では、デフォルトでは次のような URL そのものがリンクとなっているケースをカウントしないようになっています。 133 | 134 | > Very long URL. 135 | 136 | - 6c1d348: :new: [textlint-rule-no-zero-width-spaces](https://github.com/textlint-rule/textlint-rule-no-zero-width-spaces)を追加 137 | 138 | ゼロ幅スペース(`\u200b`)が文章に入るのを防止するルールです。 139 | 140 | - 55f945a: :sparkles: [textlint-rule/textlint-rule-no-invalid-control-character v2.0.0](https://github.com/textlint-rule/textlint-rule-no-invalid-control-character/releases/tag/v2.0.0)へ更新 141 | 142 | デフォルトで img の alt 内に制御文字列が含まれているかをチェックするようになります。 143 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 azu 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # textlint-rule-preset-ja-technical-writing [![test](https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/actions/workflows/test.yml/badge.svg)](https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/actions/workflows/test.yml) 2 | 3 | 技術文書向けの[textlint](https://textlint.github.io/)ルールプリセットです。 4 | 全体的に少し厳しめの設定がデフォルト値となっているため、文章に合わせて設定値を変更する必要があります。 5 | 6 | また、[連続できる最大の漢字長は6文字まで](#%E9%80%A3%E7%B6%9A%E3%81%A7%E3%81%8D%E3%82%8B%E6%9C%80%E5%A4%A7%E3%81%AE%E6%BC%A2%E5%AD%97%E9%95%B7%E3%81%AF6%E6%96%87%E5%AD%97%E3%81%BE%E3%81%A7) 7 | のように文章全体として例外が必ず出てくるルールもデフォルトで入っています。 ルールによっては`allow`オプションで例外を規定できるようになっているため、例外を明示しつつ利用することを想定しています。 8 | 9 | 合わせて利用することを想定しているfilterルール(例外を明示できる)も参照してください。 10 | 11 | - [textlint/textlint-filter-rule-comments](https://github.com/textlint/textlint-filter-rule-comments) 12 | - [textlint/textlint-filter-rule-allowlist](https://github.com/textlint/textlint-filter-rule-allowlist) 13 | 14 | 16 | 17 | ## Install 18 | 19 | [npm](https://www.npmjs.com/)コマンドを使ってインストールできます。 20 | 21 | npm install textlint-rule-preset-ja-technical-writing 22 | 23 | 安定版は、半年(1月と7月)に一度更新されます。 24 | 25 | 次のように`@next`をつけることで、次期バージョンをインストールして試せます。 26 | 安定版と次期バージョンの差分は[Version PackagesのPR](https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/pulls?q=is%3Apr+is%3Aopen+Version+Packages)で確認できます。 27 | 28 | npm install textlint-rule-preset-ja-technical-writing@next 29 | 30 | もし、次期バージョンを利用してみて問題があった場合は、コメントでお知らせください。 31 | 32 | ## Usage 33 | 34 | Via `.textlintrc.json`(Recommended) 35 | 36 | ```json 37 | { 38 | "rules": { 39 | "preset-ja-technical-writing": true 40 | } 41 | } 42 | ``` 43 | 44 | Via CLI 45 | 46 | ``` 47 | textlint --preset ja-technical-writing README.md 48 | ``` 49 | 50 | ## ルールの設定方法 51 | 52 | 次のように `"preset-ja-technical-writing"` 以下にそれぞれのオプション値を指定することで、設定を変更できます。 53 | 各ルールの設定できるオプションは、各ルールのREADMEを参照してください。 54 | 55 | ```json 56 | { 57 | "rules": { 58 | "preset-ja-technical-writing": { 59 | "max": 120, 60 | "no-mix-dearu-desumasu": false 61 | } 62 | } 63 | } 64 | ``` 65 | 66 | また、ルールの設定方法については[textlintのドキュメント](https://textlint.github.io/docs/configuring.html#rule-preset)も参照してください。 67 | 68 | ## ルール一覧 69 | 70 | 71 | 72 | * [1文の長さは100文字以下とする](#1%E6%96%87%E3%81%AE%E9%95%B7%E3%81%95%E3%81%AF100%E6%96%87%E5%AD%97%E4%BB%A5%E4%B8%8B%E3%81%A8%E3%81%99%E3%82%8B) 73 | * [カンマは1文中に3つまで](#%E3%82%AB%E3%83%B3%E3%83%9E%E3%81%AF1%E6%96%87%E4%B8%AD%E3%81%AB3%E3%81%A4%E3%81%BE%E3%81%A7) 74 | * [読点は1文中に3つまで](#%E8%AA%AD%E7%82%B9%E3%81%AF1%E6%96%87%E4%B8%AD%E3%81%AB3%E3%81%A4%E3%81%BE%E3%81%A7) 75 | * [連続できる最大の漢字長は6文字まで](#%E9%80%A3%E7%B6%9A%E3%81%A7%E3%81%8D%E3%82%8B%E6%9C%80%E5%A4%A7%E3%81%AE%E6%BC%A2%E5%AD%97%E9%95%B7%E3%81%AF6%E6%96%87%E5%AD%97%E3%81%BE%E3%81%A7) 76 | * [漢数字と算用数字を使い分けます](#%E6%BC%A2%E6%95%B0%E5%AD%97%E3%81%A8%E7%AE%97%E7%94%A8%E6%95%B0%E5%AD%97%E3%82%92%E4%BD%BF%E3%81%84%E5%88%86%E3%81%91%E3%81%BE%E3%81%99) 77 | * [「ですます調」、「である調」を統一します](#%E3%81%A7%E3%81%99%E3%81%BE%E3%81%99%E8%AA%BF%E3%81%A7%E3%81%82%E3%82%8B%E8%AA%BF%E3%82%92%E7%B5%B1%E4%B8%80%E3%81%97%E3%81%BE%E3%81%99) 78 | * [文末の句点記号として「。」を使います](#%E6%96%87%E6%9C%AB%E3%81%AE%E5%8F%A5%E7%82%B9%E8%A8%98%E5%8F%B7%E3%81%A8%E3%81%97%E3%81%A6%E3%82%92%E4%BD%BF%E3%81%84%E3%81%BE%E3%81%99) 79 | * [二重否定は使用しない](#%E4%BA%8C%E9%87%8D%E5%90%A6%E5%AE%9A%E3%81%AF%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 80 | * [ら抜き言葉を使用しない](#%E3%82%89%E6%8A%9C%E3%81%8D%E8%A8%80%E8%91%89%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 81 | * [逆接の接続助詞「が」を連続して使用しない](#%E9%80%86%E6%8E%A5%E3%81%AE%E6%8E%A5%E7%B6%9A%E5%8A%A9%E8%A9%9E%E3%81%8C%E3%82%92%E9%80%A3%E7%B6%9A%E3%81%97%E3%81%A6%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 82 | * [同じ接続詞を連続して使用しない](#%E5%90%8C%E3%81%98%E6%8E%A5%E7%B6%9A%E8%A9%9E%E3%82%92%E9%80%A3%E7%B6%9A%E3%81%97%E3%81%A6%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 83 | * [同じ助詞を連続して使用しない](#%E5%90%8C%E3%81%98%E5%8A%A9%E8%A9%9E%E3%82%92%E9%80%A3%E7%B6%9A%E3%81%97%E3%81%A6%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 84 | * [UTF8-MAC 濁点を使用しない](#utf8-mac-%E6%BF%81%E7%82%B9%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 85 | * [不必要な制御文字を使用しない](#%E4%B8%8D%E5%BF%85%E8%A6%81%E3%81%AA%E5%88%B6%E5%BE%A1%E6%96%87%E5%AD%97%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 86 | * [不必要なゼロ幅スペースを使用しない](#%E4%B8%8D%E5%BF%85%E8%A6%81%E3%81%AA%E3%82%BC%E3%83%AD%E5%B9%85%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 87 | * [感嘆符!!、疑問符??を使用しない](#%E6%84%9F%E5%98%86%E7%AC%A6%E7%96%91%E5%95%8F%E7%AC%A6%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 88 | * [半角カナを使用しない](#%E5%8D%8A%E8%A7%92%E3%82%AB%E3%83%8A%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 89 | * [弱い日本語表現の利用を使用しない](#%E5%BC%B1%E3%81%84%E6%97%A5%E6%9C%AC%E8%AA%9E%E8%A1%A8%E7%8F%BE%E3%81%AE%E5%88%A9%E7%94%A8%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%AA%E3%81%84) 90 | * [同一の単語を間違えて連続しているのをチェックする](#%E5%90%8C%E4%B8%80%E3%81%AE%E5%8D%98%E8%AA%9E%E3%82%92%E9%96%93%E9%81%95%E3%81%88%E3%81%A6%E9%80%A3%E7%B6%9A%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E3%81%AE%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B) 91 | * [よくある日本語の誤用をチェックする](#%E3%82%88%E3%81%8F%E3%81%82%E3%82%8B%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%AE%E8%AA%A4%E7%94%A8%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B) 92 | * [冗長な表現をチェックする](#%E5%86%97%E9%95%B7%E3%81%AA%E8%A1%A8%E7%8F%BE%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B) 93 | * [入力ミスで発生する不自然なアルファベットをチェックする](#%E5%85%A5%E5%8A%9B%E3%83%9F%E3%82%B9%E3%81%A7%E7%99%BA%E7%94%9F%E3%81%99%E3%82%8B%E4%B8%8D%E8%87%AA%E7%84%B6%E3%81%AA%E3%82%A2%E3%83%AB%E3%83%95%E3%82%A1%E3%83%99%E3%83%83%E3%83%88%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B) 94 | * [対になっていない括弧をチェックする](#%E5%AF%BE%E3%81%AB%E3%81%AA%E3%81%A3%E3%81%A6%E3%81%84%E3%81%AA%E3%81%84%E6%8B%AC%E5%BC%A7%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B) 95 | 96 | 97 | 98 | ### 1文の長さは100文字以下とする 99 | 100 | > https://github.com/textlint-rule/textlint-rule-sentence-length 101 | 102 | 長過ぎる文は読みにくさに繋がるため、適切な長さで文を句点(`。`)などで区切ってください。 103 | 厳しめの設定にしたい場合は`90`文字を推奨しています。 104 | 105 | デフォルト設定は次の通りです。 106 | 107 | ```json 108 | { 109 | "rules": { 110 | "preset-ja-technical-writing": { 111 | "sentence-length": { 112 | "max": 100 113 | } 114 | } 115 | } 116 | } 117 | ``` 118 | 119 | 過去の設定の履歴は以下のようになっています。 120 | 121 | - バージョン3.0.0+: 100文字以下 122 | - バージョン2.0.0以下: 90文字以下 123 | 124 | ### カンマは1文中に3つまで 125 | 126 | > https://github.com/textlint-rule/textlint-rule-max-comma 127 | 128 | カンマ(,)の多用は、文が長くなっている可能性があります。 129 | 1文が長くなると読みにくなっている可能性があるため適切な長さで文を句点(`。`)などで区切ってください。 130 | 131 | デフォルト設定は次の通りです。 132 | 133 | ```json 134 | { 135 | "rules": { 136 | "preset-ja-technical-writing": { 137 | "max-comma": { 138 | "max": 3 139 | } 140 | } 141 | } 142 | } 143 | ``` 144 | 145 | ### 読点は1文中に3つまで 146 | 147 | > https://github.com/textlint-ja/textlint-rule-max-ten 148 | 149 | 読点(、)の多用は、1文が長くなっている可能性があります。 150 | 1文が長くなると読みにくなっている可能性があるため、適切な長さで文を句点(`。`)などで区切ってください。 151 | 152 | デフォルト設定は次の通りです。 153 | 154 | ```json 155 | { 156 | "rules": { 157 | "preset-ja-technical-writing": { 158 | "max-ten": { 159 | "max": 3 160 | } 161 | } 162 | } 163 | } 164 | ``` 165 | 166 | ### 連続できる最大の漢字長は6文字まで 167 | 168 | > https://github.com/textlint-ja/textlint-rule-max-kanji-continuous-len 169 | 170 | 漢字同士が連続していると読みにくさにつながります。 171 | デフォルトでは連続する漢字は、6文字までとしています。 172 | 173 | 6文字以上の固有名詞は `allow` オプションに記述して回避できます。 174 | 175 | デフォルト設定は次の通りです。 176 | 177 | ```json 178 | { 179 | "rules": { 180 | "preset-ja-technical-writing": { 181 | "max-kanji-continuous-len": { 182 | "max": 6, 183 | "allow": [] 184 | } 185 | } 186 | } 187 | } 188 | ``` 189 | 190 | ### 漢数字と算用数字を使い分けます 191 | 192 | > https://github.com/textlint-ja/textlint-rule-preset-JTF-style 193 | 194 | 数量を表現し、数を数えられるものは算用数字を使用します。任意の数に置き換えても通用する語句がこれに該当します。 195 | 196 | 慣用的表現、熟語、概数、固有名詞、副詞など、漢数字を使用することが一般的な語句では漢数字を使います。 197 | 198 | デフォルト設定は次の通りです。 199 | 200 | ```json 201 | { 202 | "rules": { 203 | "preset-ja-technical-writing": { 204 | "arabic-kanji-numbers": true 205 | } 206 | } 207 | } 208 | ``` 209 | 210 | ### 「ですます調」、「である調」を統一します 211 | 212 | > https://github.com/textlint-ja/textlint-rule-no-mix-dearu-desumasu 213 | 214 | 文章の「ですます調」、「である調」を統一してください。 215 | 文体は見出し、本文、箇条書きの中で、それぞれ統一した表記にします。 216 | 217 | デフォルト設定は次の通りです。 218 | 219 | - 見出しは自動 220 | - 本文はですます調 221 | - 箇条書きはである調 222 | 223 | ```json 224 | { 225 | "rules": { 226 | "preset-ja-technical-writing": { 227 | "no-mix-dearu-desumasu": { 228 | "preferInHeader": "", 229 | "preferInBody": "ですます", 230 | "preferInList": "である", 231 | "strict": false 232 | } 233 | } 234 | } 235 | } 236 | ``` 237 | 238 | 239 | ### 文末の句点記号として「。」を使います 240 | 241 | > https://github.com/textlint-ja/textlint-rule-ja-no-mixed-period 242 | 243 | 文末には「。」を使い文を区切ります。 244 | 245 | 「。」のつけ忘れのチェックや「:」で文を終わらせないようにします。 246 | 247 | デフォルト設定は次の通りです。 248 | 249 | ```json 250 | { 251 | "rules": { 252 | "preset-ja-technical-writing": { 253 | "ja-no-mixed-period": { 254 | "periodMark": "。" 255 | } 256 | } 257 | } 258 | } 259 | ``` 260 | 261 | 262 | ### 二重否定は使用しない 263 | 264 | > https://github.com/textlint-ja/textlint-rule-no-double-negative-ja 265 | 266 | [二重否定](https://ja.wikipedia.org/wiki/%E4%BA%8C%E9%87%8D%E5%90%A6%E5%AE%9A_(%E8%A8%80%E8%AA%9E%E5%AD%A6))は文章を読みにくくするため、使用しないようにします。 267 | 268 | デフォルト設定は次の通りです。 269 | 270 | ```json 271 | { 272 | "rules": { 273 | "preset-ja-technical-writing": { 274 | "no-double-negative-ja": true 275 | } 276 | } 277 | } 278 | ``` 279 | 280 | ### ら抜き言葉を使用しない 281 | 282 | > https://github.com/textlint-ja/textlint-rule-no-dropping-the-ra 283 | 284 | ら抜き言葉は話し言葉のため、書き言葉である文章では使用しないようにします。 285 | 286 | デフォルト設定は次の通りです。 287 | 288 | ```json 289 | { 290 | "rules": { 291 | "preset-ja-technical-writing": { 292 | "no-dropping-the-ra": true 293 | } 294 | } 295 | } 296 | ``` 297 | 298 | ### 逆接の接続助詞「が」を連続して使用しない 299 | 300 | > https://github.com/textlint-ja/textlint-rule-no-doubled-conjunctive-particle-ga 301 | 302 | 逆接の接続助詞「が」は、特に否定の意味ではなくても安易に使われてしまいがちです。 303 | 304 | 同一文中に「が」が複数回出現していないかをチェックします。 305 | 306 | デフォルト設定は次の通りです。 307 | 308 | ```json 309 | { 310 | "rules": { 311 | "preset-ja-technical-writing": { 312 | "no-doubled-conjunctive-particle-ga": true 313 | } 314 | } 315 | } 316 | ``` 317 | 318 | ### 同じ接続詞を連続して使用しない 319 | 320 | > https://github.com/textlint-ja/textlint-rule-no-doubled-conjunction 321 | 322 | 「しかし、〜。しかし、〜」のように同じ接続詞が連続すると、文章が読みにくくなります。 323 | 同じ接続詞が連続して使用されていないかをチェックします。 324 | 325 | デフォルト設定は次の通りです。 326 | 327 | ```json 328 | { 329 | "rules": { 330 | "preset-ja-technical-writing": { 331 | "no-doubled-conjunction": true 332 | } 333 | } 334 | } 335 | ``` 336 | 337 | ### 同じ助詞を連続して使用しない 338 | 339 | > https://github.com/textlint-ja/textlint-rule-no-doubled-joshi 340 | 341 | 文中で同じ助詞が連続すると文章が読みにくくなります。 342 | 1つの文中に同じ助詞が連続して出てくるのをチェックします。 343 | 344 | 修正方法としては、次のようなものがあります。 345 | 346 | - 助詞の書き間違いなので、別の助詞に置き換える 347 | - 例) `私は彼は好きだ` → `私は彼が好きだ` 348 | - 複数のことを1つの文で書いている可能性があるため、助詞が連続している文を分割する 349 | - 1文でまとめようとして、無理やり助詞で文を繋いでいる可能性があります 350 | - 文自体を分けることで、同じ助詞が連続していることがなくなります 351 | - 例) https://github.com/asciidwango/js-primer/pull/1598#discussion_r1110939474 352 | - 助詞で無理やり文を繋げている可能性があるので、文の中で順番を入れ替える 353 | - 助詞で文の中身を無理やり繋げようとしていて、使える助詞の選択肢が狭くなっている可能性があります 354 | - 文の流れを箇条書きなどにして整理してみてください 355 | - 例) https://github.com/asciidwango/js-primer/pull/1594#discussion_r1110973573 356 | - 助詞が不要なら削除して、文を簡潔にする 357 | - "実際に" などのように強調的な言葉を削除することで、助詞が不要になる可能性があります 358 | - 技術文書では簡潔な文章を心がけることが多いため、強調的な単語自体を削除することもあります 359 | 360 | [例外](https://github.com/textlint-ja/textlint-rule-no-doubled-joshi#%E4%BE%8B%E5%A4%96)も多いため、詳しくは[textlint-rule-no-doubled-joshi](https://github.com/textlint-ja/textlint-rule-no-doubled-joshi)のREADMEを参照してください。 361 | また、`allow`オプションで、特定の助詞が連続して出てくることを許可できます。 362 | 363 | 文自体を直す余地がない場合は、コメントなどを使ってエラーを無視してください。 364 | 365 | - [Ignoring Text · textlint](https://textlint.github.io/docs/ignore.html) 366 | 367 | デフォルト設定は次の通りです。 368 | 369 | ```json 370 | { 371 | "rules": { 372 | "preset-ja-technical-writing": { 373 | "no-doubled-joshi": { 374 | "min_interval": 1 375 | } 376 | } 377 | } 378 | } 379 | ``` 380 | 381 | ### UTF8-MAC 濁点を使用しない 382 | 383 | > https://github.com/textlint-ja/textlint-rule-no-nfd 384 | 385 | 文章中にUTF8-MAC 濁点は使用しないようにします。 386 | ファイルからコピー&ペーストした文字である場合があります。 387 | 388 | デフォルト設定は次の通りです。 389 | 390 | ```json 391 | { 392 | "rules": { 393 | "preset-ja-technical-writing": { 394 | "no-nfd": true 395 | } 396 | } 397 | } 398 | ``` 399 | 400 | ### 不必要な制御文字を使用しない 401 | 402 | > https://github.com/textlint-rule/textlint-rule-no-invalid-control-character 403 | 404 | 改行(`\n`)やタブ(`\t`)以外の制御文字が文章に入るのを防止します。 405 | 406 | 不必要な制御文字は文字化けの原因となるため、使用しないようにします。 407 | 408 | デフォルト設定は次の通りです。 409 | 410 | ```json 411 | { 412 | "rules": { 413 | "preset-ja-technical-writing": { 414 | "no-invalid-control-character": true 415 | } 416 | } 417 | } 418 | ``` 419 | 420 | ### 不必要なゼロ幅スペースを使用しない 421 | 422 | > https://github.com/textlint-rule/textlint-rule-no-zero-width-spaces 423 | 424 | ゼロ幅スペース(`\u200b`)が文章に入るのを防止します。 425 | 426 | デフォルト設定は次の通りです。 427 | 428 | ```json 429 | { 430 | "rules": { 431 | "preset-ja-technical-writing": { 432 | "no-zero-width-spaces": true 433 | } 434 | } 435 | } 436 | ``` 437 | 438 | ### 感嘆符!!、疑問符??を使用しない 439 | 440 | > https://github.com/textlint-rule/textlint-rule-no-exclamation-question-mark 441 | 442 | 技術文書では、感嘆符(!!)、疑問符(??)は基本的には使用しないでください。 443 | 特定の感嘆符や疑問符を使用する場合は、オプションで許可するか、コメントなどで例外として無視してください。 444 | 445 | デフォルト設定は次の通りです。 446 | 447 | ```json 448 | { 449 | "rules": { 450 | "preset-ja-technical-writing": { 451 | "no-exclamation-question-mark": true 452 | } 453 | } 454 | } 455 | ``` 456 | 457 | ### 半角カナを使用しない 458 | 459 | > https://github.com/textlint-ja/textlint-rule-no-hankaku-kana 460 | 461 | 全角カタカナを使用してください。 462 | 463 | デフォルト設定は次の通りです。 464 | 465 | ```json 466 | { 467 | "rules": { 468 | "preset-ja-technical-writing": { 469 | "no-hankaku-kana": true 470 | } 471 | } 472 | } 473 | ``` 474 | 475 | ### 弱い日本語表現の利用を使用しない 476 | 477 | > https://github.com/textlint-ja/textlint-rule-ja-no-weak-phrase 478 | 479 | `〜かもしれない` や `〜と思います` 等の弱い表現を使用しないでください。 480 | 技術文書で曖昧な表現を避けるようにするためのルールです。 481 | 482 | デフォルト設定は次の通りです。 483 | 484 | ```json 485 | { 486 | "rules": { 487 | "preset-ja-technical-writing": { 488 | "ja-no-weak-phrase": true 489 | } 490 | } 491 | } 492 | ``` 493 | 494 | ### 同一の単語を間違えて連続しているのをチェックする 495 | 496 | > https://github.com/textlint-ja/textlint-rule-ja-no-successive-word 497 | 498 | 同一の単語(形態素解析したtoken)が連続している場合は、入力ミスや誤字の可能性があります。 499 | 500 | 誤字でない場合は、[Issue報告](https://github.com/textlint-ja/textlint-rule-ja-no-successive-word/issues/new)してください。 501 | 502 | デフォルト設定は次の通りです。 503 | 504 | ```json 505 | { 506 | "rules": { 507 | "preset-ja-technical-writing": { 508 | "ja-no-successive-word": true 509 | } 510 | } 511 | } 512 | ``` 513 | 514 | ### よくある日本語の誤用をチェックする 515 | 516 | > https://github.com/textlint-ja/textlint-rule-ja-no-abusage 517 | 518 | 日本語や技術表現における漢字の誤用などをチェックするルールです。 519 | 520 | デフォルト設定は次の通りです。 521 | 522 | ```json 523 | { 524 | "rules": { 525 | "preset-ja-technical-writing": { 526 | "ja-no-abusage": true 527 | } 528 | } 529 | } 530 | ``` 531 | 532 | ### 冗長な表現をチェックする 533 | 534 | > https://github.com/textlint-ja/textlint-rule-ja-no-redundant-expression 535 | 536 | 冗長な表現とは、その文から省いても意味が通じるような表現を示しています。 537 | `"することができる"`という冗長な表現を`"できる"`にするといったルールです。 538 | 539 | デフォルト設定は次の通りです。 540 | 541 | ```json 542 | { 543 | "rules": { 544 | "preset-ja-technical-writing": { 545 | "ja-no-redundant-expression": true 546 | } 547 | } 548 | } 549 | ``` 550 | 551 | ### 入力ミスで発生する不自然なアルファベットをチェックする 552 | 553 | > https://github.com/textlint-ja/textlint-rule-ja-unnatural-alphabet 554 | 555 | `リイr−ス` などIMEの入力ミスが日本語中に混じった不自然なアルファベットをチェックします。 556 | 557 | デフォルト設定は次の通りです。 558 | 559 | ```json 560 | { 561 | "rules": { 562 | "preset-ja-technical-writing": { 563 | "ja-unnatural-alphabet": true 564 | } 565 | } 566 | } 567 | ``` 568 | 569 | ### 対になっていない括弧をチェックする 570 | 571 | > https://github.com/textlint-rule/textlint-rule-no-unmatched-pair 572 | 573 | 1文中で対になっていない括弧チェックします。 574 | `(`に対応する`)`がない場合や、`[`に対応する`]`がない場合などをチェックします。 575 | 576 | デフォルト設定は次の通りです。 577 | 578 | ```json 579 | { 580 | "rules": { 581 | "preset-ja-technical-writing": { 582 | "no-unmatched-pair": true 583 | } 584 | } 585 | } 586 | ``` 587 | 588 | ## Changelog 589 | 590 | See [Releases page](https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/releases). 591 | 592 | ## Semantic Versioning Policy 593 | 594 | 次のルールでバージョンが更新されます。 595 | 596 | - Patch リリース 597 | - 各ルールのバグ修正 (警告を減らす方向への修正) 598 | - ドキュメントの改善 599 | - 内部的な変更 (リファクタリングやテストの改善など) 600 | - リリース失敗時の再リリース 601 | - Minor リリース 602 | - 各ルールのバグ修正 (警告を増やす方向への修正) 603 | - 新オプションの追加 604 | - 既存ルールの非推奨化 605 | - Major リリース 606 | - プリセットへのルールの追加 607 | - プリセットからルールの削除 608 | - 既存のオプション値の変更 609 | 610 | 更新内容は[Releases page](https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/releases)を参照してください。 611 | 612 | ### Release Flow 613 | 614 | - 次のMajorバージョンのIssueを作り、IssueにCHANGELOGを書いていく 615 | - Pull Requestはrenovatebotから出るのでマージする 616 | - 半年ごとにリリース用のIssueが作られるので、確認してリリース用のPRをマージする 617 | - リリースされたらIssueをクローズする 618 | 619 | ## ルールの利用者 620 | 621 | このプリセットを利用しているユーザーです。 622 | 623 | - [asciidwango/js-primer](https://github.com/asciidwango/js-primer) 624 | - [Maven3のはじめかた](https://github.com/KengoTODA/what-is-maven) 625 | 626 | ユーザーリストへのPRも募集しています。 627 | 628 | ## Community 629 | 630 | 質問は以下のGitterでお願いします。 631 | 632 | [![Gitter](https://badges.gitter.im/textlint-ja/textlint-ja.svg)](https://gitter.im/textlint-ja/textlint-ja) 633 | 634 | ## その他のルール 635 | 636 | - [Collection of textlint rule · textlint/textlint Wiki](https://github.com/textlint/textlint/wiki/Collection-of-textlint-rule) 637 | 638 | ## Running tests 639 | 640 | npm test 641 | 642 | ## Contributing 643 | 644 | Pull requests and stars are always welcome. 645 | 646 | For bugs and feature 647 | requests, [please create an issue](https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/issues). 648 | 649 | 1. Fork it 650 | 2. Create your feature branch: `git checkout -b my-new-feature` 651 | 3. Commit your changes: `git commit -am 'Add some feature'` 652 | 4. Push to the branch: `git push origin my-new-feature` 653 | 5. Submit a pull request :D 654 | 655 | ## Author 656 | 657 | - [github/azu](https://github.com/azu) 658 | - [twitter/azu_re](https://twitter.com/azu_re) 659 | 660 | ## License 661 | 662 | MIT © azu 663 | -------------------------------------------------------------------------------- /example/.textlintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "filters": { 3 | "comments": true 4 | }, 5 | "rules": { 6 | "preset-ja-technical-writing": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "textlint-rule-preset-ja-technical-writing-example", 4 | "version": "5.0.0", 5 | "homepage": "https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing", 6 | "scripts": { 7 | "prepare": "install-local ../", 8 | "textlint": "textlint ../README.md", 9 | "textlint:fix": "textlint --fix ../README.md", 10 | "test": "npm run textlint", 11 | "website": "textlint-website-generator --output-dir ./dist" 12 | }, 13 | "devDependencies": { 14 | "@textlint/website-generator": "^0.17.0", 15 | "textlint": "^14.7.2", 16 | "textlint-filter-rule-comments": "^1.2.2", 17 | "install-local": "^3.0.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/textlint-rule-preset-ja-technical-writing.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const { moduleInterop } = require("@textlint/module-interop"); 3 | const jtfRules = moduleInterop(require("textlint-rule-preset-jtf-style")).rules; 4 | module.exports = { 5 | rules: { 6 | "sentence-length": moduleInterop(require("textlint-rule-sentence-length")), 7 | "max-comma": moduleInterop(require("textlint-rule-max-comma")), 8 | "max-ten": moduleInterop(require("textlint-rule-max-ten")), 9 | "max-kanji-continuous-len": moduleInterop(require("textlint-rule-max-kanji-continuous-len")), 10 | "no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")), 11 | "ja-no-mixed-period": moduleInterop(require("textlint-rule-ja-no-mixed-period")), 12 | "arabic-kanji-numbers": jtfRules["2.2.2.算用数字と漢数字の使い分け"], 13 | "no-doubled-conjunction": moduleInterop(require("textlint-rule-no-doubled-conjunction")), 14 | "no-doubled-conjunctive-particle-ga": moduleInterop(require("textlint-rule-no-doubled-conjunctive-particle-ga")), 15 | "no-double-negative-ja": moduleInterop(require("textlint-rule-no-double-negative-ja")), 16 | "no-doubled-joshi": moduleInterop(require("textlint-rule-no-doubled-joshi")), 17 | "no-dropping-the-ra": moduleInterop(require("textlint-rule-no-dropping-the-ra")), 18 | "no-nfd": moduleInterop(require("textlint-rule-no-nfd")), 19 | "no-exclamation-question-mark": moduleInterop(require("textlint-rule-no-exclamation-question-mark")), 20 | "no-hankaku-kana": moduleInterop(require("textlint-rule-no-hankaku-kana")), 21 | "no-invalid-control-character": moduleInterop(require("@textlint-rule/textlint-rule-no-invalid-control-character")), 22 | "ja-no-weak-phrase": moduleInterop(require("textlint-rule-ja-no-weak-phrase")), 23 | "ja-no-successive-word": moduleInterop(require("textlint-rule-ja-no-successive-word")), 24 | "ja-no-abusage": moduleInterop(require("textlint-rule-ja-no-abusage")), 25 | "ja-no-redundant-expression": moduleInterop(require("textlint-rule-ja-no-redundant-expression")), 26 | "ja-unnatural-alphabet": moduleInterop(require("textlint-rule-ja-unnatural-alphabet")), 27 | "no-unmatched-pair": moduleInterop(require("@textlint-rule/textlint-rule-no-unmatched-pair")), 28 | "no-zero-width-spaces": moduleInterop(require("textlint-rule-no-zero-width-spaces")) 29 | }, 30 | rulesConfig: { 31 | // # 1文の長さは100文字以下とする 32 | // https://github.com/textlint-rule/textlint-rule-sentence-length 33 | "sentence-length": { 34 | max: 100 35 | }, 36 | // # コンマは1文中に3つまで 37 | // https://github.com/textlint-rule/textlint-rule-max-comma 38 | "max-comma": { 39 | max: 3 40 | }, 41 | // # 読点は1文中に3つまで 42 | // https://github.com/textlint-ja/textlint-rule-max-ten 43 | "max-ten": { 44 | max: 3 45 | }, 46 | // # 連続できる最大の漢字長は6文字まで 47 | // 漢字が連続していると読みにくさにつながります。 48 | // https://github.com/textlint-ja/textlint-rule-max-kanji-continuous-len 49 | "max-kanji-continuous-len": { 50 | max: 6 51 | }, 52 | // # 漢数字と算用数字を使い分けます 53 | // 数量を表現し、数を数えられるものは算用数字を使用します。 54 | // 任意の数に置き換えても通用する語句がこれに該当します。 55 | // 序数詞(「第~回」「~番目」「~回目」)も算用数字を使います。 56 | // 慣用的表現、熟語、概数、固有名詞、副詞など、漢数字を使用することが一般的な語句では漢数字を使います。 57 | // https://github.com/textlint-ja/textlint-rule-preset-JTF-style 58 | // https://www.jtf.jp/jp/style_guide/styleguide_top.html 59 | "arabic-kanji-numbers": true, 60 | // # 「ですます調」、「である調」を統一します 61 | // 見出しは自動 62 | // 本文はですます調 63 | // 箇条書きはである調 64 | // https://github.com/textlint-ja/textlint-rule-no-mix-dearu-desumasu 65 | "no-mix-dearu-desumasu": { 66 | "preferInHeader": "", 67 | "preferInBody": "ですます", 68 | "preferInList": "である", 69 | "strict": false 70 | }, 71 | // # 文末の句点記号として「。」を使います 72 | // https://github.com/textlint-ja/textlint-rule-ja-no-mixed-period 73 | "ja-no-mixed-period": { 74 | "periodMark": "。" 75 | }, 76 | // # 二重否定は使用しない 77 | // https://github.com/textlint-ja/textlint-rule-no-double-negative-ja 78 | "no-double-negative-ja": true, 79 | // # ら抜き言葉を使用しない 80 | // https://github.com/textlint-ja/textlint-rule-no-dropping-the-ra 81 | "no-dropping-the-ra": true, 82 | // # 逆接の接続助詞「が」を連続して使用しない 83 | // 逆接の接続助詞「が」は、特に否定の意味ではなくても安易に使われてしまいがちです。 84 | // 同一文中に複数回出現していないかどうかをチェックします。 85 | // https://github.com/textlint-ja/textlint-rule-no-doubled-conjunctive-particle-ga 86 | "no-doubled-conjunctive-particle-ga": true, 87 | // # 同じ接続詞を連続して使用しない 88 | // https://github.com/textlint-ja/textlint-rule-no-doubled-conjunction 89 | "no-doubled-conjunction": true, 90 | // # 同じ助詞を連続して使用しない 91 | "no-doubled-joshi": { 92 | "min_interval": 1 93 | }, 94 | // # UTF8-MAC 濁点を使用しない 95 | // 文章中にUTF8-MAC 濁点は不要です。 96 | // https://github.com/textlint-ja/textlint-rule-no-nfd 97 | "no-nfd": true, 98 | // # 不必要な制御文字を使用しない 99 | // 改行やタブ以外の一般的な文章にはでてこない不自然な制御文字が入るのを防止します。 100 | // https://github.com/textlint-rule/textlint-rule-no-invalid-control-character 101 | "no-invalid-control-character": true, 102 | // # ゼロ幅スペースの検出 103 | // https://github.com/textlint-rule/textlint-rule-no-zero-width-spaces 104 | "no-zero-width-spaces": true, 105 | // # 感嘆符!!、疑問符??を使用しない 106 | // https://github.com/textlint-rule/textlint-rule-no-exclamation-question-mark 107 | "no-exclamation-question-mark": true, 108 | // # 半角カナを使用しない 109 | // https://github.com/textlint-ja/textlint-rule-no-hankaku-kana 110 | "no-hankaku-kana": true, 111 | // # 弱い日本語表現の利用を使用しない 112 | // 〜かもしれない 等の弱い表現を使用しない 113 | // https://github.com/textlint-ja/textlint-rule-ja-no-weak-phrase 114 | "ja-no-weak-phrase": true, 115 | // # 同一の単語を間違えて連続しているのをチェックする 116 | // https://github.com/textlint-ja/textlint-rule-ja-no-successive-word 117 | "ja-no-successive-word": true, 118 | // # よくある日本語の誤用をチェックする 119 | // https://github.com/textlint-ja/textlint-rule-ja-no-abusage 120 | "ja-no-abusage": true, 121 | // # 冗長な表現をチェックする 122 | // https://github.com/textlint-ja/textlint-rule-ja-no-redundant-expression 123 | "ja-no-redundant-expression": true, 124 | // # 入力ミスで発生する不自然なアルファベットをチェックする 125 | // https://github.com/textlint-ja/textlint-rule-ja-unnatural-alphabet 126 | "ja-unnatural-alphabet": true, 127 | // # 対になっていない括弧をチェックする 128 | // https://github.com/textlint-rule/textlint-rule-no-unmatched-pair 129 | "no-unmatched-pair": true 130 | } 131 | }; 132 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "textlint-rule-preset-ja-technical-writing", 3 | "version": "12.0.2", 4 | "description": "技術文書向けのtextlintルールプリセット", 5 | "keywords": [ 6 | "textlint", 7 | "preset" 8 | ], 9 | "homepage": "https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing", 10 | "bugs": { 11 | "url": "https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing/issues" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/textlint-ja/textlint-rule-preset-ja-technical-writing.git" 16 | }, 17 | "license": "MIT", 18 | "author": "azu", 19 | "files": [ 20 | "src/", 21 | "lib/" 22 | ], 23 | "main": "lib/textlint-rule-preset-ja-technical-writing.js", 24 | "directories": { 25 | "test": "test" 26 | }, 27 | "scripts": { 28 | "docs:toc": "markdown-toc -i README.md", 29 | "release": "changeset publish", 30 | "test": "mocha test/ && npm run test:example", 31 | "test:example": "cd example && npm ci && npm test" 32 | }, 33 | "dependencies": { 34 | "@textlint-rule/textlint-rule-no-invalid-control-character": "^3.0.0", 35 | "@textlint-rule/textlint-rule-no-unmatched-pair": "^2.0.4", 36 | "@textlint/module-interop": "^14.7.2", 37 | "textlint-rule-ja-no-abusage": "^3.0.0", 38 | "textlint-rule-ja-no-mixed-period": "^3.0.1", 39 | "textlint-rule-ja-no-redundant-expression": "^4.0.1", 40 | "textlint-rule-ja-no-successive-word": "^2.0.1", 41 | "textlint-rule-ja-no-weak-phrase": "^2.0.0", 42 | "textlint-rule-ja-unnatural-alphabet": "2.0.1", 43 | "textlint-rule-max-comma": "^4.0.0", 44 | "textlint-rule-max-kanji-continuous-len": "^1.1.1", 45 | "textlint-rule-max-ten": "^5.0.0", 46 | "textlint-rule-no-double-negative-ja": "^2.0.1", 47 | "textlint-rule-no-doubled-conjunction": "^3.0.0", 48 | "textlint-rule-no-doubled-conjunctive-particle-ga": "^3.0.0", 49 | "textlint-rule-no-doubled-joshi": "^5.1.0", 50 | "textlint-rule-no-dropping-the-ra": "^3.0.0", 51 | "textlint-rule-no-exclamation-question-mark": "^1.1.0", 52 | "textlint-rule-no-hankaku-kana": "^2.0.1", 53 | "textlint-rule-no-mix-dearu-desumasu": "^6.0.4", 54 | "textlint-rule-no-nfd": "^2.0.2", 55 | "textlint-rule-no-zero-width-spaces": "^1.0.1", 56 | "textlint-rule-preset-jtf-style": "^3.0.2", 57 | "textlint-rule-sentence-length": "^5.2.0" 58 | }, 59 | "devDependencies": { 60 | "@changesets/cli": "^2.29.4", 61 | "markdown-toc": "^1.2.0", 62 | "mocha": "^11.5.0", 63 | "semver": "^7.7.2" 64 | }, 65 | "email": "azuciao@gmail.com", 66 | "packageManager": "npm@11.4.1+sha512.fcee43884166b6f9c5d04535fb95650e9708b6948a1f797eddf40e9778646778a518dfa32651b1c62ff36f4ac42becf177ca46ca27d53f24b539190c8d91802b" 67 | } 68 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@azu" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/textlint-rule-preset-ja-technical-writing-test.js: -------------------------------------------------------------------------------- 1 | // LICENSE : MIT 2 | "use strict"; 3 | const assert = require("assert"); 4 | const rules = require("../lib/textlint-rule-preset-ja-technical-writing").rules; 5 | const rulesConfig = require("../lib/textlint-rule-preset-ja-technical-writing").rulesConfig; 6 | describe("textlint-rule-preset-ja-technical-writing", function() { 7 | it("not missing key", function() { 8 | const ruleKeys = Object.keys(rules).sort(); 9 | const ruleConfigKeys = Object.keys(rulesConfig).sort(); 10 | assert.deepEqual(ruleKeys, ruleConfigKeys); 11 | }); 12 | }); --------------------------------------------------------------------------------