Skip to content

New setting Ignore Path causing an error by default #144

Description

@akrawitz

Initial checklist

Affected package

remarkjs/vscode-remark@3.3.0

Steps to reproduce

VSCode auto-updated my extensions, including upgrading remarkjs/vscode-remark from 3.2.0 to 3.3.0, and the error message started appearing at the start of every *.md file.

Note that I do not have a .remarkignore file in my project.

Actual behavior

My *.md files which used to lint cleanly with remark now have the following error at the beginning of the first line of every file:

Cannot find file
Error: Cannot read given file `.remarkignore`
    at ReadFileContext.callback (c:\Users\akrawitz\.vscode\extensions\unifiedjs.vscode-remark-3.3.0\out\remark-language-server.js:825:1323)
    at FSReqCallback.readFileAfterOpen [as oncomplete] (node:fs:299:13)

The issue seems to be that the new Ignore Path setting defaults to .remarkignore instead of defaulting to being blank. Note that this contradicts the documentation in readme.md that states:
remark.ignorePath (string, optional) — Filepath to an ignore file to load. When relative, it is resolved from the workspace folder.
I interpret this to mean that the default is intended to be no value.

Expected behavior

No error.

Ignore Path defaulting to an empty string.

Or, documentation that the default has been explicitly changed from not expecting a .remarkignore file to requiring one unless the settings are manually changed.

Runtime

VSCode 1.124.0

Package manager

yarn@4.12.0 (but not really relevant)

Operating system

Windows 11 Enterprise, 25H2, ARM-64

Build and bundle tools

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    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