RSG-Group/rsg-components

View on GitHub

Showing 167 of 167 total issues

Expected single space after ":" with a single-line declaration (declaration-colon-space-after)
Open

function Box(a){var b=StyleSheet.create({mainDiv:_extends({height:a.height,width:a.width,color:a.color,opacity:a.opacity,background:a.background,padding:'3px 7px',fontFamily:'Verdana, Geneva, sans-serif'},a.style),mainPre:{fontSize:'12px',verticalAlign:'middle',height:a.height,width:a.width}});return React__default.createElement('div',_extends({className:css(b.mainDiv)},omit(a,['style','background','color','opacity','width','height'])),React__default.createElement('pre',{className:css(b.mainPre)},a.children))}Box.defaultProps={color:'rgb(10, 10, 10)',opacity:'1',style:{},width:'95%',background:'rgb(230, 230, 230)'};
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

declaration-colon-space-after

Require a single space or disallow whitespace after the colon of declarations.

<!-- prettier-ignore -->
a { color: pink }
/**      ↑
 * The space after this colon */

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected single space after ":" with a single-line declaration (declaration-colon-space-after)
Open

function FormBasic(a){var b=StyleSheet.create({inputStyle:{border:'1px solid rgb(128, 128, 128)',borderRadius:'3.5px',background:'rgb(250, 250, 250)',height:'22.5px',paddingLeft:'4.5px',paddingRight:'3px'},buttonStyle:{background:'rgb(50, 120, 180)',color:'white',border:'1px solid rgb(30, 100, 160)',borderRadius:'3px',padding:'5px 10px',fontSize:'16px'},seperator1:{height:'5px'},seperator2:{height:'7.5px'}});return React__default.createElement('form',a,'Username:',React__default.createElement('input',{className:css(b.inputStyle),name:'user',type:'text',key:1}),React__default.createElement('div',{className:css(b.seperator1),key:2}),'Password:',React__default.createElement('input',{className:css(b.inputStyle),name:'password',type:'password',key:3}),React__default.createElement('div',{className:css(b.seperator2),key:4}),React__default.createElement('button',{className:css(b.buttonStyle),key:5,type:'submit'}))}
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

declaration-colon-space-after

Require a single space or disallow whitespace after the colon of declarations.

<!-- prettier-ignore -->
a { color: pink }
/**      ↑
 * The space after this colon */

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected single space after "," in a single-line function (function-comma-space-after)
Open

var Clock=function(a){function b(){var a,c,d,e;classCallCheck(this,b);for(var f=arguments.length,g=Array(f),h=0;h<f;h++)g[h]=arguments[h];return e=(c=(d=possibleConstructorReturn(this,(a=b.__proto__||Object.getPrototypeOf(b)).call.apply(a,[this].concat(g))),d),d.state={sec:6*new Date().getSeconds(),min:6*new Date().getMinutes(),hour:30*new Date().getHours()+0.5*new Date().getMinutes()},d.componentWillMount=function(){setInterval(function(){d.setState({sec:6*new Date().getSeconds(),min:6*new Date().getMinutes(),hour:30*new Date().getHours()+0.5*new Date().getMinutes()});},1e3);},c),possibleConstructorReturn(d,e)}var c=Math.PI;return inherits(b,a),createClass(b,[{key:'sine',value:function sine(a,b,d){return a+b*Math.sin(c/180*d)}},{key:'cosine',value:function cosine(a,b,d){return a+b*Math.cos(c/180*d)}},{key:'render',value:function render(){var a=this.props,b=a.size,c=this.state,d=new Date().getSeconds().toString(),e=new Date().getMinutes().toString(),f=new Date().getHours().toString(),g=StyleSheet.create({mainSpan:_extends({fontSize:b/2.5,fontFamily:'Arial, Veranda',"-webkit-touch-callout":'none',"-webkit-user-select":'none',"-khtml-user-select":'none',"-moz-user-select":'none',"-ms-user-select":'none',userSelect:'none',cursor:'default'},a.style)});if(95>b)return 20>=b&&(g.mainSpan.style.fontSize=8.5),createElement('span',{className:css(g.mainSpan)},(2>f.length?'0':'')+f,':',(2>e.length?'0':'')+e,a.seconds&&':'+((2>d.length?'0':'')+d));var h=this.cosine,j=this.sine,k=b/2-5,l=b/2,m=b/2,i={x1:l,y1:m,x2:j(l,0.375*b,180-c.sec),y2:h(m,0.375*b,180-c.sec)},n={x1:l,y1:m,x2:j(l,0.35*b,180-c.min),y2:h(m,0.35*b,180-c.min)},o={x1:l,y1:m,x2:j(l,0.25*b,180-c.hour),y2:h(m,0.25*b,180-c.hour)};return createElement('div',_extends({},omit(a,['style','children']),{style:_extends({display:'inline-block'},a.style)}),createElement('svg',{width:b,height:b},'Your device isn\'t support SVG. Please update your browser or OS...',createElement('circle',{cx:l,cy:m,r:k,style:{stroke:'black',fill:'rgba(250, 237, 205, 0.25)'}}),createElement('line',_extends({style:{stroke:'gray',strokeWidth:b/100}},i)),createElement('line',_extends({style:{stroke:'black',strokeWidth:b/60}},n)),createElement('line',{x1:n.x2,y1:n.y2,x2:j(l,0.25*b,180-(c.min-4)),y2:h(m,0.25*b,180-(c.min-4)),style:{stroke:'black',strokeWidth:b/60}}),createElement('line',{x1:n.x2,y1:n.y2,x2:j(l,0.25*b,180-(c.min+4)),y2:h(m,0.25*b,180-(c.min+4)),style:{stroke:'black',strokeWidth:b/60}}),createElement('line',_extends({style:{stroke:'brown',strokeWidth:b/32}},o)),createElement('circle',{cx:l,cy:m,r:b/30,style:{fill:'blue',opacity:'0.975'}}),Array(12).fill('').map(function(a,c){return createElement('line',{x1:j(l,k,180+30*c),y1:h(m,k,180+30*c),x2:j(l,0==c%3?k-0.085*b:k-0.065*b,180+30*c),y2:h(m,0==c%3?k-0.085*b:k-0.065*b,180+30*c),style:{stroke:'black',strokeWidth:'2px'},key:c})})))}}]),b}(Component);Clock.defaultProps={size:200};
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

function-comma-space-after

Require a single space or disallow whitespace after the commas of functions.

<!-- prettier-ignore -->
a { transform: translate(1, 1) }
/**                       ↑
 * The space after this comma */

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Unexpected unknown property "main-span" (property-no-unknown)
Open

var Clock=function(a){function b(){var a,c,d,e;classCallCheck(this,b);for(var f=arguments.length,g=Array(f),h=0;h<f;h++)g[h]=arguments[h];return e=(c=(d=possibleConstructorReturn(this,(a=b.__proto__||Object.getPrototypeOf(b)).call.apply(a,[this].concat(g))),d),d.state={sec:6*new Date().getSeconds(),min:6*new Date().getMinutes(),hour:30*new Date().getHours()+0.5*new Date().getMinutes()},d.componentWillMount=function(){setInterval(function(){d.setState({sec:6*new Date().getSeconds(),min:6*new Date().getMinutes(),hour:30*new Date().getHours()+0.5*new Date().getMinutes()});},1e3);},c),possibleConstructorReturn(d,e)}var c=Math.PI;return inherits(b,a),createClass(b,[{key:'sine',value:function sine(a,b,d){return a+b*Math.sin(c/180*d)}},{key:'cosine',value:function cosine(a,b,d){return a+b*Math.cos(c/180*d)}},{key:'render',value:function render(){var a=this.props,b=a.size,c=this.state,d=new Date().getSeconds().toString(),e=new Date().getMinutes().toString(),f=new Date().getHours().toString(),g=StyleSheet.create({mainSpan:_extends({fontSize:b/2.5,fontFamily:'Arial, Veranda',"-webkit-touch-callout":'none',"-webkit-user-select":'none',"-khtml-user-select":'none',"-moz-user-select":'none',"-ms-user-select":'none',userSelect:'none',cursor:'default'},a.style)});if(95>b)return 20>=b&&(g.mainSpan.style.fontSize=8.5),createElement('span',{className:css(g.mainSpan)},(2>f.length?'0':'')+f,':',(2>e.length?'0':'')+e,a.seconds&&':'+((2>d.length?'0':'')+d));var h=this.cosine,j=this.sine,k=b/2-5,l=b/2,m=b/2,i={x1:l,y1:m,x2:j(l,0.375*b,180-c.sec),y2:h(m,0.375*b,180-c.sec)},n={x1:l,y1:m,x2:j(l,0.35*b,180-c.min),y2:h(m,0.35*b,180-c.min)},o={x1:l,y1:m,x2:j(l,0.25*b,180-c.hour),y2:h(m,0.25*b,180-c.hour)};return createElement('div',_extends({},omit(a,['style','children']),{style:_extends({display:'inline-block'},a.style)}),createElement('svg',{width:b,height:b},'Your device isn\'t support SVG. Please update your browser or OS...',createElement('circle',{cx:l,cy:m,r:k,style:{stroke:'black',fill:'rgba(250, 237, 205, 0.25)'}}),createElement('line',_extends({style:{stroke:'gray',strokeWidth:b/100}},i)),createElement('line',_extends({style:{stroke:'black',strokeWidth:b/60}},n)),createElement('line',{x1:n.x2,y1:n.y2,x2:j(l,0.25*b,180-(c.min-4)),y2:h(m,0.25*b,180-(c.min-4)),style:{stroke:'black',strokeWidth:b/60}}),createElement('line',{x1:n.x2,y1:n.y2,x2:j(l,0.25*b,180-(c.min+4)),y2:h(m,0.25*b,180-(c.min+4)),style:{stroke:'black',strokeWidth:b/60}}),createElement('line',_extends({style:{stroke:'brown',strokeWidth:b/32}},o)),createElement('circle',{cx:l,cy:m,r:b/30,style:{fill:'blue',opacity:'0.975'}}),Array(12).fill('').map(function(a,c){return createElement('line',{x1:j(l,k,180+30*c),y1:h(m,k,180+30*c),x2:j(l,0==c%3?k-0.085*b:k-0.065*b,180+30*c),y2:h(m,0==c%3?k-0.085*b:k-0.065*b,180+30*c),style:{stroke:'black',strokeWidth:'2px'},key:c})})))}}]),b}(Component);Clock.defaultProps={size:200};
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

property-no-unknown

Disallow unknown properties.

<!-- prettier-ignore -->
a { heigth: 100%; }
/** ↑
 * This property */

This rule considers properties defined in the CSS Specifications and browser specific properties to be known.

This rule ignores:

  • variables ($sass, @less, --custom-property)
  • vendor-prefixed properties (e.g., -moz-align-self, -webkit-align-self)

Use option checkPrefixed described below to turn on checking of vendor-prefixed properties.

Expected single space after "{" of a single-line block (block-opening-brace-space-after)
Open

function Input(a){var b=StyleSheet.create({inputStyle:{border:'1px solid rgb(128, 128, 128)',borderRadius:'3.5px',background:'rgb(250, 250, 250)',height:'22.5px',paddingLeft:'4.5px',paddingRight:'3px'}});return React__default.createElement('input',_extends({className:css(b.inputStyle)},a))}
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

block-opening-brace-space-after

Require a single space or disallow whitespace after the opening brace of blocks.

<!-- prettier-ignore -->
a { color: pink; }
/** ↑
 * The space after this brace */

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected single space after ";" in a single-line declaration block (declaration-block-semicolon-space-after)
Open

function FormBasic(a){var b=StyleSheet.create({inputStyle:{border:'1px solid rgb(128, 128, 128)',borderRadius:'3.5px',background:'rgb(250, 250, 250)',height:'22.5px',paddingLeft:'4.5px',paddingRight:'3px'},buttonStyle:{background:'rgb(50, 120, 180)',color:'white',border:'1px solid rgb(30, 100, 160)',borderRadius:'3px',padding:'5px 10px',fontSize:'16px'},seperator1:{height:'5px'},seperator2:{height:'7.5px'}});return React__default.createElement('form',a,'Username:',React__default.createElement('input',{className:css(b.inputStyle),name:'user',type:'text',key:1}),React__default.createElement('div',{className:css(b.seperator1),key:2}),'Password:',React__default.createElement('input',{className:css(b.inputStyle),name:'password',type:'password',key:3}),React__default.createElement('div',{className:css(b.seperator2),key:4}),React__default.createElement('button',{className:css(b.buttonStyle),key:5,type:'submit'}))}
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

