
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
postcss-add-block-lint
Advanced tools
A PostCSS plugin that is used to lint css for existence of classes that might trigger add blockers.
IMPORTANT: This project is no longer maintained.
A PostCSS plugin that is used to lint css for existence of classes that might trigger add blockers.
These instructions are only for this plugin. See the PostCSS website for framework information.
Using Yarn
yarn add postcss-add-block-lint --exact --dev
Using NPM
npm install postcss-add-block-lint --save-dev --save-exact
Add to your PostCSS configuration.
const Gulp = require("gulp");
const PostCSS = require("gulp-postcss");
const AddBlockLint = require("postcss-add-block-lint");
Gulp.task("css", () =>
Gulp.src("./src/*.css").pipe(
PostCSS([
AddBlockLint({
rules: [
`${__dirname}/data/easylist.txt`,
`${__dirname}/data/easylist-cookie.txt`,
`${__dirname}/data/fanboy-social.txt`,
`${__dirname}/data/fanboy-annoyance.txt`,
],
}),
])
)
);
const AddBlockLint = require("postcss-add-block-lint");
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: [
"style-loader",
{ loader: "css-loader", options: { importLoaders: 1 } },
{
loader: "postcss-loader",
options: {
plugins: [
AddBlockLint({
rules: [
`${__dirname}/data/easylist.txt`,
`${__dirname}/data/easylist-cookie.txt`,
`${__dirname}/data/fanboy-social.txt`,
`${__dirname}/data/fanboy-annoyance.txt`,
],
}),
],
},
},
],
},
],
},
};
Based on example from https://webpack.js.org/loaders/postcss-loader/.
Ensure that ad blocking lists are downloaded to ./data
directory.
yarn prepare
When matches are found, they will be outputted to the console.
The minimal required configuration is the rules
list, as shown in the above example.
AddBlockLint({
rules: [
`${__dirname}/data/easylist.txt`,
`${__dirname}/data/easylist-cookie.txt`,
`${__dirname}/data/fanboy-social.txt`,
`${__dirname}/data/fanboy-annoyance.txt`,
],
});
Lists shown in the above example can be accessed from the following locations:
FAQs
A PostCSS plugin that is used to lint css for existence of classes that might trigger add blockers.
The npm package postcss-add-block-lint receives a total of 6 weekly downloads. As such, postcss-add-block-lint popularity was classified as not popular.
We found that postcss-add-block-lint 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.