Git Product home page Git Product logo

vscode-sass-lint's Introduction

vscode-sass-lint

VS Code extension to support sass-lint.

Development setup

  • run npm install inside the sass-lint and sass-lint-server folders
  • open VS Code on sass-lint and sass-lint-server

Developing the server

  • open VS Code on sass-lint-server
  • run npm run compile or npm run watch to build the server and copy it into the sass-lint folder
  • to debug press F5 which attaches a debugger to the server

Developing the extension/client

  • open VS Code on sass-lint
  • run F5 to build and debug the extension

vscode-sass-lint's People

Contributors

glen-84 avatar thierrymichel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

kraenhansen

vscode-sass-lint's Issues

Cant lint CSS custom properties if property-sort-order is enabled

Using the basic example from https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties :

element { --main-bg-color: brown; }

I got the following error:

vscode-sass-lint: 'Cannot read property 'first' of null' while validating: X.scss stacktrace: TypeError: Cannot read property 'first' of null at C:\Users\X\AppData\Roaming\npm\node_modules\sass-lint\lib\rules\property-sort-order.js:108:27 at Node.forEach

This only happens if on 'sass-lint.yml' the 'property-sort-order' is set to 1.

Thanks for your time and great work on this extension.

Best regards

vscode freeze up

My vscode editor freezes up. Or at least will not save any files, and I can hear my processor fan working more than usual at times when this happens. I believe it is related to this extension, but am unable or don't know how to trouble shoot any further.

Environment changes
Changes that took place from the day before when everything was working great.

  • I had a windows update;
  • I believe vs Code also updated and
  • I was prompted to update vscode-sass-lint, which I did.
    This is when the problems started happening. Not sure or can't remember of any other changes

Actions Takens
Since then I have:

  • updated sass-lint -g (not sure if this is the linter vscode uses);
  • updated node and
  • updated npm just in case.

Aside
I am also sitting with quite a few error messages produced by the sass-linter. This relates to indentation errors when using @media queries. I have logged this error with sass-lint hub, as I believe it is a sass-lint issue. The code compiles correctly though, so apart from being highly annoying, the error messages is manageable until their next update which hopefully is soon. I am not sure if this is causing vscode-sass-lint to fail aswell? For more info on this issue, see their issue list#591.

Further
At one stage yesterday vs Code logged a message at the top of the screen indicating that it had stopped operations of this extension as it has failed to respond more than 5 times. That was great for me as I was able to start working again. Well, that was until I had to restart vs code for another project and the problems returned.

next step
My only option now is the uninstall vscode-sass-lint, or switch to Atom.

[scss] ( expected when interpolation is used

Hello,

I get [scss] ( expected when interpolation is used for variable in media query:

    @media screen and #{breakpoint(medium)} and (min-height: 50em) {
        min-height: 100vh;
        padding: rem-calc(200 0);
    }

#{breakpoint(medium)} returns (min-width: 40em), so there's no need for (.

Is there anything I can do about it?

Doesn't see sass-lint

[Info - 1:27:29 PM] Failed to load the sass-lint library for the document "/home/ilya/dev/Drom/TestTask/src/assets/styles/style.sass"

To use sass-lint in this workspace, install it using "npm install sass-lint", or globally using "npm install -g sass-lint".

You need to reopen the workspace after installing sass-lint.

~ : which sass-lint 
/usr/local/bin/sass-lint

restart vscode...

the same output as above

Error is displayed when sass-lint is not installed in current project

When working on a project in which sass-lint is not being used, (so it's not installed as a local npm dev dependency), the extension will complain when settings are saved.

This is the error that's presented as a VS Code notification dialog:

Failed to load sass-lint library. Please install sass-lint in your workspace folder using 'npm

IMO if sass-lint is not found in the current project, the extension should behave as if it was disabled.

I wouldn't mind this error (could even be helpful, actually) if VS Code would allow users to disable extensions globally and enable them on a per-workspace basis. Then users would just enable extensions like this only on projects that actually need them. ( microsoft/vscode#15611 )

Thanks!

Global config file

Could you please tell me how and where to put the .sass-lint.yml so it is used globally in all projects? I would like to set indent size to 4 but I could only set it per project. Am I missing something?

Error message when using CSS variables

When using css variables inside SCSS files, the vscode-sass-lint plugin constantly throws errors and does not continue validating the rest of the file.

The error message that is shown is:

vscode-sass-lint: 'Cannot read property 'is' of null' while validating: /Users/mirigoyen/Git/projectname/client/components/WelcomeScreen/WelcomeScreen.scss stacktrace: TypeError: Cannot read property 'is' of null at processNode (/Users/mirigoyen/Git/projectname/node_modules/sass-lint/lib/rules/indentation.js:177:44) at processNode (/Users/mirigoyen/Git/projectname/node_modules/sass-lint/lib/rules/indentation.js:204:9) at processNode (/Users/mirigoyen/Git/projectname/node_modules/sass-lint/lib/rules/indentation.js:204:9) at processNode (/Users/mirigoyen/Git/projectname/node_modules/sass-lint/lib/rules/indentation.js:204:9) at processNode (/Users/mirigoyen/Git/projectname/node_modules/sass-lint/lib/rules/indentation.js:204:9) at processNode (/Users/mirigoyen/Git/projectname/node_modules/sass-lint/lib/rules/indentation.js:204:9) at Object.detect (/Users/mirigoyen/Git/projectname/node_modules/sass-lint/lib/rules/indentation.js:208:5) at /Users/mirigoyen/Git/projectname/node_modules/sa...

A couple sample files look like:

:root {
  --primary: rgb(var(--primary-color));
  --secondary: rgb(var(--secondary-color));
}
.welcome-screen {
  align-items: center;
  background-color: $black;
  background-image: url('../../assets/landing-bg.png'), radial-gradient(rgba(var(--secondary-color), 1), rgba(var(--secondary-color), .7));
  display: flex;
  height: 100vh;
  justify-content: center;
}

Cant get it to run

I just installed Sass Lint 1.0.2 in my VS Code, but couldn't get any indication of any linting happening.

When I tried command line on the file I have open, there were some issues, but never in the IDE.

image

Information about my setup:

OS version: Mac OS X High Sierra 10.13.4
VS Code version: 1.23.1
Node.js version: 6.2.2
sass-lint version: 1.12.1 (global)
How many sass/scss files open: 2

Extension configuration:
image

the path above to the .sass-lint.yml is a working path. When I copy paste it in a terminal screen after a vi command I get the file content, so that shouldn't be an issue.

Formatting grid-template to single line

Currently formats the following grid-template code to one line.

    grid-template:
        [row1-start] "header header header"25px [row1-end] 
        [row2-start] "footer footer footer"25px [row2-end] 
        / auto 50px auto;

JSON .sasslintrc config file support ?

I use a JSON config file such as the one provided in the docs : https://github.com/sasstools/sass-lint/blob/develop/docs/.sasslintrc

I have set option sasslint.configFile to .sasslintrc in settings, however vscode does not seem to use it at all. I do have lint warnings/errors showing on scss file but it does not seem to be affceted by rule changes in .sasslintrc.

Is JSON config file supported by this extension ?

  • vscode-sass-lint 1.0.4
  • VS code: 1.31.1
  • OS: Linux x64 4.15.0-45-generic

Example of how VCS settings work

The following settings sound great but I cannot seem to get them to work. Can you provide examples of what values could be and how they would resolve? The config file path setting is not clear as to if it handles only the path or what kinds of paths are possible. The relative to config, is that the config of the workspace or the user? I am currently on a Mac, though I am sure Windows examples would be welcome by the community as well.

  • sasslint.configFile - A .sass-lint.yml file to use/fallback to if no config file is found in the current project.
  • sasslint.resolvePathsRelativeToConfig - This option allows you to choose to resolve file paths relative to your
    config file rather than relative to the root of your currently open project.

Question: Where can we disable particular rules?

For example, I want to disable Class '.optionsList' should be written in lowercase with hyphenssass-lint(class-name-format) rule, because I use css-modules extension and want to be persistent in code-style

Support sass-lint module in project subdirectory

I have a project set up like this:

/my-project
  /styles-for-a
  /styles-for-b

Both styles-for-a and styles-for-b have a .sass-lint.yml and an installed sass-lint node module. However, trying to open a Sass file in either dir yields

Failed to load sass-lint library. Please install sass-lint in your workspace folder…

My project setup works as expected in Atom's linter-sass-lint. I'd suggest that the sass-lint node module should be resolved relative to each .sass-lint.yml, rather than at the workspace root.

Not picking up configuration from project .sass-lint.yml file

Hi,

I've got a .sass-lint.yml file in place within our project for use within our asset build. I've recently installed this plugin and should be able to point it to this file for the validation rules. The plugin is running and throwing up errors but these do not reflect those rules in my config file.

Changes to this file also seem not to have any effect.

I've tried specifying the sass-lint config file path directly in my package.json file, but that didn't work.

I have also tried setting the plugin config option sasslint.configFile, but understand this is a fallback.

Am I missing something?

Thanks.

Enhancement: More sync with Atom version

This is not a bug, a lot of people have been dropping atom for VS code, and linting is a huge part of that. The one gripe is that errors aren't as easily visible, if you don't have the problems tab opened. And the tiny red line isn't enough.

This has a great example SCSS Lint Version where it highlights the offending area in red.

The second is, in ATOM, you can click on the rule and it would take you to documentation, is that a future enhancement?

Otherwise no other major issues.

How do you set the sasslint.configFile to the root/home on Mac OS?

I have tried several options to point to my configuration file at the root of my Mac OS. The VS Code extension CSSComb uses the root location and so I want to put my .sass-lint.yml file there as well. In my settings I have tried:

"sasslint.configFile": "$HOME/.sass-lint.yml"
"sasslint.configFile": "~/.sass-lint.yml"
"sasslint.configFile": "/.sass-lint.yml"
"sasslint.configFile": "$HOME"
"sasslint.configFile": "~"

The instructions provided are not very clear to me. Help would really be appreciated.

Sass lint in *.vue files

Hi!

I'm triying to set up sass lint in .vue files. In atom i've installed a plugin for that, and in the top of my .sass-lint.yml file, i've added the following lines:

  include:
    - '**/*.s+(a|c)ss'
    - '**/*.vue'

There is any chance to get working sass lint on .vue files??

Thank you very much! And congrats for the plugin!

Include relative path not working

When I first saw this extension, I installed it an expected it to work with a globally installed sass-lint and a local .sass-lint.yml project file. The only prerequisite in the readme is "The extension requires that sass-lint is installed either locally or globally."

Linting does not occur in this setup, so I tried disabling the vscode built-in scss.validate and css.validate options to no avail.

Running $ sass-lint in my project root folder produces expected lint errors, yet there are no visible hints, warnings, or errors when viewing a .scss file in vscode.

The root repo has a separate readme discussing a server, but there's no "sass-lint-server" npm package or vscode extension. At this point, I'm not even sure if this extension is supposed to generate in-editor lint errors or if it is intended for something else.

.scss-lint.yml is ignored.

Enviroment

  • VS Code: 1.10.2
  • Sass Lint: 0.0.3

problem summary

sass linter works, and seems to ignore .scss-lint.yml. the file is present on the root path of the project.

sample Scss File

        #balance-header {
            margin-top: 0;
        }
  • got the following errors:
    both of the errors are not justified by my configuration file, as i want to allow ID selector and specified Indentation of 4.
file: 'file:///c%3A/projects/banking/src/sass/dashboard.scss'
severity: 'Warning'
message: 'ID selectors not allowed'
at: '2,9'
source: 'sass-lint'
file: 'file:///c%3A/projects/banking/src/sass/dashboard.scss'
severity: 'Warning'
message: 'Expected indentation of 0 space but found 8.'
at: '2,9'
source: 'sass-lint'1

.scss-lint.yml:

linters:
    PropertySortOrder:
        enabled: false

    DuplicateProperty:
        enabled: false

    Indentation:
        allow_non_nested_indentation: true
        width: 4

    SelectorDepth:
        max_depth: 16

    SpaceAfterPropertyColon:
        enabled: true

    Compass::*:
        enabled: true

    NestingDepth:
        enabled: true
        max_depth: 16
        # ignore_parent_selectors: true

    IdSelector:
        enabled: true

    ImportantRule:
        enabled: false

    QualifyingElement:
        allow_element_with_attribute: true
        allow_element_with_class: true
        allow_element_with_id: true

    PlaceholderInExtend:
      enabled: false

    Comment:
        enabled: false

    VendorPrefix:
        excluded_identifiers: ['touch-action']

    SelectorFormat:
        enabled: true
        convention: hyphenated_BEM

    SpaceBetweenParens:
        enabled: false

    SpaceAroundOperator:
        enabled: false

    StringQuotes:
        enabled: false

    FinalNewline:
        enabled: false

    NameFormat:
        enabled: false

Add support for multi-root workspaces

I'm creating this issue to let users know that multi-root support is in development and should be released within the next few weeks.

I apologize for the delay, but I have very little free time at the moment.

#13, #16, and #18 should be resolved at the same time.

chokidar use trips on large sub-directory trees

server code

const watcher = chokidar.watch(`**/${CONFIG_FILE_NAME}`, ...

will create watcher for every directory in project - in case CONFIG_FILE_NAME file appears in one.

This trips on projects with a lot of directories (for example project with long development history, thus many dirs and files in .git dir).

Error: watch .git/objects/1b ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/smoku/.vscode/extensions/glen-84.sass-lint-0.0.3/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
...

Extension not working

Hi,

After installing the extension and making sure that "sass-lint" is available, both globally as well as locally, the extension still seems to fail to load/run/lint.

Our project structure:

  • root
  • .sass-lint.yml
    -- packages
    --- src
    ---- .scss file

When we run the sass-linter manually with sass-lint '**/*.scss' -v, it picks up all the files to lint correctly and outputs any of the issues in the terminal.

Relevant information:

  • MacOS High Sierra 10.13.5
  • VSCode 1.25.0
  • VSCode Sass Lint extension 1.0.2
  • local sass-lint 1.12.1
  • global sass-lint 1.12.1
  • VSCode Extension Host output:
[2018-07-10 16:44:51.143] [exthost1] [info] ExtensionService#_doActivateExtension glen-84.sass-lint {"startup":false,"activationEvent":"onLanguage:scss"}
[2018-07-10 16:44:51.143] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/<account-name>/.vscode/extensions/glen-84.sass-lint-1.0.2/out/extension
  • .sass-lint.yml content:
files:
  include: 'sass/**/*.s+(a|c)ss'
  ignore: 'node_modules/**'

rules:
  class-name-format:
    - 2
    - convention: hyphenatedlowercase
  single-line-per-selector: 1
  space-around-operator: 2
  space-before-brace: 2
  space-before-bang: 2
  space-before-colon: 2
  space-between-parens: 2
  zero-unit:
    - 2

Things we've tried:

  • move the sass-lint config file into the "package" folder, next to the "scss" file
  • setting the path to config file in VSCode settings

Let me know if you require any additional information.

sass-lint server causes 100% cpu load

I noticed that my MacBook Pro 15's (running on Mojave 10.14.2) vent was very loud so I checked Activity monitor and there was Code helper process running. So checked the PID and ran ps aux | grep 1234 in terminal. The output was the following:

100.0  0.4  5126880  69648   ??  R    12:08PM   2:48.45 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Users/whatever/.vscode/extensions/glen-84.sass-lint-1.0.4/server/sass-lint-server.js --node-ipc --clientProcessId=32034

So it's coming from your extension. I have a lot of sass and scss files in my project, but at the same time, other extensions do not cause such issues and there's much more js files in the project and I have eslint enabled as well.

After disabling your plugin, the issue no longer appeared. Disabling is not a solution though because I need linter :)

Sass lint doesn't work anymore

Sass lint became broken after the latest VSCode update.

I get these errors each time I launch vscode:

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: watch node_modules/gulp.spritesmith/node_modules/xtend ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:74:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:123:15)
[Info  - 10:11:05 AM] Connection to server got closed. Server will restart.
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: watch node_modules/gulp.spritesmith/test/test-files ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:74:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:123:15)
[Info  - 10:11:10 AM] Connection to server got closed. Server will restart.
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: watch node_modules/gulp.spritesmith/test/expected-files ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:74:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:123:15)
[Info  - 10:11:14 AM] Connection to server got closed. Server will restart.
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: watch node_modules/gulp.spritesmith/test/expected-files ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:74:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:123:15)
[Info  - 10:11:17 AM] Connection to server got closed. Server will restart.
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: watch node_modules/handlebars/dist/amd ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:74:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/sooley/.vscode/extensions/glen-84.sass-lint-0.0.2/server/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:123:15)
[Error - 10:11:21 AM] Connection to server got closed. Server will not be restarted.

[sass-lint] Mixed tabs and spaces - quick fix?

I am having a bit of a hassle with the plugin. Everything is good, but I keep on getting these [sass-lint] Mixed tabs and spaces warnings which make my whole document green.

Excuse me if this is something really simple, but I haven't found a solution to this problem on the internet yet.

This is happening only in *.scss files after I installed the plugin.

Here is a visualization:

2o6d49ktov

VS Code doesn't see extension config

Hi!

We've tried to configure vscode-sass-lint extension today, but failed.
And we couldn't figure out, what is wrong :(
We aren't getting errors, whatever we do :(

Our config looks like this:

1


Some additional information:

  1. node_modules contains sass-lint package, v.6.9.0
  2. both .yml and node_modules paths are correct
  3. VS Code restarts does nothing
  4. opened .scss file contain errors (for testing)
  5. Running linter from console (using sass-lint --verbose) works fine (it shows output and errors)

I'm sure, we're missing something, but can't figure out what by ourselves :(

VSCode-Sass-Lint does not find .sass-lint.yml files, no linting enabled

Unable to get Sass Lint to work in VS Code. Atom does not have this problem with sass-lint. Neither does Sublime Text 3, it is purely this plugin.

  • OS: Windows 10 Pro x64
  • VS Code version: 1.11.1 (also didn't work on earlier versions)
  • Node version: v6.10.2 (the LTS version recommended by the Node.js website)
  • Sass-lint version: 1.10.2
  • Sass-lint installed globally
  • .sass-lint.yml file located in the root directory

I have attached a screenshot of the files I'm working with. As you can see, the code is out of order compared to what the .sass-lint.yml file states (I'm using the one you can find on the Foundation Github page). And that's just one problem, it doesn't pick up on broken syntax or missing semi-colons etc.

