Code Monkey home page Code Monkey logo

Comments (6)

azu avatar azu commented on September 23, 2024 1

textlint-plugin-html側で修正されたと思います

from textlint-rule-no-synonyms.

hankei6km avatar hankei6km commented on September 23, 2024 1

@azu ご対応ありがとうございました。想定通りに検出されることを確認しました。

$ npx textlint --c textlintrc test.html 

/project/home/hankei6km/workspace/test.html
  8:12  error  同義語である「サーバ」と「サーバー」が利用されています  @textlint-ja/no-synonyms
  9:13  error  同義語である「雇入」と「雇入れ」が利用されています      @textlint-ja/no-synonyms

✖ 2 problems (2 errors, 0 warnings)

確認は下記 CodeSandbox のサンドボックスで行いました。
https://codesandbox.io/p/sandbox/test-textlint-rule-no-synonyms-bdbhdo

from textlint-rule-no-synonyms.

azu avatar azu commented on September 23, 2024

HTMLプラグインが<html lang="en">Html nodeとして扱っちゃうのが良くない感じがしますね。。
(Markdown中の <p> など任意のHTMLをHtml nodeとして扱うためのtypeなので、なんか混在してしまっている…)

HTMLプラグイン側で <html>DocumentHtml とか別の名前にするなどした方が汎用的に修正できそうな気がしますね…
Syntax.Html を無視しているルールは他にもあると思うので。
https://github.com/textlint/textlint-plugin-html

📝 Syntax.Html === "Html なので値が偶然一致してしまっているのが主な原因。Syntax.Htmlの値を変えるというのもあるがちょっと影響が大きいかも知れない…

from textlint-rule-no-synonyms.

hankei6km avatar hankei6km commented on September 23, 2024

言われてみれば、他のルールでも無視されてしまいそうですね。

HTMLプラグイン側で を DocumentHtml とか別の名前にするなどした方が汎用的に修正できそうな気がしますね…

textlint を使い始めたばかりなので全体的な判断は難しいのですが、
感覚的には <html> の node を Html 以外に変更していただくは良いように感じます。

from textlint-rule-no-synonyms.

azu avatar azu commented on September 23, 2024

ref textlint/textlint-plugin-html#19

from textlint-rule-no-synonyms.

azu avatar azu commented on September 23, 2024

確認ありがとうございます!

from textlint-rule-no-synonyms.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.