You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to set different rules for different paths, even within a single repository.
For example, zenn allows users to manage articles with GitHub integration, but we have to manage multiple articles and books in the same repository, and we may want to apply different rules to different articles and books.
To achieve this, I propose the following features.
per-directory .textlintrc
I want to put a .textlintrc file in a directory other than the root of the repository to override the root configuration.
I propose the following structure.
.textlintrc # (1)
a.md # The .textlintrc setting from (1) is used
b/.textlintrc # (2)
b/b.md # The setting of (1) overwritten by (2) will be used
Provide overrides that can override the rules at each path.
It would be nice to be able to write the following in .textlintrc.
If overrides supports grub, there is no need for a per-directory .textlintrc, but I included it in the proposal because I thought it would be easier to manage.
The above has been translated by DeepL and the original text is as follows:
The cascading mechanism(like per-directory) makes maintenance difficult.
The overrides feature is useful, but it may be complex.
Also, textlint does not support extends like ESLint and it may be files instead of overrides.
For example, ESLint will change its config format.
I want to be able to set different rules for different paths, even within a single repository.
If you do lint in CLI, you can use --config flag.
textlint --config b/.textlintrc.json "b/**.md"
Another workaround: define your config in .textlintrc.js. Its just JavaScript, but it can not detect a linting file? maybe.
I think that the editor's linter may requires some override feature, because These editor resolve only specific file name like .textlintrc. So the editor's linter may not specify another textlintrc file name.
I want to be able to set different rules for different paths, even within a single repository.
For example, zenn allows users to manage articles with GitHub integration, but we have to manage multiple articles and books in the same repository, and we may want to apply different rules to different articles and books.
To achieve this, I propose the following features.
per-directory .textlintrc
I want to put a .textlintrc file in a directory other than the root of the repository to override the root configuration.
I propose the following structure.
Provide
overrides
that can override the rules at each path.It would be nice to be able to write the following in .textlintrc.
If overrides supports grub, there is no need for a per-directory .textlintrc, but I included it in the proposal because I thought it would be easier to manage.
The above has been translated by DeepL and the original text is as follows:
ファイルごとにルールを上書きできるようにする
一つのリポジトリ内であっても、異なるパスに対して別のルールを設定出来るようにしたい。
例えばzennではGitHub連携で記事を管理できますが、複数の記事と本を同一のリポジトリで管理することになり、異なる記事や本に対して異なるルールを適用したいことがあります。
これを実現するために、以下の機能を提案します。
ディレクトリ単位の.textlintrc
リポジトリのルート以外のディレクトリに置いた.textlintrcがルートの設定を上書きするようにしたい。
以下のような構造を提案します。
パスごとにルールを上書きできる
overrides
を用意する.textlintrcで以下のような書き方ができると良さそうです。
overridesがgrubに対応していればディレクトリ単位の.textlintrcはなくても良いですが、あると管理がしやすいのではないかと思って提案に含めました。
The text was updated successfully, but these errors were encountered: