Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

grunt:check performs CssLint on .scss files in _scss folder #106

Open
happycollision opened this issue Sep 18, 2014 · 3 comments
Open

grunt:check performs CssLint on .scss files in _scss folder #106

happycollision opened this issue Sep 18, 2014 · 3 comments

Comments

@happycollision
Copy link

Inside the generated Gruntfile:

    csslint: {
      options: {
        csslintrc: '.csslintrc'
      },
      check: {
        src: [
          '<%= yeoman.app %>/css/**/*.css',
          '<%= yeoman.app %>/_scss/**/*.scss'
        ]
      }
    },

Is this actually the desired behavior? If I drop a .scss file that uses any sass syntax (like @mixin for example) into the _scss folder, grunt check errors out.

Am I misunderstanding the way this generator expects to be used?

@gavinballard
Copy link

I was running in to this issue as well; thought briefly about moving the csslint to post-build but in the end I just removed that second line from the Gruntfile.

@happycollision
Copy link
Author

I removed CssLint altogether. I am only using sass in my project and compass will not create malformed css. I know not everyone would do that, so that's just me. Although, I think that one of the other tasks might double as a linter as well as things get crushed down for distribution. I could be wrong.

@orlade
Copy link

orlade commented Nov 10, 2014

I got this too. Changed the csslint task to:

    csslint: {
      options: {
        csslintrc: '.csslintrc'
      },
      check: {
        src: [
          '<%= yeoman.app %>/css/**/*.css'
        ]
      }
    },
    scsslint: {
      // See https://www.npmjs.org/package/grunt-scss-lint for options.
      allFiles: [
        '<%= yeoman.app %>/_scss/**/*.scss'
      ]
    },

And added 'scsslint' to the end of the existing check task.

This uses grunt-scss-lint which requires the scss-lint Ruby gem. I added these to the Gemfile and package.json, and it lints nicely.

dnozay added a commit to dnozay/generator-jekyllrb that referenced this issue Jan 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants