Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
grunt-w3c-css-validation
Advanced tools
CSS Validation using W3C Validation Service
This plugin requires Grunt ~0.4.5
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-w3c-css-validation --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-w3c-css-validation');
In your project's Gruntfile, add a section named w3c_css_validation
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
w3c_css_validation: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
logfile
- the filepath to the log file. false
to deactivate logfile. Default is w3c_css_validation.json
Options from w3c-css: (see https://raw.githubusercontent.com/gchudnov/w3c-css/master/README.md)
uri
|| url
- the URL of the document to validatetext
- CSS document or fragment to validate. Only CSS-content is allowedprofile
- the CSS profile used for the validation: css1, css2, css21, css3
[default: 'css3']usermedium
- the medium used for the validation: screen, print, ...
[default: 'all', which is suitable for all devices]warning
- the warning level, "no" for no warnings, 0 for less warnings, 1or 2 for more warnings [default: 2]server
- the "IP:PORT" string or the URL object of a custom validation server, e.g, '172.17.0.2:8080'
or { host: '172.17.0.2:8080' }
errors
and warnings
reported by the library are the arrays of following objects:
{
line: '...', // refers to the line where the error or warning was detected
message: '...' // the error or warning message
// additional properties:
errorType: '...', // type of the error
context: '...', // context of the error
level: '...', // the level of the warning
uri: '...' // URL of the stylesheet
}
grunt.initConfig({
w3c_css_validation: {
target: {
options: {
logfile: './tmp/w3c_css_validation.json',
},
src: ['test/css/*.css'],
}
},
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
0.1.0 initial version
FAQs
CSS Validation using W3C Validation Service
The npm package grunt-w3c-css-validation receives a total of 0 weekly downloads. As such, grunt-w3c-css-validation popularity was classified as not popular.
We found that grunt-w3c-css-validation 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.