Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
stylefmt-loader
Advanced tools
npm install --save-dev stylefmt stylefmt-loader
or
yarn add --dev stylefmt stylefmt-loader
This loader is meant to be used before pre-processing your css. It fixes stylelint issues automatically while bundling with Webpack.
During bundling, this loader will rewrite your css files with the corrections.
require("css!postcss!stylefmt!./file.css");
//or
require("css!sass!stylefmt!./file.scss");
//or any other preproccesor
module: {
rules: [
{
test: /\.scss$/,
use: [
"css-loader",
"sass-loader",
"stylefmt-loader"
]
}
]
}
You can also specify your stylelint for stylefmt to use:
module: {
rules: [
{
test: /\.scss$/,
use: [
"css-loader",
"sass-loader",
{
loader: "stylefmt-loader",
options: {
config: ".stylelintrc"
}
}
]
}
]
}
Your css before running webpack
// mixin for clearfix
@mixin clearfix () { &:before,
&:after {
content:" ";
display : table; }
&:after {clear: both;}
}.class
{
padding:10px;@include clearfix();}
.base { color: red; }
// placeholder
%base
{
padding: 12px
}
.foo{
@extend .base;}
.bar
{ @extend %base;
}
Your css after running webpack
// mixin for clearfix
@mixin clearfix() {
&:before,
&:after {
content: " ";
display: table;
}
&:after {
clear: both;
}
}
.class {
padding: 10px;
@include clearfix();
}
.base {
color: red;
}
// placeholder
%base {
padding: 12px;
}
.foo {
@extend .base;
}
.bar {
@extend %base;
}
Please be specific in your issue. The code is not complex, why not proposing a PR?
Right now there's only one test and is kind of automated, a cleaner solution would be nice.
$> npm run test
FAQs
Fixes stylelint issues automatically while bundling with Webpack
The npm package stylefmt-loader receives a total of 28 weekly downloads. As such, stylefmt-loader popularity was classified as not popular.
We found that stylefmt-loader 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.