Git Product home page Git Product logo

Comments (9)

glen-84 avatar glen-84 commented on August 20, 2024

Are you able to upload your .sass-lint.yml file?

from vscode-sass-lint.

Donaldini avatar Donaldini commented on August 20, 2024

Here you go:

options:
  formatter: stylish
  convention-explanation: 'SASS Standard - Protime adjustment'
files:
  include:
    - 'drool/**/*.s+(a|c)ss'
    - 'drool-lib/**/*.s+(a|c)ss'
    - 'app/**/*.s+(a|c)ss'
rules:
  # Extends
  extends-before-mixins: 2
  extends-before-declarations: 2
  placeholder-in-extend: 2

  # Mixins
  mixins-before-declarations: 2

  # Line Spacing
  one-declaration-per-line: 2
  empty-line-between-blocks: 2
  single-line-per-selector: 2

  # Disallows
  declarations-before-nesting: 2
  no-color-keywords: 2
  no-color-literals: 2
  no-css-comments: 0
  no-debug: 2
  no-duplicate-properties: 2
  no-empty-rulesets: 2
  no-extends: 0
  no-ids: 2
  no-important: 0                 # Should be an error, but requires some changes on legacy files
  no-invalid-hex: 2
  no-mergeable-selectors: 2
  no-misspelled-properties: 2
  no-qualifying-elements:
    - 2
    -
      allow-element-with-attribute: true
      allow-element-with-class: true
      allow-element-with-id: false

  no-trailing-zero: 2
  no-transition-all: 0            # Should be an error, performance impact and unpredictable
  no-url-protocols: 0
  no-url-domains: 0
  no-vendor-prefixes: 2
  no-warn: 2
  property-units: 0

  # Nesting
  force-attribute-nesting: 0
  force-element-nesting: 0
  force-pseudo-nesting: 0

  # Name Formats
  class-name-format:
    - 0                         # NO warning, this is unusable because of the amount of warnings, we want to set this as an error once all components have been converted to CSS modules
    -
      convention: 'camelcase'

  function-name-format: 2
  id-name-format: 0
  mixin-name-format: 2
  placeholder-name-format:
    - 1
    -
      convention: 'camelcase'

  variable-name-format: 0
  clean-import-paths: 0

  # Style Guide
  bem-depth: 0
  border-zero:
    - 2
    -
      convention: 'none'

  brace-style:
    - 2
    - 
      style: '1tbs'
      allow-single-line: true

  empty-args: 2
  hex-length: 2
  hex-notation: 2
  indentation:
    - 2
    - 
      size: 4

  leading-zero: 0
  nesting-depth:
    - 2
    -
      max-depth: 5

  property-sort-order:
    - 2
    -
      order: 'concentric'

  quotes: 2
  shorthand-values: 2
  url-quotes: 2
  variable-for-property: 2
  zero-unit: 2

  # Inner Spacing
  space-after-comma: 2
  space-before-colon: 2
  space-after-colon: 2
  space-before-brace: 2
  space-before-bang: 2
  space-after-bang: 2
  space-between-parens: 2
  space-around-operator: 2

  # Final Items
  trailing-semicolon: 2
  final-newline: 2

from vscode-sass-lint.

glen-84 avatar glen-84 commented on August 20, 2024

I'm not able to reproduce this on Windows, and I don't have access to a Mac. 😐

Have you tried:

  1. Copying or symlinking the .sass-lint.yml file into your project (and removing the sasslint.configFile setting)
  2. When running sass-lint from the command line, using the -c option to specify the path to your configuration file (I don't know whether the output that you're seeing is from the default configuration or your own configuration)
  3. Removing the files/include section from your configuration, in case that is causing problems

from vscode-sass-lint.

Donaldini avatar Donaldini commented on August 20, 2024

In the editor I still can't see any errors, command line has always worked.
I tried your steps anyway by

  • removing all user settings related to sass-lint
  • Added sass-lint file to my project
  • double checked command line

example

There was no difference in results when I tried with or without the reference to the local sass-lint file:

sass-lint 'src/css/profile.scss' -v -q
sass-lint -c '.sass-lint.yml' 'src/css/profile.scss' -v -q

Both worked and gave the same amount of errors in console, but none in VS Code.

from vscode-sass-lint.

glen-84 avatar glen-84 commented on August 20, 2024

Did you try without this part in your config file?

files:
  include:
    - 'drool/**/*.s+(a|c)ss'
    - 'drool-lib/**/*.s+(a|c)ss'
    - 'app/**/*.s+(a|c)ss'

If it still doesn't work, it'd help to have a small project that I could use to test a similar setup on my PC.

from vscode-sass-lint.

cspanring avatar cspanring commented on August 20, 2024

I'm experiencing the exact same issue, sass-lint cli is reporting fine, while the VS Code sass-lint UI only indicates a few problems ("Do not use empty rulesets").

screenshot 2018-07-25 08 55 00

project to reproduce this issue: https://github.com/cspanring/vscode-sass-lint-issue (sass file is at app/styles/app.scss)

from vscode-sass-lint.

glen-84 avatar glen-84 commented on August 20, 2024

@cspanring,

Thanks for creating the test project. It's working fine on Windows, and as mentioned above, I don't have access to a Mac unfortunately.

I've just fixed the tracing option (in vscode-sass-lint 1.0.3), and if you wouldn't mind running that it should give us some more information.

  • Add "sasslint.trace.server": "verbose" to your settings
  • Open the Output window
  • Select Sass Lint from the drop-down menu

If you close all files, clear the output window, and then open a single Sass file, you should see a bunch of output in that window. If you could paste/attach that here then hopefully it'll help me to figure out what's going wrong.

from vscode-sass-lint.

cspanring avatar cspanring commented on August 20, 2024

Sass-lint is working as expected again, listing all problems and showing them in the editor UI. Was that your change? I thought 1.0.3 "just" adds better debug output. In any case, thanks!

from vscode-sass-lint.

glen-84 avatar glen-84 commented on August 20, 2024

@cspanring, I only changed one line, so I don't think that's related. Perhaps your installation was corrupt, and the update fixed that. Glad to hear that it's working for you.

I'll close this issue, as the OP has not responded to recent messages.

from vscode-sass-lint.

Related Issues (20)

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.