declaration-block-semicolon-space-after

Require a single space or disallow whitespace after the semicolons of declaration blocks.

<!-- prettier-ignore -->
a { color: pink; top: 0; }
/**            ↑
 * The space after this semicolon */

This rule ignores:

  • semicolons that are preceded by Less mixins
  • the last semicolon of declaration blocks

Use the block-closing-brace-*-before rules to control the whitespace between the last semicolon and the closing brace instead.

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected no more than 1 declaration (declaration-block-single-line-max-declarations)
Open

function FormBasic(a){var b=StyleSheet.create({inputStyle:{border:'1px solid rgb(128, 128, 128)',borderRadius:'3.5px',background:'rgb(250, 250, 250)',height:'22.5px',paddingLeft:'4.5px',paddingRight:'3px'},buttonStyle:{background:'rgb(50, 120, 180)',color:'white',border:'1px solid rgb(30, 100, 160)',borderRadius:'3px',padding:'5px 10px',fontSize:'16px'},seperator1:{height:'5px'},seperator2:{height:'7.5px'}});return React__default.createElement('form',a,'Username:',React__default.createElement('input',{className:css(b.inputStyle),name:'user',type:'text',key:1}),React__default.createElement('div',{className:css(b.seperator1),key:2}),'Password:',React__default.createElement('input',{className:css(b.inputStyle),name:'password',type:'password',key:3}),React__default.createElement('div',{className:css(b.seperator2),key:4}),React__default.createElement('button',{className:css(b.buttonStyle),key:5,type:'submit'}))}
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

declaration-block-single-line-max-declarations

Limit the number of declarations within a single-line declaration block.

<!-- prettier-ignore -->
a { color: pink; top: 0; }
/** ↑            ↑
 * The number of these declarations */

Expected single space after ":" with a single-line declaration (declaration-colon-space-after)
Open

function Box(a){var b=StyleSheet.create({mainDiv:_extends({height:a.height,width:a.width,color:a.color,opacity:a.opacity,background:a.background,padding:'3px 7px',fontFamily:'Verdana, Geneva, sans-serif'},a.style),mainPre:{fontSize:'12px',verticalAlign:'middle',height:a.height,width:a.width}});return React__default.createElement('div',_extends({className:css(b.mainDiv)},omit(a,['style','background','color','opacity','width','height'])),React__default.createElement('pre',{className:css(b.mainPre)},a.children))}Box.defaultProps={color:'rgb(10, 10, 10)',opacity:'1',style:{},width:'95%',background:'rgb(230, 230, 230)'};
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

declaration-colon-space-after

Require a single space or disallow whitespace after the colon of declarations.

<!-- prettier-ignore -->
a { color: pink }
/**      ↑
 * The space after this colon */

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected single space after ":" with a single-line declaration (declaration-colon-space-after)
Open

function FormBasic(a){var b=StyleSheet.create({inputStyle:{border:'1px solid rgb(128, 128, 128)',borderRadius:'3.5px',background:'rgb(250, 250, 250)',height:'22.5px',paddingLeft:'4.5px',paddingRight:'3px'},buttonStyle:{background:'rgb(50, 120, 180)',color:'white',border:'1px solid rgb(30, 100, 160)',borderRadius:'3px',padding:'5px 10px',fontSize:'16px'},seperator1:{height:'5px'},seperator2:{height:'7.5px'}});return React__default.createElement('form',a,'Username:',React__default.createElement('input',{className:css(b.inputStyle),name:'user',type:'text',key:1}),React__default.createElement('div',{className:css(b.seperator1),key:2}),'Password:',React__default.createElement('input',{className:css(b.inputStyle),name:'password',type:'password',key:3}),React__default.createElement('div',{className:css(b.seperator2),key:4}),React__default.createElement('button',{className:css(b.buttonStyle),key:5,type:'submit'}))}
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

declaration-colon-space-after

Require a single space or disallow whitespace after the colon of declarations.

<!-- prettier-ignore -->
a { color: pink }
/**      ↑
 * The space after this colon */

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Headers should be surrounded by blank lines
Open

## Notes:
Severity: Info
Found in example/README.md by markdownlint

MD022 - Headers should be surrounded by blank lines

