Git Product home page Git Product logo

grunt-sass-lint's People

Contributors

ajwagner777 avatar danpurdy avatar fernandopalaciosgit avatar janpapenbrock avatar micahgodbolt avatar snugug avatar whazap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grunt-sass-lint's Issues

"target" should be "src"

Usually the "target" property is used when there are output files, and the "src" property for specifying input files. Admittedly it makes little practical difference, but it's definitely confusing and going against pretty much every other grunt plugin out there that you need to specify "target" to use this plugin and not "src".

Sub task not working

I'm trying to make a sub task but I can not get it to run.

sasslint: {
    search: {
        target: ['src/search/**/**.scss']
    }
}

grunt sasslint:search

Space expected between blocks when it shouldn't

:root {
  box-sizing: border-box;
}

%boxsizing {
  box-sizing: inherit;
}

* {
  @extend %boxsizing;

  &:before,
  &:after {
    @extend %boxsizing;
  }
}

Returns:

Running "sasslint:main" (sasslint) task

build/sass/src/_default.scss
  12:1  warning  Space expected between blocks  empty-line-between-blocks

✖ 1 problem (0 errors, 1 warning)

Problem with trailing semicolon

Hi all,

I'm having problems with the trailing semicolon rule, because it is just linting ok when it is the last line of a block. For example:

body {
    display: block;
    background: red
}

Would break.

But:

body {
    display: block
    background: red;
}

Would not.

Do you have any fixes on this?

I don't know if this should be here, or in sass-lint repo, so sorry if it is the wrong place.

Thanks in advance.

formatter: 'table' - "Unexpected strict mode reserved word in sub sub ...module"

When formatter: 'table' is set:

Node: v0.12.15
npm: 2.15.1

node_modules/grunt-sass-lint/node_modules/sass-lint/node_modules/eslint/node_modules/table/dist/table.js:112
  let userConfig = arguments.length > 1 && arguments[1] !== undefined ? argume
  ^^^
Unexpected strict mode reserved word Use --force to continue.

Aborted due to warnings.

Works with table "version": "3.7.8"
Error with table "version": "3.8.3"

Cannot read property 'start' of undefined

I'm not sure if it's my setup but using using * selectors in the target results in the error:

Warning: Cannot read property 'start' of undefined Use --force to continue.

So this works:

    options: {
        configFile: '.sass-lint.yml'
    },
    target: ['scss/style.scss']

But this doesnt:

    options: {
        configFile: '.sass-lint.yml'
    },
    target: ['scss/*.scss']

Anyone else experience this problem? Using node 4.1.1 if that makes any difference.

Needs updating

Just noticed that when installing grunt-sass-lint from npm it brings down sass-lint 1.0.0

see here sasstools/sass-lint#295

Looks like even though package.json has been updated this package hasn't been pushed to NPM..

Should probably do that quite soon as this is seriously behind now!

Ignore path behaves differently to include path

When you use a config file that is in a different repo (for example, node_modules) then ignore path seems to be confused as to where it is. I have a project that gets it's front end from a private node_module and I set the config path in my gruntfile to configFile: 'node_modules/my-repo/.sass-lint.yml'.

Inside that sass-lint.yml I have include and ignore rules:

files:
    include: 'src/stylesheets/**/*.s+(a|c)ss'
    ignore:  'src/stylesheets/common/generated/**/*.scss'

The include works as expected, but the ignore doesn't.
The ignore does work if I explicitly set the path to 'node_modules/my-repo/src/src/stylesheets/common/generated/*/.scss'. However, that's not a solution as I need to be able to run the linting from the repo itself, as well as from the project that consumes the node_module.

Configurable path to sass-lint.yml

It would be useful if an option could be passed to sass-lint that would let you change the path to the config file if you'd prefer not have another file in the project root, or have a dedicated folder containing all of your config files.

Edit: I've posted this in the main sass-lint repo as it's more relevant there, but I thought I'd leave this issue open here for the ability to pass the option through.

pass cli options

is there a way to set the cli options from the grunt config? my attempts have fallen short so far.

my specific use case is that i would like to ensure that build fails on warnings (since there doesn't seem to be a way to make all of them error level by default). i see that there is a max-warnings option that i would like to set to 0, but i can't figure out how to set it.

Warning: previous.is is not a function

Running "sasslint:target" (sasslint) task
Warning: previous.is is not a function� Use --force to continue.

Aborted due to warnings.


Execution Time (2016-10-04 17:03:40 UTC+2)
loading tasks     1.3s  ███████████████████████████████████████ 86%
sasslint:target  220ms  ███████ 14%
Total 1.5s


Update sass-lint version

Version 1.2.0 is available for Sass Lint. It has some bug fixes and improvements that would be nice to get in here.

configFile not loading

Hi, I'm using v0.2.2. I'm trying to use the yml from Bootstrap but the yml file is not loading when I run grunt sasslint command. I'm using the exact file that you can get in Bootstrap repo except different indentation settings (4 space)

  Indentation:
    enabled: true
    allow_non_nested_indentation: false
    character: space # or 'tab'
    width: 4

My Gruntfile.js

module.exports = function (grunt) {
    'use strict';

    grunt.initConfig({
        sasslint: {
            options: {
                configFile: '.scss-lint.yml',
            },
            target: ['scss/style.scss']
        }
    });

    grunt.loadNpmTasks('grunt-sass-lint');
};

My directory tree

.
├── .scss-lint.yml
├── Gruntfile.js
├── package.json
└── scss
    └── style.scss

If you need to know anything else, please ask. Thank you.

Does not run on multiple files

  • node: v0.10.36
  • npm: v1.4.28
  • grunt-sass-lint 0.1.0-beta.4

If I run the linter with one file in my target array, I get 11 warnings:
one-file-config
one-file

Great. Everything above looks like it's running correctly. Now I add an additional file to the target array (as the first item in the array):
two-files-config
... and now I'm only getting linting errors for the first file (3 warnings only):
two-files

... so it appears that the second file is not being linted, even though it says it is.

Support for the --verbose and --no-exit flags?

I'm currently outputting all warnings/errors to file, but would like the build to continue regardless. I'd also like to output all warnings regardless of severity.

I see in the sass-lint options they have --verbose and --no-exit flags (alternatives being -v and -q) available: is there any way we can pass these through via grunt-sass-lint?

(node:20322) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

I'm getting this error when I try running sass lint on a newly created project.

/usr/local/bin/node /Users/adamyoungers/projects/pikadeck/node_modules/grunt-cli/bin/grunt --gruntfile /Users/adamyoungers/projects/pikadeck/Gruntfile.js sasslint
Running "sasslint:test" (sasslint) task
(node:21555) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

Done.

Process finished with exit code 0

Option for warning to fail the build

Is there a way to enforce warning to fail the build? At present it returns:

  91:5  warning  Indentation of 4, expected 2  indentation
  92:5  warning  Indentation of 4, expected 2  indentation
  93:5  warning  Indentation of 4, expected 2  indentation

✖ 44 problems (0 errors, 44 warnings)

Done, without errors.

But it would be nice if warning could be set to fail either as a global or per-rule.

Support on the flight "newer"

Could you add the possibility to use grunt-newer in order to check the files on the flight?

I'd like to execute the task each time that the ¨watch¨ task is called (I can do it manually, but it is not the best solution).

Thanks!

npm install errors unless version is specified.

running npm install grunt-sass-lint --save-dev I get the following error:

npm ERR! notarget No compatible version found: grunt-sass-lint@'*'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["0.1.0-beta.1","0.1.0-beta.2","0.1.0-beta.3"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm install [email protected] --save-dev works

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.