You'll notice to the right, the .sass-lint.yml file is in the root for that folder (e.g. Foundation).

Both ESLint and HTMLHint work. This does not.

Node Modules Installed Globally

cmd

Image of Workspace

example

Keeps crashing

I keep getting the following flash shown:

The Sass Lint server crashed 5 times in the last 3 minutes. The server will not be restarted.

I can't see any stack trace or anything but the vscode instance must be restarted to get warnings and errors from this extension again.

This is on Windows 10.
sass-lint: v.1.9.0
node: v6.3.0
vscode: 1.4.0
there are 4 sass files in the project.

It will happen as I'm making changes to the sass files attempting to fix up the problems.

My config file:

files:
  include: 'assets/sass/*.s+(a|c)ss'
rules:
  property-sort-order:
  - 1
  -
    order: 'smacss'

And relevant settings in vscode settings:

{
  "scss.validate": false,
  "sasslint.enable": true,
  "sasslint.configFile": ".sass-lint.yml"
}

I wish I could be of more help - do you know of a way I can get the stack trace from the language service? The only thing the vscode dev tools report is a console.error in messageService.js.

Rule space-around-operator is not working

Rule space-around-operator is not working.
My config:

files:
  include: './src/**/*.s+(a|c)ss'
  ignore:
    - 'node_modules/**/*'
