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

not using local stylelint

brandonkal opened this issue · comments

The atom linter-stylelint package which is on version 4.3.0 is not using the local stylelint installed.

Here is the relevant portion of my package.json for the project:

"devDependencies": {
    "prettier": "^1.12.1",
    "stylelint": "9.1.3",
    "stylelint-config-prettier": "^3.2.0",
    "stylelint-config-standard": "^18.2.0",
    "stylelint-config-styled-components": "^0.1.1",
    "stylelint-processor-styled-components": "^1.3.1"
  }

I have this script that is working in the terminal:

"lint:css": "stylelint 'src/**/*.js'"

And here is my full .stylelintrc file:

{
  "processors": ["stylelint-processor-styled-components"],
  "extends": [
    "stylelint-config-standard",
    "stylelint-config-prettier",
    "stylelint-config-styled-components"
  ],
  "rules": {
    "no-descending-specificity": null
  }
}

As you can see I have stylelint fixed to version 9.1.3 installed as version 9.2.0 has a known bug where it does not lint at all when using stylelint-processor-styled-components

It would be nice to use this with Atom. Thank you

The problem you are having is that linter-stylelint does not run on javascript files. It is currently configured to only run on css/sass/less/postcss files. You can see more discussion on this in #235 and #322 (which specifically is discussing styled-component support). Your terminal script works because you tell stylelint to run on those javascript files.