Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported Linters #457

Closed
colin-marshall opened this issue Dec 18, 2015 · 4 comments
Closed

Unsupported Linters #457

colin-marshall opened this issue Dec 18, 2015 · 4 comments

Comments

@colin-marshall
Copy link

Hello, we're looking to move from scss-lint to sass-lint for Zurb's Foundation for Sites front-end framework. I used the converter tool to convert the scss-lint file and got the following message:

# The following scss-lint Linters are not yet supported by sass-lint:
# ElsePlacement, PropertyCount, SelectorDepth, UnnecessaryParentReference
# VendorPrefixes, Compass::*
# 
# The following settings/values are unsupported by sass-lint:
# Linter Indentation, option "allow_non_nested_indentation"
# Linter Indentation, option "character"
# Linter PropertySortOrder, option "separate_groups"
# Linter SpaceBeforeBrace, option "allow_single_line_padding"

I see there are plans to add PropertyCount in the near future. We were wondering if there are plans to add any of these other unsupported linters/settings to sass-lint? Thanks!

Related issue on Foundation-Sites repo: foundation/foundation-sites#7620

@DanPurdy
Copy link
Member

HI @colin-marshall thanks for the message, we'd love for you guys to adopt sass-lint we've taken a slightly different approach to scss-lint and broken a few of the rules up into smaller more single purpose rules.

Any rules we don't currently support we are very open to supporting in the near future while aiming to equally support both .sass and .scss syntax. There's not been a great deal of activity in the last few weeks as I know all of the contributors have been very busy but we're always open to contributions!

Property-count is due to be ready as soon as i get round to finishing it, currently we have a few inconsistencies with the AST we're using which unfortunately in that rules case has led to extra complexity in supporting the .sass syntax but this may just mean that we release support for scss ahead of sass first.

As for the other rules you mention

Rules

  • ElsePlacement hasn't been worked on but can be added
  • PropertyCount I mention above current PR and status is here
  • SelectorDepth isn't supported yet but with our nesting-depth rule docs here already done I'm sure it wont be long.
  • UnnecessaryParentReference again hasn't been looked out but we're open to supporting
  • VendorPrefixes should already be supported with our no-vendor-prefixes rule see here
  • Compass personally I'm not sure about, I don't really see it as necessary now and unless we get a lot of requests for support it wouldn't be high on our priority list. Though this is me speaking, others may have other ideas!

Settings

Our indentation rule is currently a little buggy and we're loathed to throw too much attention at it until after our AST has updated a little as we currently can't support tabs, only spaces.

  • allow_non_nest_indentation is a possibility after the above is resolved
  • character is again dependent on the AST updates mentioned above
  • seperate_groups there was already a PR for this but the contributor disagreed with us and shut it but we'd be looking to add support for those soon. There's a few issues to folow here and here
  • single_line_padding I know there's been some discussion about but nothing concrete yet.

We ask that any requests for new rules or rule enhancements are made in separate issues so that we may track them easier I'll be adding a few of the above when I get a chance.

As i've mentioned also our current AST gonzales-pe currently has a few issues that have been resolved in the latest build but unfortunately it's introduced some unfortunate regressions and also continues to throw issues with many types of interpolation so we're holding off on updating that until they're sorted. Hopefully not too far in the future!

We're still a fairly young project but we'd like to get feature parity with scss-lint and more while moving to a Eslint style architecture to allow support for pluggable user rules and configs.

@colin-marshall
Copy link
Author

Thanks for that detailed explanation @DanPurdy! I will relay the information and see if we can find some people to help. I'll also open new issues for feature requests for the separate rules we are after.

Few things I discovered:

  • VendorPrefixes was not translated because it should be just VendorPrefix. Our fault.
  • Compass was set to enabled: false in our scss-lint.yml file, so forget I even mentioned it. I agree with you that it's not necessary to support.

Cheers!
Colin

@gakimball
Copy link

Hey @DanPurdy, thanks for the response :) Great to see a Node-based Sass linter out there now.

I'd definitely encourage you to consider a rule for unnecessary use of &, to avoid code like this:

ul {
  & li { }
  & a { }
}

There are some designers and developers who do this, usually because they haven't been correctly trained on when to use & and when not to.

@DanPurdy
Copy link
Member

No problem, that's the reason we're working on it.. No more ruby dependencies is a future I want to live in :)

As for the rule, unnecessary parent reference is definitely on the cards, been a busy few weeks though! If there's any other rules missing you'd like to see I'd encourage you to just open up a new issue or pop a note in the existing rule issues so we can keep a better track of the requests.. We've had a fair few!

Thanks again, hope to see foundation using sass-lint soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants