Skip to content

sass-lint only works when globally installed on Windows #1192

@swensorm

Description

@swensorm

When running sass-lint from a global npm installation, I receive valid errors about a file, however when running the same command through npm run lint I receive no errors. I am using the latest 1.12.1 version of sass-lint and latest 8.11.1 version of node. This is only occurring on a Windows machine (10), and I cannot reproduce it on mac os.

Apologies if this is an issue with npm or something outside of sass-lint, I have been unable to find anything related anywhere. Thank you!

Invalid scss:

.layout-belt {
  display: block;
}

package.json:

{
  "name": "npm-test",
  "scripts": {
    "lint": "sass-lint -c .sass-lint.yml '*.scss' -v -q"
  },
  "devDependencies": {
    "sass-lint": "^1.12.1"
  }
}

.sass-lint.yml:

options:
  merge-default-rules: true
files:
  include: '**/*.s+(a|c)ss'
rules:
  class-name-format:
    - 2
    -
      convention: camelcase

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions