Git Product home page Git Product logo

Comments (3)

iflan avatar iflan commented on April 28, 2024

Yes, yes it does. Would you be willing to help out?

from closure-stylesheets.

dbarnett avatar dbarnett commented on April 28, 2024

If you could add some pointers here for how you'd recommend implementing it, it's not impossible I'd be able to help out.

from closure-stylesheets.

iflan avatar iflan commented on April 28, 2024

Awesome! :-)

I actually don't have any recommendation for how to implement it at the moment. Some of the linters that I've seen are just a bunch of regexps and they don't really care about understanding the code structure. Others try to leverage the power of a real parser to make more intelligent recommendations.

For the moment, because we have nothing, the bar for an initial linter would be pretty low. I'd be fine with something simple that looks for particular rule violations.

Just to take a couple examples (more or less at random) from the style guide:

Avoid user agent detection as well as CSS “hacks”—try a different approach first.

This one should be pretty easy to detect with some regexps. And for the Closure Stylesheet compiler, this is particularly important since it was built to enable the same stylesheet to be compiled and targeted to different browsers.

Use a semicolon after every declaration.

That should be pretty easy to spot with a regexp.

Use meaningful or generic ID and class names.

That's pretty much impossible to automate.

So, if you wanted to start out with something simple based on regexps or a simple parser, I think that could work. What do you think?

from closure-stylesheets.

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.