
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@studyportals/stylelint-config
Advanced tools
Install the package
npm install --save-dev @studyportals/stylelint-config
Add beneath code to your package.json
"stylelint": {
"extends": "@studyportals/stylelint-config"
}
.Foo{ .. }).: for each declaration.0.5 instead of .5 and -0.5px instead of -.5px).#FFFFFF.#FFFFFF instead of #FFF.input[type="text"]. They’re only optional in some cases, and it’s a good practice for consistency.margin: 0; instead of margin: 0px;./* Bad example */
.Selector, .SelectorSecondary, .Selector[type=text] {
padding:15px;
margin:0px 0px 15px;
box-shadow:.5px 1px 2px #cccccc,inset 0 1px 0 #FFF
}
/* Good example */
.Selector, .SelectorSecondary, .Selector[type=text] {
padding: 15px;
margin-bottom: 15px;
box-shadow: 0.5px 1px 2px #CCCCCC, inset 0 1px 0 #FFFFFF;
}
Avoid unnecessary nesting. Consider nesting only when you must scope.
/* Bad example */
.Selector {
padding:15px;
.Nested{
...
}
.AnotherNested{
.To{
.Deep{
.NestedChild{
...
}
}
}
}
}
/* Good example */
.Selector {
padding:15px;
.Nested{
...
}
.NestedChild{
...
}
}
.SomeExample)..Button instead of .Btn..js-* classes to denote behavior (as opposed to style), but keep these classes out of your CSS..is-* classes to describe a certain style within an current state./* Bad example */
.T{ ... }
.Red{ ... }
.Header{ ... }
.js-Header{ ... }
/* Good example */
.Tweet{ ... }
.Important{ ... }
.TweetHeader{ ... }
.is-Collapsed{ ... }
$Variable names.SomeExample)..Button instead of .Btn.Apply these rules also to @function and @import names.
/* Bad example */
$colorGrey: lightgrey;
$color-grey: lightgrey;
$_SomeOtherColor: firebrick;
/* Good example */
$GreyL: lightgrey;
@import.css files!/* Bad example */
@import "../path/to/some/stylesheet.css"; // Don't import css files
@import "../path/to/file"; // Define the file extension
/* Good example */
@import "../path/to/_file.scss";
Code is written and maintained by people. Ensure your code is descriptive, well commented, and approachable by others. Great code comments convey context or purpose. Do not simply reiterate a component or class name.
Be sure to write in complete sentences for larger comments and succinct phrases for general notes.
TODO before you start the comment (e.g. /* TODO: Add styling for invalid state. */).FAQs
Install the package
We found that @studyportals/stylelint-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.