options:
  formatter: stylish
  merge-default-rules: false
rules:
  border-zero:
    - 1
    - convention: none
  brace-style:
    - 1
    - allow-single-line: true
  class-name-format:
    - 1
    - convention: hyphenatedbem
  clean-import-paths:
    - 1
    - filename-extension: false
      leading-underscore: false
  empty-line-between-blocks:
    - 1
    - ignore-single-line-rulesets: true
  extends-before-declarations: 0
  extends-before-mixins: 0
  final-newline:
    - 1
    - include: true
  force-attribute-nesting: 0
  force-element-nesting: 0
  force-pseudo-nesting: 0
  function-name-format:
    - 1
    - allow-leading-underscore: true
      convention: hyphenatedlowercase
  hex-length:
    - 0
    - style: short
  hex-notation:
    - 0
    - style: lowercase
  id-name-format:
    - 1
    - convention: hyphenatedbem
  indentation:
    - 0
    - size: 2
  leading-zero:
    - 1
    - include: true
  mixin-name-format:
    - 1
    - allow-leading-underscore: true
      convention: hyphenatedlowercase
  mixins-before-declarations: 0
  nesting-depth:
    - 0
    - max-depth: 6
  no-color-literals: 0
  no-css-comments: 1
  no-debug: 1
  no-duplicate-properties: 1
  no-empty-rulesets: 1
  no-ids: 0
  no-important: 1
  no-invalid-hex: 1
  no-mergeable-selectors: 1
  no-misspelled-properties:
    - 1
    - extra-properties:
        - animate
        - overflow-scrolling
  no-qualifying-elements:
    - 1
    - allow-element-with-attribute: true
      allow-element-with-class: true
      allow-element-with-id: false
  no-trailing-zero: 1
  no-url-protocols: 0
  no-vendor-prefixes: 0
  placeholder-in-extend: 1
  placeholder-name-format:
    - 1
    - convention: hyphenatedbem
  property-sort-order: 0
  quotes:
    - 0
    - style: single
  shorthand-values: 1
  single-line-per-selector: 1
  space-after-bang:
    - 1
    - include: false
  space-after-colon: 1
  space-after-comma: 1
  space-before-bang:
    - 1
    - include: true
  space-before-brace:
    - 1
    - include: true
  space-before-colon: 1
  space-between-parens:
    - 1
    - include: false
  space-around-operator:
    - 2
    - include: true
  trailing-semicolon: 2
  url-quotes: 0
  variable-for-property:
    - 0
    - properties: []
  variable-name-format:
    - 1
    - allow-leading-underscore: true
      convention: hyphenatedlowercase
  zero-unit: 0

image

In console space-around-operator rule still working correctly
image

I try edit some rule. Then I found that configuration is not use by sass-lint plugin not just space-around-operator rule.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.