Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with .sass-lint.yml path #140

Open
OBats opened this issue Nov 28, 2019 · 1 comment
Open

Issue with .sass-lint.yml path #140

OBats opened this issue Nov 28, 2019 · 1 comment

Comments

@OBats
Copy link

OBats commented Nov 28, 2019

Problem Description

When I running npm run lint:fix sass-lint-auto-fix runs only in one file, but not of all scss files mentioned in my .sass-lint.yml config

sass-lint-auto-fix output

My .sass-lint.yml config:

options:
  formatter: stylish
files:
  include: '**/*.s+(a|c)ss'
rules:
  extends-before-mixins: 1
  extends-before-declarations: 1
  placeholder-in-extend: 1
  ...

my folder structure

lint:fix script: "lint:fix": "sass-lint-auto-fix"

sass-lint-auto-fix version: 0.19.0

The explicit also doesn't work (same result):
"lint:fix": "sass-lint-auto-fix --config-sass-lint .sass-lint.yml"

How I can use sass-lint-auto-fixto validate and fix (if necessary) all my .scss files according to sass-lint rules in .sass-lint.yml config?

Thank you :)

@srowhani
Copy link
Owner

You'll need to also have a sass-lint-auto-fix yml file that specifies which rules to be enabled. This file has it's own matching pattern to run on. But by default it matches the same pattern, and only runs if lint errors have been detected. Can you try running it with pattern as a command line arg instead, and see if that resolved your issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants