Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
grunt-scss-lint
Advanced tools
Lint your
.scss
files
This plugin requires Grunt >= 0.4.0
and scss-lint >= 0.18.0
. It is recommended to use the scss_lint
gem as that is the currently maintained version.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-scss-lint --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-scss-lint');
Run this task with the grunt scsslint
command.
scss-lint is a Ruby gem written by The Causes Engineering Team. It is currently owned and maintained by brigade. This plugin is simply a grunt wrapper for the gem.
This task requires you to have Ruby, and scss-lint installed. If you're on OS X or Linux you probably already have Ruby installed; test with ruby -v
in your terminal. When you've confirmed you have Ruby installed, run gem update --system && gem install scss_lint
to install the scss_lint
gem.
Boolean
false
You can choose to have your gems installed via bundler and if so, set this option to true
to use the local gems.
Boolean
true
Get some nice looking output.
For colors to work on Windows, you first need to install 2 extra gems. This is because of Rainbow, a dependency of scss-lint.
gem install windows-pr win32console
Boolean
false
Group related linted files for more easier error review. XML output will still be default from scss-lint.
String
node_modules/grunt-scss-lint/.scss-lint.yml
.Specify a configuration file.
String
null
.Specify a gem version for the scsslint gem.
String
or Array
null
Exclude one or more files from being linted.
String
null
The file to save the output to. If you don't want this then set the option as null
.
String
null
txt
, xml
This will ultimately default to the file extension used for reporterOutput
if left null
Boolean
false
Emits a Grunt event on scss-lint error called scss-lint-error
.
Boolean
false
Emits a Grunt event on scss-lint success called scss-lint-success
.
Boolean
true
Disable to fail the task only on errors. You can set the severity level for individual linters in your configuration file.
Boolean
false
Set force
to true
to report scss-lint warnings and errors but not fail the task. This overrides failOnWarning
.
Number
or Boolean
300 * 1024
Set maxBuffer
for the child_process.exec
process, if you're linting a lot of files and you're recieving no output then you can try and increase this value. Setting it to false
, 0
, NaN
or Infinite
will not return any stdout
or stderr
and the task will think that everything's fine.
grunt.initConfig({
scsslint: {
allFiles: [
'test/fixtures/*.scss',
],
options: {
bundleExec: true,
config: '.scss-lint.yml',
reporterOutput: 'scss-lint-report.xml',
colorizeOutput: true
},
}
});
grunt.loadNpmTasks('grunt-scss-lint');
grunt.registerTask('default', ['scsslint']);
If you're having problems with the task exiting with an error code, then have a look here: https://github.com/causes/scss-lint/blob/master/lib/scss_lint/cli.rb
FAQs
Validate `.scss` files with `scss-lint`.
The npm package grunt-scss-lint receives a total of 4,538 weekly downloads. As such, grunt-scss-lint popularity was classified as popular.
We found that grunt-scss-lint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.