Tags: headers, blank_lines

Aliases: blanks-around-headers

This rule is triggered when headers (any style) are either not preceded or not followed by a blank line:

# Header 1
Some text

Some more text
## Header 2

To fix this, ensure that all headers have a blank line both before and after (except where the header is at the beginning or end of the document):

# Header 1

Some text

Some more text

## Header 2

Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse headers that don't have a blank line before, and will parse them as regular text.

Expected single space after ":" with a single-line declaration (declaration-colon-space-after)
Open

function FormBasic(a){var b=StyleSheet.create({inputStyle:{border:'1px solid rgb(128, 128, 128)',borderRadius:'3.5px',background:'rgb(250, 250, 250)',height:'22.5px',paddingLeft:'4.5px',paddingRight:'3px'},buttonStyle:{background:'rgb(50, 120, 180)',color:'white',border:'1px solid rgb(30, 100, 160)',borderRadius:'3px',padding:'5px 10px',fontSize:'16px'},seperator1:{height:'5px'},seperator2:{height:'7.5px'}});return React__default.createElement('form',a,'Username:',React__default.createElement('input',{className:css(b.inputStyle),name:'user',type:'text',key:1}),React__default.createElement('div',{className:css(b.seperator1),key:2}),'Password:',React__default.createElement('input',{className:css(b.inputStyle),name:'password',type:'password',key:3}),React__default.createElement('div',{className:css(b.seperator2),key:4}),React__default.createElement('button',{className:css(b.buttonStyle),key:5,type:'submit'}))}
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

declaration-colon-space-after

Require a single space or disallow whitespace after the colon of declarations.

<!-- prettier-ignore -->
a { color: pink }
/**      ↑
 * The space after this colon */

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Multiple consecutive blank lines
Open


Severity: Info
Found in README.md by markdownlint

MD012 - Multiple consecutive blank lines

Tags: whitespace, blank_lines

Aliases: no-multiple-blanks

This rule is triggered when there are multiple consecutive blank lines in the document:

Some text here


Some more text here

To fix this, delete the offending lines:

Some text here

Some more text here

Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

Expected single space after "," in a single-line function (function-comma-space-after)
Open

var Clock=function(a){function b(){var a,c,d,e;classCallCheck(this,b);for(var f=arguments.length,g=Array(f),h=0;h<f;h++)g[h]=arguments[h];return e=(c=(d=possibleConstructorReturn(this,(a=b.__proto__||Object.getPrototypeOf(b)).call.apply(a,[this].concat(g))),d),d.state={sec:6*new Date().getSeconds(),min:6*new Date().getMinutes(),hour:30*new Date().getHours()+0.5*new Date().getMinutes()},d.componentWillMount=function(){setInterval(function(){d.setState({sec:6*new Date().getSeconds(),min:6*new Date().getMinutes(),hour:30*new Date().getHours()+0.5*new Date().getMinutes()});},1e3);},c),possibleConstructorReturn(d,e)}var c=Math.PI;return inherits(b,a),createClass(b,[{key:'sine',value:function sine(a,b,d){return a+b*Math.sin(c/180*d)}},{key:'cosine',value:function cosine(a,b,d){return a+b*Math.cos(c/180*d)}},{key:'render',value:function render(){var a=this.props,b=a.size,c=this.state,d=new Date().getSeconds().toString(),e=new Date().getMinutes().toString(),f=new Date().getHours().toString(),g=StyleSheet.create({mainSpan:_extends({fontSize:b/2.5,fontFamily:'Arial, Veranda',"-webkit-touch-callout":'none',"-webkit-user-select":'none',"-khtml-user-select":'none',"-moz-user-select":'none',"-ms-user-select":'none',userSelect:'none',cursor:'default'},a.style)});if(95>b)return 20>=b&&(g.mainSpan.style.fontSize=8.5),createElement('span',{className:css(g.mainSpan)},(2>f.length?'0':'')+f,':',(2>e.length?'0':'')+e,a.seconds&&':'+((2>d.length?'0':'')+d));var h=this.cosine,j=this.sine,k=b/2-5,l=b/2,m=b/2,i={x1:l,y1:m,x2:j(l,0.375*b,180-c.sec),y2:h(m,0.375*b,180-c.sec)},n={x1:l,y1:m,x2:j(l,0.35*b,180-c.min),y2:h(m,0.35*b,180-c.min)},o={x1:l,y1:m,x2:j(l,0.25*b,180-c.hour),y2:h(m,0.25*b,180-c.hour)};return createElement('div',_extends({},omit(a,['style','children']),{style:_extends({display:'inline-block'},a.style)}),createElement('svg',{width:b,height:b},'Your device isn\'t support SVG. Please update your browser or OS...',createElement('circle',{cx:l,cy:m,r:k,style:{stroke:'black',fill:'rgba(250, 237, 205, 0.25)'}}),createElement('line',_extends({style:{stroke:'gray',strokeWidth:b/100}},i)),createElement('line',_extends({style:{stroke:'black',strokeWidth:b/60}},n)),createElement('line',{x1:n.x2,y1:n.y2,x2:j(l,0.25*b,180-(c.min-4)),y2:h(m,0.25*b,180-(c.min-4)),style:{stroke:'black',strokeWidth:b/60}}),createElement('line',{x1:n.x2,y1:n.y2,x2:j(l,0.25*b,180-(c.min+4)),y2:h(m,0.25*b,180-(c.min+4)),style:{stroke:'black',strokeWidth:b/60}}),createElement('line',_extends({style:{stroke:'brown',strokeWidth:b/32}},o)),createElement('circle',{cx:l,cy:m,r:b/30,style:{fill:'blue',opacity:'0.975'}}),Array(12).fill('').map(function(a,c){return createElement('line',{x1:j(l,k,180+30*c),y1:h(m,k,180+30*c),x2:j(l,0==c%3?k-0.085*b:k-0.065*b,180+30*c),y2:h(m,0==c%3?k-0.085*b:k-0.065*b,180+30*c),style:{stroke:'black',strokeWidth:'2px'},key:c})})))}}]),b}(Component);Clock.defaultProps={size:200};
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

