
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.
@griffel/eslint-plugin
Advanced tools
ESLint plugin to follow best practices and anticipate common mistakes when writing styles with Griffel
yarn add --dev @griffel/eslint-plugin
# or
npm install --save-dev @griffel/eslint-plugin
Add @griffel
to the plugins section and plugin:@griffel/recommended
to the extends section of your .eslintrc
configuration file:
{
"plugins": ["@griffel"],
"extends": ["plugin:@griffel/recommended"]
}
This plugin exports recommended configuration that enforce good practices, but you can choose to use only the ones that are necessary for your use case:
{
"plugins": ["@griffel"],
"rules": {
"@griffel/hook-naming": "error",
"@griffel/no-shorthands": "error",
"@griffel/pseudo-element-naming": "error"
}
}
You can find more info about enabled rules in the Supported Rules section below.
Key: 🔧 = fixable
Name | Description | 🔧 |
---|---|---|
@griffel/hook-naming | Ensure that hooks returned by the makeStyles() function start with "use" | ❌ |
@griffel/no-invalid-shorthand-arguments | All shorthands must not use space separators, and instead pass in multiple arguments | ✅ |
@griffel/no-shorthands | Enforce usage of CSS longhands | ✅ |
@griffel/styles-file | Ensures that all makeStyles() and makeResetStyles() calls are placed in a .styles.js or .styles.ts file | ❌ |
@griffel/pseudo-element-naming | Ensures that all Pseudo Elements start with two colons | ✅ |
@griffel/top-level-styles | Ensures that all makeStyles() , makeResetStyles() and makeStaticStyles() calls are written in the top level of a file to discourage developer misuse. | ❌ |
@griffel/no-deprecated-shorthands | Ensure that deprecated shorthand functions are not used | ❌ |
FAQs
ESLint plugin with lint rules for Griffel
The npm package @griffel/eslint-plugin receives a total of 1,256 weekly downloads. As such, @griffel/eslint-plugin popularity was classified as popular.
We found that @griffel/eslint-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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’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.