2013-11-26 26 views

cevap

13

grunt-contrib-csslint kullanırsanız, .csslintrc dosyasındaki seçenekleri belirtebilirsiniz. hırıltı-contrib-csslint Benioku'ndaki itibaren

:

Seçenekler

Herhangi belirtilen opsiyon csslint doğrudan geçilecek, böylece sen destekleri csslint herhangi bir seçeneği belirleyebilirsiniz. Csslint API'sı bir bit'idir: Her kural için, bir false değeri kuralı yok sayar, 2 değeri bir hataya dönüşür. Aksi takdirde tüm kurallar kabul edilen uyarılardır.

├── .csslintrc 
├── Gruntfile.js 
├── css 
│   └── foo.css 
├── node_modules 
└── package.json 

module.exports = function(grunt) { 
    grunt.initConfig({ 
    pkg: grunt.file.readJSON('package.json'), 
    csslint: { 
     strict: { 
     src: ['css/*.css'] 
     }, 
     lax: { 
     options: { 
      csslintrc: '.csslintrc' 
     }, 
     src: ['css/*.css'] 
     } 
    } 
    }); 

    grunt.loadNpmTasks('grunt-contrib-csslint'); 

    grunt.registerTask('default', ['csslint:lax']); 
}; 
{ 
    "important": false, 
    "adjoining-classes": false, 
    "known-properties": false, 
    "box-sizing": false, 
    "box-model": false, 
    "overqualified-elements": false, 
    "display-property-grouping": false, 
    "bulletproof-font-face": false, 
    "compatible-vendor-prefixes": false, 
    "regex-selectors": false, 
    "errors": true, 
    "duplicate-background-images": false, 
    "duplicate-properties": false, 
    "empty-rules": false, 
    "selector-max-approaching": false, 
    "gradients": false, 
    "fallback-colors": false, 
    "font-sizes": false, 
    "font-faces": false, 
    "floats": false, 
    "star-property-hack": false, 
    "outline-none": false, 
    "import": false, 
    "ids": false, 
    "underscore-property-hack": false, 
    "rules-count": false, 
    "qualified-headings": false, 
    "selector-max": false, 
    "shorthand": false, 
    "text-indent": false, 
    "unique-headings": false, 
    "universal-selector": false, 
    "unqualified-attributes": false, 
    "vendor-prefix": false, 
    "zero-units": false 
} 

Gruntfile .csslintrc:

Böyle bir yapıya sahip varsayarsakO zaman grunt sadece hataları rapor edecek ve grunt csslint:strict uyarıları ve hataları rapor edecektir.

İlgili konular