Skip to content

feature_request(configuration): allow different paths for the personal and third-party styles #1062

@Kristinita

Description

@Kristinita

1. Summary

It would be helpful for users if Vale would allow placing the third-party and personal styles in different paths.

2. The example of the desired behavior

  1. Vale allows placing the file config/vocabularies/MyVocabulary/accept.txt in the custom folder dictionaries/vale.
  2. When a user launches the command vale sync, Vale allows installing the third-party styles in the folder vale/third-party.

3. The reason for the need for the feature

3.1. Mixed content

In my opinion, mixing of personal and third-party content in the same folder isn’t the best practice.

In Node.js projects I have the folder node_modules containing solely third-party files. I don’t modify this folder and add personal files to other places. I ignore this folder recursively using the glob template node_modules/**.

In Python projects I have the folder .venv which also contains solely third-party files. I can also ignore all files in this directory using the glob template .venv/**.

I like this approach without mixing personal and third-party files.

3.2. Ignoring

If Vale supported different directories for the third-party and personal styles, users could ignore solely the folder with third-party styles. Currently, users need to exclude from their ignoring patterns the directory ${StylesPath}/config. Users need to do it not solely in the VCS ignore file. For example, I need to check that the directory ${StylesPath}/config isn’t ignored by these tools:

  1. EditorConfig formatting checkers: ECLint and Editorconfig-Checker
  2. Spellcheckers: CSpell and codespell
  3. YAML linters: yamllint and eslint-plugin-yml

A user should always remember that they must write the extra ignore patterns.

4. Not helped

Based on my search results, currently, I can’t get the desired behavior.

  1. I searched in the pages Packages, StylesPath, and Vocabularies of the Vale documentation. I found these lines:

    A StylesPath contains two types of entries: styles and the special config directory.

  2. I searched in the Vale discussions, issues, and pull requests. I found the related issues Vale v3.0.0 #688 and Supporting both in-repo and local rules #737, but I couldn’t find how I can resolve the problem.

  3. I searched in the code:

    https://github.com/errata-ai/vale/blob/002dbf73269b063a722d7626e36f0d4088af146b/internal/core/config.go#L20-L45

    This directory is relative to the user’s specified StylesPath

  4. Vale AI assistant returns the status 405:

    Request failed with status 405

    Vale AI assistant: Request failed with status 405

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions