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

Local config file is ignored #25

Closed
Doodidan opened this issue Mar 20, 2018 · 5 comments · Fixed by #36
Closed

Local config file is ignored #25

Doodidan opened this issue Mar 20, 2018 · 5 comments · Fixed by #36

Comments

@Doodidan
Copy link

This linter ignore local config file. sass-lint console command don't in the same time.
Folder structure:

  • project
    • .sass-lint.yml
    • sources
      • css
        • style.css

On the screenshot: a lot of warnings, example of warning in top
image

On this screenshot: few warnings in different lines
image

@skovhus
Copy link
Owner

skovhus commented Mar 20, 2018

@GoshaEgorian thanks for reporting this. As I'm not really using Sublime anymore, I would like help looking into this issue. PRs are more than welcome. : )

@zed0
Copy link

zed0 commented Mar 22, 2018

We've just had this issue.
Without editing the source you can fix this using your local configuration by adding the following to your SublimeLinter preferences (Preferences -> Package Settings -> SublimeLinter -> Settings)

// SublimeLinter Settings - User
{
    "linters": {
        "sass": {
            "working_dir": "${file_path}"
        }
    }
}

@Shelagh-Lewins
Copy link

Thank you @zed0! I was tearing my hair out trying to get sass-lint to accept tab indentation in Sublime Text 3.

Here is a little more detail about my setup in case it helps anybody else.

In SublimeLinter preferences (Preferences -> Package Settings -> SublimeLinter -> Settings):

    "linters": {
        "sass": {
            "working_dir": "${/home/myusername}"
        }
    },

And then I added a file .sasslintrc to my Home folder:

{
  "rules": {
    "indentation": [
      1,
      {
        "size": "tab"
      }
    ]
  }
}

@rgpublic
Copy link

Wow. Took my ages to finally find this. Thanks a lot @Shelagh-Lewins !
You can simplify this even more on most systems to:

    "linters": {
        "sass": {
            "working_dir": "~"
        }
    }

@rgpublic
Copy link

rgpublic commented Mar 2, 2022

Well, but in the README file it says:

If a .sass-lint.yml file is not found in the file hierarchy starting with the linted file, your home directory will also be searched.

IMHO, it should work like that, i.e. it should search in the user's home directory by default without configuring anything.
But it doesn't. Don't know whether anyone else thinks it should search there by default. But if it doesn't, at the very least this confusing sentence should be removed.

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

Successfully merging a pull request may close this issue.

5 participants