
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@diesdasdigital/csslint
Advanced tools
Linter for diesdas’ CSS architecture.
Most CSS bugs are caused by classes unintentionally overriding other classes. When building websites/interfaces with components this can happen for example if component styles are overwritten by a parent component. The component looks different because of where it’s placed (its context).
In any software system relying on context creates complexity. If one needs to know what the context of a specific piece of code is, one also has to understand all of that context.
CSS in JS tools solve that problem by using inline styles and/or generating class names automatically during a build step. This way developers cannot unintentionally override other components classes, because they don’t even know what the class name will be.
The downsides of CSS in JS solutions are:
Therefore we came up with a CSS architecture which has one major and a few minor rules to get the same benefit of local reasoning for components without the drawbacks of CSS in JS tools.
@keyframes component__my-animation
.component__one__two
is ill-formed1️⃣ Generic knowledge
CSS syntax is a standard. Learn it once.
2️⃣ Meaningful class names
Even in production we have meaningful class names which helps when we need to debug.
3️⃣ No build step
Every browser knows how to load CSS.
To add it to your project use npm
or yarn
:
yarn add @diesdasdigital/csslint --dev
npm install @diesdasdigital/csslint --save-dev
Then you can use the linter via npx
or in package.json
scripts:
{
"scripts": {
"lint": "csslint 'src/**/*.css' --all"
}
}
--all
doesn’t stop on the first invalid file and shows a summary of how many errors it found
--verbose
also logs all valid files it has checked
In your projects root folder, create .csslintignore
file, which includes new line separate file paths which should be ignored.
Alternatively you can ignore a single line inside of a file by writing the following comment in the previous line:
/* csslint-disable-next-line */
If you want to create PR, we test and develop this tool using these as a baseline:
MIT
Created by diesdas.digital
FAQs
Linter for our CSS architecture
We found that @diesdasdigital/csslint 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.