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

Linter not detecting undefined variables #62

Closed
anthonypinskey opened this issue Jan 2, 2016 · 1 comment
Closed

Linter not detecting undefined variables #62

anthonypinskey opened this issue Jan 2, 2016 · 1 comment

Comments

@anthonypinskey
Copy link

Upon running the scss-lint task when a partial contains an undefined variable, scss-lint does not report the error and passes, and then my build task runs that compiles it to build.scss file that has the error inline within the file.

test.scss

.class-name {
  color: $main-color;
}

scss-lint task

var customCSS = [
    /* Custom Sass & CSS */
    'build/sass/variables.scss',
    'build/baseline/*.scss',
    'build/mixins/**/*.scss',
    'build/pages/**/*.scss',
    'build/css/**/**/*.css',
    'build/sass/modules/**/*.scss'
];

module.exports = function() {
  return APP.gulp.src(customCSS)
      .pipe(APP.tasks.scsslint())
      .pipe(APP.tasks.scsslint.failReporter());
};

Is there a way to fix this? I assume it's only linting files indivudally though, and not concatanating them. So regardless, the variable would always be undefined since it's not checking them by the stack/order in the array.

@anthonypinskey
Copy link
Author

Sorry, I just realized that this is the compiler job, not the linter. I was able to resolve the issue with gulp-ruby-sass by using the sass.logError(err) function. Thanks!

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

No branches or pull requests

1 participant