function-comma-space-after

Require a single space or disallow whitespace after the commas of functions.

<!-- prettier-ignore -->
a { transform: translate(1, 1) }
/**                       ↑
 * The space after this comma */

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected newline after "}" (block-closing-brace-newline-after)
Open

function FormBasic(a){var b=StyleSheet.create({inputStyle:{border:'1px solid rgb(128, 128, 128)',borderRadius:'3.5px',background:'rgb(250, 250, 250)',height:'22.5px',paddingLeft:'4.5px',paddingRight:'3px'},buttonStyle:{background:'rgb(50, 120, 180)',color:'white',border:'1px solid rgb(30, 100, 160)',borderRadius:'3px',padding:'5px 10px',fontSize:'16px'},seperator1:{height:'5px'},seperator2:{height:'7.5px'}});return React__default.createElement('form',a,'Username:',React__default.createElement('input',{className:css(b.inputStyle),name:'user',type:'text',key:1}),React__default.createElement('div',{className:css(b.seperator1),key:2}),'Password:',React__default.createElement('input',{className:css(b.inputStyle),name:'password',type:'password',key:3}),React__default.createElement('div',{className:css(b.seperator2),key:4}),React__default.createElement('button',{className:css(b.buttonStyle),key:5,type:'submit'}))}
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

block-closing-brace-newline-after

Require a newline or disallow whitespace after the closing brace of blocks.

<!-- prettier-ignore -->
a { color: pink; }
a { color: red; }↑
/**              ↑
 * The newline after this brace */

This rule allows an end-of-line comment separated from the closing brace by spaces, as long as the comment contains no newlines. For example,

<!-- prettier-ignore -->
a {
  color: pink;
} /* end-of-line comment */

This rule allows a trailing semicolon after the closing brace of a block. For example,

<!-- prettier-ignore -->
:root {
  --toolbar-theme: {
    background-color: hsl(120, 70%, 95%);
  };
/* ↑
 * This semicolon */
}

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected selector ".switch span" to come before selector ".switch .switch-lg span" (no-descending-specificity)
Open

