Sass Atom编辑器-林特scss林特错误
在Atom编辑器中,我想使用,但并没有执行linter 我将.scss-lint.yml添加到我的主文件夹和项目文件夹中 .scss lint.ymlSass Atom编辑器-林特scss林特错误,sass,atom-editor,Sass,Atom Editor,在Atom编辑器中,我想使用,但并没有执行linter 我将.scss-lint.yml添加到我的主文件夹和项目文件夹中 .scss lint.yml # Default application configuration that all configurations inherit from. scss_files: "**/*.scss" plugin_directories: ['.scss-linters'] # List of gem names to load custom l
# Default application configuration that all configurations inherit from.
scss_files: "**/*.scss"
plugin_directories: ['.scss-linters']
# List of gem names to load custom linters from (make sure they are already
# installed)
plugin_gems: []
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
BemDepth:
enabled: false
max_elements: 1
BorderZero:
enabled: true
convention: zero # or `none`
ColorKeyword:
enabled: true
ColorVariable:
enabled: true
Comment:
enabled: true
DebugStatement:
enabled: true
DeclarationOrder:
enabled: true
DisableLinterReason:
enabled: false
DuplicateProperty:
enabled: true
ElsePlacement:
enabled: true
style: same_line # or 'new_line'
EmptyLineBetweenBlocks:
enabled: true
ignore_single_line_blocks: true
EmptyRule:
enabled: true
ExtendDirective:
enabled: false
FinalNewline:
enabled: true
present: true
HexLength:
enabled: true
style: short # or 'long'
HexNotation:
enabled: true
style: lowercase # or 'uppercase'
HexValidation:
enabled: true
IdSelector:
enabled: true
ImportantRule:
enabled: true
ImportPath:
enabled: true
leading_underscore: false
filename_extension: false
Indentation:
enabled: true
allow_non_nested_indentation: false
character: space # or 'tab'
width: 2
LeadingZero:
enabled: true
style: exclude_zero # or 'include_zero'
MergeableSelector:
enabled: true
force_nesting: true
NameFormat:
enabled: true
allow_leading_underscore: true
convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern
NestingDepth:
enabled: true
max_depth: 3
ignore_parent_selectors: false
PlaceholderInExtend:
enabled: true
PropertyCount:
enabled: false
include_nested: false
max_properties: 10
PropertySortOrder:
enabled: false
ignore_unspecified: false
min_properties: 2
separate_groups: false
PropertySpelling:
enabled: true
extra_properties: []
disabled_properties: []
PropertyUnits:
enabled: true
global: [
'ch', 'em', 'ex', 'rem', # Font-relative lengths
'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q', # Absolute lengths
'vh', 'vw', 'vmin', 'vmax', # Viewport-percentage lengths
'deg', 'grad', 'rad', 'turn', # Angle
'ms', 's', # Duration
'Hz', 'kHz', # Frequency
'dpi', 'dpcm', 'dppx', # Resolution
'%'] # Other
properties: {}
QualifyingElement:
enabled: true
allow_element_with_attribute: false
allow_element_with_class: false
allow_element_with_id: false
SelectorDepth:
enabled: true
max_depth: 3
SelectorFormat:
enabled: true
convention: hyphenated_lowercase # or 'strict_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern
Shorthand:
enabled: true
allowed_shorthands: [1, 2, 3]
SingleLinePerProperty:
enabled: true
allow_single_line_rule_sets: true
SingleLinePerSelector:
enabled: true
SpaceAfterComma:
enabled: true
SpaceAfterPropertyColon:
enabled: true
style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned'
SpaceAfterPropertyName:
enabled: true
SpaceAfterVariableName:
enabled: true
SpaceAroundOperator:
enabled: true
style: one_space # or 'no_space'
SpaceBeforeBrace:
enabled: true
style: space # or 'new_line'
allow_single_line_padding: false
SpaceBetweenParens:
enabled: true
spaces: 0
StringQuotes:
enabled: true
style: single_quotes # or double_quotes
TrailingSemicolon:
enabled: true
TrailingWhitespace:
enabled: true
TrailingZero:
enabled: false
TransitionAll:
enabled: false
UnnecessaryMantissa:
enabled: true
UnnecessaryParentReference:
enabled: true
UrlFormat:
enabled: true
UrlQuotes:
enabled: true
VariableForProperty:
enabled: false
properties: []
VendorPrefix:
enabled: true
identifier_list: base
additional_identifiers: []
excluded_identifiers: []
ZeroUnit:
enabled: true
Compass::*:
enabled: false
我将linter设置添加到config.cson
"linter-scss-lint":
disableWhenNoConfigFileInPath: false
executablePath: "/usr/local/lib/ruby/gems/2.2.0/gems/scss_lint-0.42.2/bin/scss-lint"
打开scss文件时,出现错误:
Error: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- scss_lint (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/local/lib/ruby/gems/2.2.0/gems/scss_lint-0.42.2/bin/scss-lint:3:in `
'
Error: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- scss_lint (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/gems/2.2.0/gems/scss_lint-0.42.2/bin/scss-lint:3:in `<main>'
at parameters.exit (/Users/and/.atom/packages/linter-scss-lint/node_modules/atom-linter/lib/helpers.js:74:20)
at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:220:18
at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:98:18)
at emitOne (events.js:82:20)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)
Error:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/rubygems/core\u ext/kernel\u require.rb:55:in require:无法加载此类文件--scss\u lint(LoadError)from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/rubygems/core\u ext/kernel\u require.rb:55:inrequire'from/usr/local/lib/Ruby/gems/2.2.0/gems/scss\u lint-0.42.2/bin/scss lint:3:in`
'
错误:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/rubygems/core\u ext/kernel\u require.rb:55:“require”中:无法加载此类文件--scss\u lint(LoadError)
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/rubygems/core\u ext/kernel\u require.rb:55:in'require'
from/usr/local/lib/ruby/gems/2.2.0/gems/scss_lint-0.42.2/bin/scss lint:3:in`'
在parameters.exit(/Users/和/atom/packages/linter-scss-lint/node_modules/atom-linter/lib/helpers.js:74:20)
在triggerExitCallback(/Applications/Atom.app/Contents/Resources/app.asar/src/buffered process.js:213:47)
at/Applications/Atom.app/Contents/Resources/app.asar/src/buffered process.js:220:18
在插座上。(/Applications/Atom.app/Contents/Resources/app.asar/src/buffered process.js:98:18)
在emitOne(events.js:82:20)
位于Socket.emit(events.js:169:7)
在管道上关闭(net.js:469:12)
对于linter scss lint works,您需要在“设置”中自定义软件包
文件>>设置>>包>>衣料scss衣料
然后,在配置名称中
default.yml
和可执行路径put
C:\Ruby23-x64\bin\scss lint
准备好了,这对我有用
重新添加。似乎它将在您提到的使用
.scss lint.yml
的地方寻找.sass lint.yml
。当您将文件名更改为它(默认情况下)希望找到的文件名时会发生什么情况?您是对的。我没有注意到这一点。我在主文件夹中创建了新文件.sass-lint.yml。现在我的主文件夹中有.sass-lint.yml和.scss-lint.yml。我将path设置为/Users/和/.sass-lint.yml,重新启动了Atom,但linter仍然没有lint。请记住,我的经验是使用SCSS lint而不是sass,所以大多数只是经过教育的猜测。我有一个问题,把他们放在我的主文件夹,但我有一个项目文件夹,我所有的工作生活,并保持在该文件夹中的工作对我来说是可行的。我会尝试一些类似的方法,首先将其放在特定的项目中,以查看它是否加载并将其移出父文件夹,直到找到断点。它是否给出了任何错误,或者它只是不起毛?请查看我编辑的问题。假设您不使用RVM安全吗?我的项目文件夹中有一个.scss lint.yml
文件和一个exec。/Users/greg/.rvm/bin/atom\u scss-lint的路径
,因为我使用rvm,它似乎工作正常。你确认过执行官吗。你给它的路径“存在”?您是否尝试过不设置可执行路径?我会密切关注bug追踪器(),因为其他一些人也有类似的问题。