Personal web site, powered by Jekyll.
sds / scss-lint Goto Github PK
View Code? Open in Web Editor NEWConfigurable tool for writing clean, consistent SCSS
License: MIT License
Configurable tool for writing clean, consistent SCSS
License: MIT License
Personal web site, powered by Jekyll.
When I navigate to my scss files via the terminal and run
scss-lint .
I get this error, and I don't know what it is going on about, maybe something to do with the scss parser?
scss-lint .
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/media_node.rb:38:in `value': NotImplementedError (NotImplementedError)
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/lib/sass/tree.rb:55:in `children'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/set_options.rb:113:in `visit_media'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/set_options.rb:15:in `visit'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `map'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:39:in `visit'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/set_options.rb:15:in `visit'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/visitors/set_options.rb:5:in `visit'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/tree/node.rb:69:in `options='
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/engine.rb:348:in `_to_tree'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.12/lib/sass/engine.rb:274:in `to_tree'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/lib/scss_lint/engine.rb:20:in `initialize'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/lib/scss_lint/runner.rb:38:in `new'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/lib/scss_lint/runner.rb:38:in `find_lints'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/lib/scss_lint/runner.rb:29:in `block in run'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/lib/scss_lint/runner.rb:28:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/lib/scss_lint/runner.rb:28:in `run'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/lib/scss_lint/cli.rb:55:in `run'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/bin/scss-lint:7:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/bin/scss-lint:5:in `tap'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.7.0/bin/scss-lint:5:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/bin/scss-lint:23:in `load'
from /usr/local/rvm/gems/ruby-2.0.0-p247/bin/scss-lint:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>'
lee@lee-W150HNM-W170HN ~/Code/mobi_fit/app/assets/stylesheets $
I'm getting this error when trying to lint some of my scss files
invalid byte sequence in US-ASCII
/Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/lib/scss_lint/engine.rb:21:in split' /Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/lib/scss_lint/engine.rb:21:in
initialize'
/Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/lib/scss_lint/runner.rb:31:in new' /Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/lib/scss_lint/runner.rb:31:in
find_lints'
/Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/lib/scss_lint/runner.rb:20:in block in run' /Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/lib/scss_lint/runner.rb:19:in
each'
/Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/lib/scss_lint/runner.rb:19:in run' /Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/lib/scss_lint/cli.rb:90:in
run'
/Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/bin/scss-lint:7:in block in <top (required)>' /Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/bin/scss-lint:5:in
tap'
/Users/cerouno/.rvm/gems/ruby-2.0.0-p247/gems/scss-lint-0.14.0/bin/scss-lint:5:in <top (required)>' /Users/cerouno/.rvm/rubies/ruby-2.0.0-p247/bin/scss-lint:23:in
load'
/Users/cerouno/.rvm/rubies/ruby-2.0.0-p247/bin/scss-lint:23:in `
Any idea?
Best regards.
As per the subject line, scss-lint is smart enough to suggest changing:
div#ccpop
to:
#ccpop
but misses things like:
&.mode_other tr#cc_state_row
When passing keyword arguments to a function or mixin, e.g.
@include line-clamp($line-count: 3, $line-height: 1.5em);
...scss-lint
will incorrectly report lints for each keyword argument.
This is caused by the Sass parser (as of 3.2.9) normalizing the keyword arguments to their underscore-ized form when building the parse tree.
There are two possible solutions:
Sass::Script::Variable#underscored_name
to return the original name
.
scss-lint
doesn't compile SCSS for any of its lints...yet)func($line-height: 1, $line_height: 1)
the parser won't report an error. Probably ok, as this is an extreme edge case.sass
to change the keywords
attribute of Funcall
and MixinNode
nodes so that it isn't a hash of String => Sass::Script::Node
, but something that preserves the original name of the variable, like Sass::Script::Variable => Sass::Script::Node
.
sass
gem to fork until it is merged upstream (and there is a chance it may not be merged upstream).Will investigate when more time permits.
I'm not sure about you guys,
but I feel like sorting -ms-
,-moz-
, is a good idea, can you put in a clause to the linter that doesn't sort these properties?
I'd just do if key starts with - ignore it
but maybe you'll think of something better ๐
This linter complains about the reasonably readable scss that looks like:
.first-selector, /* I'm a comment */
.second-selector, // I'm a different type of comment
.third-selector {
color: red;
}
Don't do:
@include box-shadow(0 2px 2px rgba(0,0,0,.2));
color: rgba(0,0,0,.1);
Do:
@include box-shadow(0 2px 2px rgba(0, 0, 0, .2));
color: rgba(0, 0, 0, .1);
Maybe I'm being silly but I've got scss-lint 0.12.1
and I'm trying to specify a config file but when I use either -c
or --config
as CLI flags I get an invalid option error. What could I be doing wrong?
Hello! We have a rather large collection of Sass files, so I am very excited about getting some linting going on!
I've got my environment set up to satisfy the requirements in the README:
$ sass --version
Sass 3.3.0.rc.1 (Maptastic Maple)
$ ruby --version
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.3.0]
However, my progress was quickly halted with this error.
$ scss-lint src/scss/
/Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter/shorthand.rb:36:in `check_script_string': undefined method `type' for 5px:Sass::Script::Value::Number (NoMethodError)
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter/shorthand.rb:14:in `visit_prop'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/sass-3.3.0.rc.1/lib/sass/tree/visitors/base.rb:37:in `visit'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter.rb:50:in `visit'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter.rb:57:in `block in visit_children'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter.rb:55:in `each'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter.rb:55:in `visit_children'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/sass-3.3.0.rc.1/lib/sass/tree/visitors/base.rb:39:in `visit'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter.rb:50:in `visit'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter.rb:57:in `block in visit_children'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter.rb:55:in `each'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter.rb:55:in `visit_children'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/sass-3.3.0.rc.1/lib/sass/tree/visitors/base.rb:39:in `visit'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter.rb:50:in `visit'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/linter.rb:14:in `run'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/runner.rb:39:in `block in find_lints'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/runner.rb:38:in `each'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/runner.rb:38:in `find_lints'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/runner.rb:27:in `block in run'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/runner.rb:26:in `each'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/runner.rb:26:in `run'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/lib/scss_lint/cli.rb:63:in `run'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/bin/scss-lint:7:in `block in <top (required)>'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/bin/scss-lint:5:in `tap'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/gems/scss-lint-0.11.1/bin/scss-lint:5:in `<top (required)>'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/bin/scss-lint:23:in `load'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/bin/scss-lint:23:in `<main>'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/dave/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
Here is the log from installing scss-lint:
$ gem install scss-lint
Fetching: colorize-0.5.8.gem (100%)
Successfully installed colorize-0.5.8
Fetching: rb-fsevent-0.9.3.gem (100%)
Successfully installed rb-fsevent-0.9.3
Fetching: rb-inotify-0.9.2.gem (100%)
Successfully installed rb-inotify-0.9.2
Fetching: rb-kqueue-0.2.0.gem (100%)
Successfully installed rb-kqueue-0.2.0
Fetching: listen-1.1.6.gem (100%)
Successfully installed listen-1.1.6
Fetching: sass-3.3.0.rc.1.gem (100%)
Successfully installed sass-3.3.0.rc.1
Fetching: scss-lint-0.11.1.gem (100%)
Successfully installed scss-lint-0.11.1
Installing ri documentation for colorize-0.5.8
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for bin/fsevent_watch, skipping
Installing ri documentation for rb-fsevent-0.9.3
Installing ri documentation for rb-inotify-0.9.2
Installing ri documentation for rb-kqueue-0.2.0
Installing ri documentation for listen-1.1.6
Installing ri documentation for sass-3.3.0.rc.1
Installing ri documentation for scss-lint-0.11.1
7 gems installed
Thanks for any help or advice!
Lint is reporting a hex error in a selector. E.g.:
#defaultPaymentTable td:first-child {
font-size: 16px !important;
}
$ scss-lint file.scss
... - Hexadecimal color codes should be lowercase and in 3-digit form where possible
Hi guys!
I tried to use scss-lint as a gem, to add a spec in my project. I have encountered several issues. The first is that when you load sass (https://github.com/causes/scss-lint/blob/master/lib/scss_lint.rb#L15) and sass loads sass/script (https://github.com/nex3/sass/blob/stable/lib/sass/engine.rb#L40) instead of loading the correct file, it loads scss-lint file (https://github.com/causes/scss-lint/blob/master/lib/sass/script.rb). Then, in here https://github.com/nex3/sass/blob/stable/lib/sass/scss/parser.rb#L1013 SASS blows up, because the constant Sass::Script::Parser is not set (undefined constant error).
So, my question is: is the Gem only to be used as CLI? Or you wanna try to fix it?
Best,
I'd write it myself, but my SASS parsing skills are not yet that strong. This should not fire a lint error:
.selector {
background: -moz-linear-gradient(center top, #717171, #1c1c1c);
background: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#1c1c1c));
}
@mixin prefixer-value ($property, $value, $prefixes) {
@each $prefix in $prefixes {
@if $prefix == webkit and $prefix-for-webkit == true {
#{$property}: -webkit-#{$value};
}
@else if $prefix == moz and $prefix-for-mozilla == true {
#{$property}: -moz-#{$value};
}
@else if $prefix == ms and $prefix-for-microsoft == true {
#{$property}: -ms-#{$value};
}
@else if $prefix == o and $prefix-for-opera == true {
#{$property}: -o-#{$value};
}
@else if $prefix == spec and $prefix-for-spec == true {
#{$property}: $value;
}
@else {
@warn "Unrecognized prefix: #{$prefix}";
}
}
}
I've got this mixin and scss-lint throws errors at it. because of the #{$property}
when I call scss-lint /my/dir -i property_format_linter
it doesn't remove the PropertyFormatLinter
.
Is sass compatibility planned? If not, are you guys open to pull requests? Thanks.
asottile@asottile$ ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
asottile@asottile$ scss-lint --help
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': /var/lib/gems/1.8/gems/scss-lint-0.8.0/lib/scss_lint/linter/single_line_per_selector_linter.rb:28: syntax error, unexpected '\n' (SyntaxError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/scss-lint-0.8.0/lib/scss_lint.rb:20
from /var/lib/gems/1.8/gems/scss-lint-0.8.0/lib/scss_lint.rb:19:in `each'
from /var/lib/gems/1.8/gems/scss-lint-0.8.0/lib/scss_lint.rb:19
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/scss-lint-0.8.0/bin/scss-lint:3
from /usr/local/bin/scss-lint:19:in `load'
from /usr/local/bin/scss-lint:19
Styles like:
content: " ";
Or:
background-position: 0 0;
Incorrectly get flagged as not using the shortest shorthand syntax allowed.
This is being incorrectly marked as shortenable:
padding: calc-em(10px, 12px) calc-em(15px, 12px);
I'm guessing it thinks the second 12px
(or maybe 12px)
?) can be left off.
It would be useful to have a --ignore <rule>
to ignore a specific kind of rule
$ g ci
Running pre_commit checks
Checking author_name........................OK
/Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/scss-lint-0.7.1/lib/scss_lint/linter/property_format_linter.rb:27: undefined (?...) sequence: / (RegexpError)
^\s*[^:]+(?<!\s):\s # property name, colon not preceded by a space, one space
( # followed by
(?-mix:(\S+\s)*\S+); # property and terminating semi-colon eg. a b c;
| # or
(((?-mix:(\S+\s)*\S+)\s)?\{) # nested property, optional value, trailing curly
)
/
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/scss-lint-0.7.1/lib/scss_lint.rb:19
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/scss-lint-0.7.1/lib/scss_lint.rb:18:in `each'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/scss-lint-0.7.1/lib/scss_lint.rb:18
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/overcommit-0.2.2/lib/overcommit/plugins/pre_commit/scss_lint.rb:8:in `run_check'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/overcommit-0.2.2/lib/overcommit/git_hook.rb:74:in `run_and_filter_check'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/overcommit-0.2.2/lib/overcommit/git_hook.rb:33:in `run'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/overcommit-0.2.2/lib/overcommit/reporter.rb:14:in `with_status'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/overcommit-0.2.2/lib/overcommit/git_hook.rb:32:in `run'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/overcommit-0.2.2/lib/overcommit/git_hook.rb:24:in `each'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/overcommit-0.2.2/lib/overcommit/git_hook.rb:24:in `run'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/overcommit-0.2.2/lib/overcommit/utils.rb:11:in `run_hooks'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/overcommit-0.2.2/lib/overcommit/utils.rb:11:in `each'
from /Users/adam/.rvm/gems/ruby-1.9.3-p448/gems/overcommit-0.2.2/lib/overcommit/utils.rb:11:in `run_hooks'
from .git/hooks/pre-commit:8
on the file:
@import 'mixins';
@import 'www/shared/global';
#feedback-modal {
width: 528px;
height: 500px;
.modalCloseImg {
background: image-url('common/modal-close.png') no-repeat top left;
cursor: pointer;
display: block;
height: 25px;
position: absolute;
right: 16px;
top: 10px;
width: 25px;
z-index: 10;
}
.simplemodal-data {
@include border-radius(10px);
@include box-shadow(0 0 5px 0 rgba(0,0,0,.5));
background: #fff;
color: #333;
font-size: 12px;
padding: 20px;
}
.simplemodal-wrap .feedback-form {
padding: 80px 50px 50px;
.listy {
background: image-url('apartmentlist/feedback-listy.png') no-repeat top left;
height: 86px;
left: 15px;
position: absolute;
top: 25px;
width: 121px;
}
.title {
color: #333;
font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', sans-serif;
font-size: 25px;
font-weight: 300;
margin-bottom: 30px;
margin-left: 100px;
}
.field {
@include clearfix;
}
label {
float: left;
font-weight: bold;
margin-right: 10px;
margin-top: 10px;
text-align: right;
text-transform: uppercase;
width: 85px;
}
.name,
.email,
textarea {
@include contact-input(310px);
float: left;
}
.error,
.error_message {
background: #fce6e5;
border-color: #f99090;
}
textarea {
height: 150px;
}
.error_message {
@include border-radius(4px);
display: none;
font-size: 14px;
margin-top: 5px;
padding: 11px;
}
.submit {
@include button;
float: right;
padding: 10px 15px;
}
}
}
#recaptcha_area {
float: right;
}
I'm getting this error on a rule that looks like this:
.main {
@media #{$medium} {
background: $primary-white;
clear: left;
border-top: 1px solid #dad7d7;
}
}
wrong number of arguments(1 for 0)
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/script/list.rb:44:in to_s' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/script/list.rb:44:in
block in to_s'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/script/list.rb:44:in map' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/script/list.rb:44:in
to_s'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/scss-lint-0.6/lib/scss_lint/linter/shorthand_linter.rb:35:in check_valid_shorthand_value' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/scss-lint-0.6/lib/scss_lint/linter/shorthand_linter.rb:12:in
block in run'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in block (2 levels) in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in
block (2 levels) in each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in block (2 levels) in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in
block (2 levels) in each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in block (2 levels) in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:150:in
each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in block in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in
each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in
block in each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in
each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in block in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in
each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in
block in each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in
each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in block in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in
each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/sass-3.2.7/lib/sass/tree/node.rb:151:in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/scss-lint-0.6/lib/scss_lint/linter/shorthand_linter.rb:10:in
run'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/scss-lint-0.6/lib/scss_lint/runner.rb:35:in block in find_lints' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/scss-lint-0.6/lib/scss_lint/runner.rb:34:in
each'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/scss-lint-0.6/lib/scss_lint/runner.rb:34:in find_lints' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/scss-lint-0.6/lib/scss_lint/runner.rb:27:in
block in run'
/home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/scss-lint-0.6/lib/scss_lint/runner.rb:26:in each' /home/kato/workspace/wize/vendor/bundle/ruby/1.9.1/gems/scss-lint-0.6/lib/scss_lint/runner.rb:26:in
run'
/home/kato/workspace/wize/lib/tasks/scss_lint.rake:13:in `block (2 levels) in <top (required)>'
Tasks: TOP => scss:lint
when running scss-lint app/assets/stylesheets/ -i declared_name_linter, sorted_properties_linter
this is the stack trace I get.
[lifeiscontent@lifeiscontent apartmentlist (feature/format-css)]$ scss-lint app/assets/stylesheets/ -i declared_name_linter, sorted_properties_linter
/Users/lifeiscontent/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/find.rb:38:in `block in find': No such file or directory (Errno::ENOENT)
from /Users/lifeiscontent/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/find.rb:38:in `collect!'
from /Users/lifeiscontent/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/find.rb:38:in `find'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.1/lib/scss_lint.rb:31:in `block in extract_files_from'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.1/lib/scss_lint.rb:30:in `each'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.1/lib/scss_lint.rb:30:in `extract_files_from'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.1/lib/scss_lint/cli.rb:68:in `find_files'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.1/lib/scss_lint/cli.rb:55:in `run'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.1/bin/scss-lint:7:in `block in <top (required)>'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.1/bin/scss-lint:5:in `tap'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.1/bin/scss-lint:5:in `<top (required)>'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/bin/scss-lint:19:in `load'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/bin/scss-lint:19:in `<main>'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/bin/ruby_noexec_wrapper:14:in `<main>'
I'm currently sweeping through our codebase making things consistent (ie. with class/ID names, with Compass mix-in and variable names, and with CSS property names themselves; they all use hyphens instead of underscores).
It would be nice if we could have scss-lint enforce this moving forward.
I received this error when trying to run scss-lint
from a fresh install:
SCSSLint::Linter::Shorthand raised unexpected error: 'undefined method `type' for 0:Sass::Script::Value::Number'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter/shorthand.rb:38:in `check_script_string'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter/shorthand.rb:16:in `visit_prop'
/var/lib/gems/1.9.1/gems/sass-3.3.0.rc.1/lib/sass/tree/visitors/base.rb:37:in `visit'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:61:in `visit'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:68:in `block in visit_children'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:66:in `each'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:66:in `visit_children'
/var/lib/gems/1.9.1/gems/sass-3.3.0.rc.1/lib/sass/tree/visitors/base.rb:39:in `visit'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:61:in `visit'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:68:in `block in visit_children'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:66:in `each'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:66:in `visit_children'
/var/lib/gems/1.9.1/gems/sass-3.3.0.rc.1/lib/sass/tree/visitors/base.rb:39:in `visit'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:61:in `visit'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:68:in `block in visit_children'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:66:in `each'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:66:in `visit_children'
/var/lib/gems/1.9.1/gems/sass-3.3.0.rc.1/lib/sass/tree/visitors/base.rb:39:in `visit'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:61:in `visit'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:68:in `block in visit_children'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:66:in `each'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:66:in `visit_children'
/var/lib/gems/1.9.1/gems/sass-3.3.0.rc.1/lib/sass/tree/visitors/base.rb:39:in `visit'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:61:in `visit'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/linter.rb:14:in `run'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/runner.rb:49:in `block in find_lints'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/runner.rb:47:in `each'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/runner.rb:47:in `find_lints'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/runner.rb:30:in `block in run'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/runner.rb:29:in `each'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/runner.rb:29:in `run'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/lib/scss_lint/cli.rb:65:in `run'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/bin/scss-lint:7:in `block in <top (required)>'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/bin/scss-lint:5:in `tap'
/var/lib/gems/1.9.1/gems/scss-lint-0.12.0/bin/scss-lint:5:in `<top (required)>'
/usr/local/bin/scss-lint:23:in `load'
/usr/local/bin/scss-lint:23:in `<main>'
This was on Ubuntu 13.04 using sudo gem install scss-lint
when using the compass mixin sprite_names($sprite)
I get this error, this isn't a function I can change...
also,
I feel its a very valid thing to have _
prefixed mixins, to indicate it probably shouldn't be used except a particular file.
Looks like we forgot to specify a license, both in the gemspec and the repo
I'm having a "Selectors should be lowercase" in the following line:
&.small[rel=replaceCard] {
when I do something like this
.arrow {
@include transform(scaleY(-1));
}
I get this scss-lint error Names of variables, functions, and mixins should be lowercase and not contain underscores. Use hyphens instead.
is there an option to use everything from property_format_linter
except having it error on a rule like this?
.proceed { text-align: right; }
First things first: awesome tool! I just started using it in an existing project to highlight some code-smell and it helps a lot.
One small thing i found: it chokes on @each-statements with color-variables if they are not wrapped in quotes, e.g.
@each $item in
item-blue,
item-red {
...
}
I get:
items.scss:3 [W] Color blue
should be written in hexadecimal form as #00f
items.scss:4 [W] Color red
should be written in hexadecimal form as #f00
even though these strings are not even meant as color-declarations.
Wrapping those in quotes fixes those warnings:
@each $item in
"item-blue",
"item-red" {
...
}
After all, maybe it would be wise to always wrap strings in quotes in sass/compass (maybe this would make another nice option!) - nevertheless, wanted to report this :-)
Hey, great utility you guys have here, just found it. Question if I may (first time caller) and not a huge Ruby expert so be kind.
When I install scss-lint it upgrades my Sass to 'sass' (= 3.3.0.rc.1) from 3.2.12 (required by Compass).
This breaks Compass with the following error
$ compass -v
/Users/ehenderson/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in 'require': cannot load such file -- sass/script/node (LoadError)
from /Users/ehenderson/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in 'rescue in require'
:
scss-lint works OK but Compass does not. When I put the Sass version back to 3.2.12, Compass works OK but now scss-lint says:
$ scss-lint .
/Users/ehenderson/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in 'to_specs': Could not find 'sass' (= 3.3.0.rc.1) - did find: [sass-3.2.12] (Gem::LoadError)
:
Is there a way round this, fix or can I help fix it some how. Keen to contribute with your project.
Thanks
E.
More of a question than an issue, does this SCSS lint work with compass?
For example, scss-lint
does not report a lint for the 0em
at the end of the padding
property shorthand.
p {
padding: 1.3em 1em 0em;
}
This is due to the regex used to detect these cases. It needs to be modified to support detecting more than one occurrence of a value on a line.
It also does not work for arguments of mixins or functions, e.g.
@include my-mixin(0em);
The CLI doesn't provide recursive scanning and crashes brutally if a directory is passed to the script.
If I have a style that looks like:
#{$property}: $value;
I get the "Property values should always be on one line of the form..." warning.
Similarly for styles like:
margin-#{$side}: 10px;
Not sure exactly where in this maze the error lies, but this is causing the binary to fail to boot in stock OS X.
>> scss-lint --version
/Library/Ruby/Gems/1.8/gems/scss-lint-0.7.1/lib/scss_lint/linter/property_format_linter.rb:27: undefined (?...) sequence: / (RegexpError)
^\s*[^:]+(?<!\s):\s # property name, colon not preceded by a space, one space
( # followed by
(?-mix:(\S+\s)*\S+); # property and terminating semi-colon eg. a b c;
| # or
(((?-mix:(\S+\s)*\S+)\s)?\{) # nested property, optional value, trailing curly
)
/
It would be useful to have an option like --exclude <filename>
to exclude some files.
For example in our source dir I have _fontawesome.scss that I don't care to analyze and I'd like to exclude.
The compress CSS hex values linter says I should compress this:
body { color: #3488C9; }
and
body { color: #E8E4E4; }
Right now, if a linter fails on some input file, we print out a stacktrace but not any information about which file actually caused the failure.
In order to make it easier for developers to report bugs, we should tell them which file the linter failed on so they can include the contents of that file with the bug report.
When an @include directive contains a hex color code that doesn't meet the criteria specified by HexLinter
, no lint warning is produced.
This probably is a result of us not traversing the Sass::Script::Node
tree.
Almost all of our specs take the exact same forms:
I am normally not a huge fan of being overly clever in spec suites, but this seems like a good situation in which to apply some DRY-ing in some form (either a custom matcher, or some kind of helper). It would mean that we could reduce the physical "volume" of the suite in lines, even as we add more examples.
Assigning to Shane "Douglas Crockford of SCSS" da Silva.
This version of sass
causes the compass
gem not to work, sad times :(
I like this project! Thank you for working on it.
I just wish it could check for inefficient CSS.
By that I mean:
Overuse of child selectors
.parent > .child > .another-child
Use of too many selectors
We need to check if they follow this rule: "Limit depth of applicability by using fewer selectors, avoiding ID selectors and relying less on html structure"
Those are more important than fixing typos and missing spaces in my opinion. I am just suggesting to make this project more sensible. I may work on it when I find time.
OSX: 10.8.3
[lifeiscontent@lifeiscontent apartmentlist (dev)]$ scss-lint app/assets/stylesheets/
/Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/media_node.rb:38:in `value': NotImplementedError (NotImplementedError)
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/lib/sass/tree.rb:55:in `children'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `visit_children'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `block in visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/set_options.rb:113:in `visit_media'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/set_options.rb:15:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `map'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `visit_children'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `block in visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/set_options.rb:88:in `visit_rule'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/set_options.rb:15:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `map'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `visit_children'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `block in visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/set_options.rb:88:in `visit_rule'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/set_options.rb:15:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `map'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `visit_children'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `block in visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/set_options.rb:88:in `visit_rule'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:37:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/set_options.rb:15:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `map'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:53:in `visit_children'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/base.rb:39:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/set_options.rb:15:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/visitors/set_options.rb:5:in `visit'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/tree/node.rb:69:in `options='
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/engine.rb:348:in `_to_tree'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/sass-3.2.9/lib/sass/engine.rb:274:in `to_tree'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/lib/scss_lint/engine.rb:20:in `initialize'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/lib/scss_lint/runner.rb:38:in `new'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/lib/scss_lint/runner.rb:38:in `find_lints'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/lib/scss_lint/runner.rb:29:in `block in run'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/lib/scss_lint/runner.rb:28:in `each'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/lib/scss_lint/runner.rb:28:in `run'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/lib/scss_lint/cli.rb:55:in `run'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/bin/scss-lint:7:in `block in <top (required)>'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/bin/scss-lint:5:in `tap'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/gems/scss-lint-0.7.0/bin/scss-lint:5:in `<top (required)>'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/bin/scss-lint:19:in `load'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/bin/scss-lint:19:in `<main>'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/lifeiscontent/.rvm/gems/ruby-1.9.3-p286@apartmentlist/bin/ruby_noexec_wrapper:14:in `<main>'
I just ran through some code I was reviewing and noticed someone had a property diplay: block;
I was wondering if you guys would find it useful to create a linter that would run through all known "properties/values that are words" and throw a warning if something the linter didn't know about was in place.
What do you guys think?
Using @extend
with standard selectors (non-placeholders) is considered dangerous. Placeholders should always be used.
Don't do this:
@extend .my-class;
Do this:
@extend %my-placeholder;
More information:
http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#placeholders
http://8gramgorilla.com/mastering-sass-extends-and-placeholders/
This is what I get when install scss-lint via bundler as I need to make sure it is included on a project.
sass-3.2.10/lib/sass/script/css_parser.rb:17:in `<class:CssParser>': undefined method `production' for Sass::Script::CssParser:Class (NoMethodError
Can you please add flex-direction, flex-wrap, flex-flow, order, flex-grow, flex-shrink, flex-basis, flex, justify-content, align-items, align-self, and align-content properties to KNOWN_PROPERTIES. All from properties from sass-flex-mixin repo, the useful sass flex mixin.
Hi - I was hoping someone might be able to help me figure out why scss-lint is failing in my environment. I can successfully install scss-lint, but when I try to run it, I get the following errors:
/usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/lib/scss_lint/runner.rb:38:in `find_lints': /usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/lib/scss_lint/engine.rb:5: odd number list for Hash (SyntaxError)
ENGINE_OPTIONS = { cache: false, syntax: :scss }
^
/usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/lib/scss_lint/engine.rb:5: syntax error, unexpected ':', expecting '}'
ENGINE_OPTIONS = { cache: false, syntax: :scss }
^
/usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/lib/scss_lint/engine.rb:5: Can't assign to false
ENGINE_OPTIONS = { cache: false, syntax: :scss }
^
/usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/lib/scss_lint/engine.rb:5: syntax error, unexpected ':', expecting '='
ENGINE_OPTIONS = { cache: false, syntax: :scss }
^
from /usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/lib/scss_lint/runner.rb:29:in `run'
from /usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/lib/scss_lint/runner.rb:28:in `each'
from /usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/lib/scss_lint/runner.rb:28:in `run'
from /usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/lib/scss_lint/cli.rb:55:in `run'
from /usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/bin/scss-lint:7
from /usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/bin/scss-lint:5:in `tap'
from /usr/lib64/ruby/gems/1.8/gems/scss-lint-0.6.7/bin/scss-lint:5
from /usr/bin/scss-lint:23:in `load'
from /usr/bin/scss-lint:23
[1] 15586 exit 1 scss-lint scss
I'm not sure if the issue might be my older version of ruby coming from the yum package manager.
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.