AtomLinter / linter-stylelint

A plugin for Atom Linter providing an interface to stylelint.

Home Page:https://atom.io/packages/linter-stylelint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.stylelintignore is not respected when using standard config

cpearce31 opened this issue · comments

I have the "Use standard" option checked in the linter-stylelint's settings in Atom. It is working properly, except that it doesn't seem to respect any rules I put in a .stylelintignore file in the root of my project. I have tried to adding console.log(process.cwd()) to index.js in lib/index.js and it confirms that process.cwd() is the root directory of my project. I tried running the Stylelint CLI using a globally installed stylelint-config-standard on my project, and it properly respects my ignore file.

I'm using linter-stylelint version 4.2.0.

@cpearce31 are you still having this issue with linter-stylelint version 4.3.0?

Yes, just tested the same project with 4.3.0 and the .stylelintignore is still not working.

EDIT: The goal is to to prevent linter-stylelint from linting .scss files. Can you think other ways to accomplish that?

If i'm reading this right, it looks like this would be an upstream issue?

  helpers.startMeasure('linter-stylelint: Check ignored');
        let fileIsIgnored;
        try {
          fileIsIgnored = await stylelintLinter.isPathIgnored(filePath);
        } catch (error) {
          // Do nothing, configuration errors should have already been caught and thrown above
        }
        helpers.endMeasure('linter-stylelint: Check ignored');

Since that isPathIgnored method is provided by Stylelint.

It's an upstream issue. See stylelint/stylelint#2833. Thanks!