Closed dai0304 closed 6 years ago
Thanks for report.
Does textlint.json
equals to .textlintrc
?
Do you use textlint --config docs/config/textlint.json docs/contents/
in project-2?
Yes! I forgot to tell you.
textlint-rule-prh treat rulePaths
as relative path from .textlintrc
(textlint.json
)
(This document is missed, I've add it now #32)
For example is project-2.
. (project-2)
|-- src/
| `-- ...
`-- docs/
|-- config/ (subtree)
| |-- textlint.json
| `-- prh-rules/
| `-- foo.yml
`-- contents/
`-- ...
and Put following config to textlint.json
:
{
"rules": {
"prh": {
"rulePaths": [
"./prh-rules/foo.yml"
]
}
}
}
textlint-rule-prh treat "./rules/rule.yml"
as relative path from ./docs/config/textlint.json
.
As a result, textlint-rule-prh load ./docs/config/./rules/rule.yml
I've tried to reproduce this issue. https://github.com/azu/textlint-rule-prh-issues-31 But, it seems that it work expectly.
Can you write following results?
$ textlint --version
# Version
$ textlint --debug --config docs/config/textlint.json docs/contents/
# or
$ DEBUG=textlint* textlint --config docs/config/textlint.json docs/contents/
I used textlint-rule-prh@2.4.1
.
In the latest version 5.0.1, it works fully expected!
Thank you for your kindness!
I want to share textlint configuration with multiple projects using git-subtree. But configuration directory (subtree prefix) is not the same across all projects.
For example, there is following
textlint-config
repository.And the following projects, which share the configuration using git-subtree.
In the project-1
rulePaths
must to be set asconfig/prh-rules/foo.yml
, but in the project-2 this have to bedocs/config/prh-riles/foo.yml
.Any suggestions? Thanks.