Comments (9)
Are you able to upload your .sass-lint.yml
file?
from vscode-sass-lint.
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.
I'm not able to reproduce this on Windows, and I don't have access to a Mac. 😐
Have you tried:
- Copying or symlinking the
.sass-lint.yml
file into your project (and removing thesasslint.configFile
setting) - 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) - Removing the files/include section from your configuration, in case that is causing problems
from vscode-sass-lint.
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
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.
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.
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").
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.
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.
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.
@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)
- [scss] ( expected when interpolation is used HOT 2
- Global config file HOT 1
- Error message when using CSS variables HOT 1
- Extension not working HOT 2
- :not(:first-child()) causes an error HOT 1
- sass-lint server causes 100% cpu load HOT 3
- JSON .sasslintrc config file support ? HOT 3
- [Feature-Request] update linting on config rule change without vscode reload HOT 5
- sass-lint not running HOT 1
- Formatting grid-template to single line
- Linting doesn't work in VSCode HOT 2
- config file location and rule resolution HOT 4
- Rule space-around-operator is not working HOT 2
- VS Code doesn't see extension config HOT 2
- Doesn't see sass-lint HOT 3
- Doesn't see sass-lint installed globally via yarn HOT 9
- Question: Where can we disable particular rules? HOT 4
- How to configure scss/sass lint rule validation using sass-lint? HOT 1
- Cant lint CSS custom properties if property-sort-order is enabled HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-sass-lint.