.switch span {
Severity: Minor
Found in less/Checkbox.less by stylelint

no-descending-specificity

Disallow selectors of lower specificity from coming after overriding selectors of higher specificity.

<!-- prettier-ignore -->
#container a { top: 10px; } a { top: 0; }
/** ↑                           ↑
 * The order of these selectors represents descending specificity */

Source order is important in CSS, and when two selectors have the same specificity, the one that occurs last will take priority. However, the situation is different when one of the selectors has a higher specificity. In that case, source order does not matter: the selector with higher specificity will win out even if it comes first.

The clashes of these two mechanisms for prioritization, source order and specificity, can cause some confusion when reading stylesheets. If a selector with higher specificity comes before the selector it overrides, we have to think harder to understand it, because it violates the source order expectation. Stylesheets are most legible when overriding selectors always come after the selectors they override. That way both mechanisms, source order and specificity, work together nicely.

This rule enforces that practice as best it can, reporting fewer errors than it should. It cannot catch every actual overriding selector, but it can catch certain common mistakes.

How it works

This rule looks at the last compound selector in every full selector, and then compares it with other selectors in the stylesheet that end in the same way.

So .foo .bar (whose last compound selector is .bar) will be compared to .bar and #baz .bar, but not to #baz .foo or .bar .foo.

And a > li#wag.pit (whose last compound selector is li#wag.pit) will be compared to div li#wag.pit and a > b > li + li#wag.pit, but not to li or li #wag, etc.

Selectors targeting pseudo-elements are not considered comparable to similar selectors without the pseudo-element, because they target other elements on the rendered page. For example, a::before {} will not be compared to a:hover {}, because a::before targets a pseudo-element whereas a:hover targets the actual <a>.

This rule only compares rules that are within the same media context. So a {} @media print { #baz a {} } is fine.

This rule resolves nested selectors before calculating the specificity of the selectors.

DOM Limitations

The linter can only check the CSS to check for specificity order. It does not have access to the HTML or DOM in order to interpret the use of the CSS.

This can lead to valid linting errors appearing to be invalid at first glance.

For example the following will cause an error:

<!-- prettier-ignore -->
.component1 a {}
.component1 a:hover {}
.component2 a {}

This is a correct error because the a:hover on line 2 has a higher specificity than the a on line 3.

This may lead to confusion because "the two selectors will never match the same a in the DOM". However, since the linter does not have access to the DOM it can not evaluate this, and therefore correctly reports the error about descending specificity.

It may be possible to restructure your CSS to remove the error, otherwise it is recommended that you disable the rule for that line and leave a comment saying why the error should be ignored. Note that disabling the rule will cause additional valid errors from being reported.

Expected single space after "{" of a single-line block (block-opening-brace-space-after)
Open

function Box(a){var b=StyleSheet.create({mainDiv:_extends({height:a.height,width:a.width,color:a.color,opacity:a.opacity,background:a.background,padding:'3px 7px',fontFamily:'Verdana, Geneva, sans-serif'},a.style),mainPre:{fontSize:'12px',verticalAlign:'middle',height:a.height,width:a.width}});return React__default.createElement('div',_extends({className:css(b.mainDiv)},omit(a,['style','background','color','opacity','width','height'])),React__default.createElement('pre',{className:css(b.mainPre)},a.children))}Box.defaultProps={color:'rgb(10, 10, 10)',opacity:'1',style:{},width:'95%',background:'rgb(230, 230, 230)'};
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

block-opening-brace-space-after

Require a single space or disallow whitespace after the opening brace of blocks.

<!-- prettier-ignore -->
a { color: pink; }
/** ↑
 * The space after this brace */

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected single space before "{" (block-opening-brace-space-before)
Open

function Box(a){var b=StyleSheet.create({mainDiv:_extends({height:a.height,width:a.width,color:a.color,opacity:a.opacity,background:a.background,padding:'3px 7px',fontFamily:'Verdana, Geneva, sans-serif'},a.style),mainPre:{fontSize:'12px',verticalAlign:'middle',height:a.height,width:a.width}});return React__default.createElement('div',_extends({className:css(b.mainDiv)},omit(a,['style','background','color','opacity','width','height'])),React__default.createElement('pre',{className:css(b.mainPre)},a.children))}Box.defaultProps={color:'rgb(10, 10, 10)',opacity:'1',style:{},width:'95%',background:'rgb(230, 230, 230)'};
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

block-opening-brace-space-before

Require a single space or disallow whitespace before the opening brace of blocks.

<!-- prettier-ignore -->
a { color: pink; }
/** ↑
 * The space before this brace */

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected single space after ";" in a single-line declaration block (declaration-block-semicolon-space-after)
Open

function FormBasic(a){var b=StyleSheet.create({inputStyle:{border:'1px solid rgb(128, 128, 128)',borderRadius:'3.5px',background:'rgb(250, 250, 250)',height:'22.5px',paddingLeft:'4.5px',paddingRight:'3px'},buttonStyle:{background:'rgb(50, 120, 180)',color:'white',border:'1px solid rgb(30, 100, 160)',borderRadius:'3px',padding:'5px 10px',fontSize:'16px'},seperator1:{height:'5px'},seperator2:{height:'7.5px'}});return React__default.createElement('form',a,'Username:',React__default.createElement('input',{className:css(b.inputStyle),name:'user',type:'text',key:1}),React__default.createElement('div',{className:css(b.seperator1),key:2}),'Password:',React__default.createElement('input',{className:css(b.inputStyle),name:'password',type:'password',key:3}),React__default.createElement('div',{className:css(b.seperator2),key:4}),React__default.createElement('button',{className:css(b.buttonStyle),key:5,type:'submit'}))}
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

declaration-block-semicolon-space-after

Require a single space or disallow whitespace after the semicolons of declaration blocks.

<!-- prettier-ignore -->
a { color: pink; top: 0; }
/**            ↑
 * The space after this semicolon */

This rule ignores:

  • semicolons that are preceded by Less mixins
  • the last semicolon of declaration blocks

Use the block-closing-brace-*-before rules to control the whitespace between the last semicolon and the closing brace instead.

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected single space after ";" in a single-line declaration block (declaration-block-semicolon-space-after)
Open

function FormBasic(a){var b=StyleSheet.create({inputStyle:{border:'1px solid rgb(128, 128, 128)',borderRadius:'3.5px',background:'rgb(250, 250, 250)',height:'22.5px',paddingLeft:'4.5px',paddingRight:'3px'},buttonStyle:{background:'rgb(50, 120, 180)',color:'white',border:'1px solid rgb(30, 100, 160)',borderRadius:'3px',padding:'5px 10px',fontSize:'16px'},seperator1:{height:'5px'},seperator2:{height:'7.5px'}});return React__default.createElement('form',a,'Username:',React__default.createElement('input',{className:css(b.inputStyle),name:'user',type:'text',key:1}),React__default.createElement('div',{className:css(b.seperator1),key:2}),'Password:',React__default.createElement('input',{className:css(b.inputStyle),name:'password',type:'password',key:3}),React__default.createElement('div',{className:css(b.seperator2),key:4}),React__default.createElement('button',{className:css(b.buttonStyle),key:5,type:'submit'}))}
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

declaration-block-semicolon-space-after

Require a single space or disallow whitespace after the semicolons of declaration blocks.

<!-- prettier-ignore -->
a { color: pink; top: 0; }
/**            ↑
 * The space after this semicolon */

This rule ignores:

  • semicolons that are preceded by Less mixins
  • the last semicolon of declaration blocks

Use the block-closing-brace-*-before rules to control the whitespace between the last semicolon and the closing brace instead.

The [fix option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

Expected no more than 1 declaration (declaration-block-single-line-max-declarations)
Open

function Box(a){var b=StyleSheet.create({mainDiv:_extends({height:a.height,width:a.width,color:a.color,opacity:a.opacity,background:a.background,padding:'3px 7px',fontFamily:'Verdana, Geneva, sans-serif'},a.style),mainPre:{fontSize:'12px',verticalAlign:'middle',height:a.height,width:a.width}});return React__default.createElement('div',_extends({className:css(b.mainDiv)},omit(a,['style','background','color','opacity','width','height'])),React__default.createElement('pre',{className:css(b.mainPre)},a.children))}Box.defaultProps={color:'rgb(10, 10, 10)',opacity:'1',style:{},width:'95%',background:'rgb(230, 230, 230)'};
Severity: Minor
Found in example/imports/rsg-components.js by stylelint

declaration-block-single-line-max-declarations

Limit the number of declarations within a single-line declaration block.

<!-- prettier-ignore -->
a { color: pink; top: 0; }
/** ↑            ↑
 * The number of these declarations */
Severity
Category
Status
Source
Language