Sha256: 09ccc2a6699c0a63e21f99efe49d460973fb63330bc4babd3959f1d4416c5e30

Contents?: true

Size: 1.76 KB

Versions: 1

Compression:

Stored size: 1.76 KB

Contents

# This rule is taken from https://github.com/stubbornella/csslint/tree/master/src/rules
#
#
# Copyright (c) 2011 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
# TODO: Paste the CSSLint LICENSE here.
#
#
# /*
#  * Rule: Duplicate properties must appear one after the other. If an already-defined
#  * property appears somewhere else in the rule, then it's likely an error.
#  */
# /*global CSSLint*/
# CSSLint.addRule({
# 
#     //rule information
#     id: "duplicate-properties",
#     name: "Disallow duplicate properties",
#     desc: "Duplicate properties must appear one after the other.",
#     browsers: "All",
# 
#     //initialization
#     init: function(parser, reporter){
#         var rule = this,
#             properties,
#             lastProperty;            
#             
#         function startRule(event){
#             properties = {};        
#         }
#         
#         parser.addListener("startrule", startRule);
#         parser.addListener("startfontface", startRule);
#         parser.addListener("startpage", startRule);
#         parser.addListener("startpagemargin", startRule);
#         parser.addListener("startkeyframerule", startRule);        
#         
#         parser.addListener("property", function(event){
#             var property = event.property,
#                 name = property.text.toLowerCase();
#             
#             if (properties[name] && (lastProperty != name || properties[name] == event.value.text)){
#                 reporter.report("Duplicate property '" + event.property + "' found.", event.line, event.col, rule);
#             }
#             
#             properties[name] = event.value.text;
#             lastProperty = name;
#                         
#         });
#             
#         
#     }
# 
# });

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sasslint-0.0.1 lib/sasslint/rules/css/duplicate-properties.rb