Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
fela-plugin-validator
Advanced tools
Enforces object validation for keyframes and rules.
Logs invalid properties to the console
.
If enabled, csslint is used to check the CSS.
One might also enable automatic property deletion.
yarn add fela-plugin-validator
You may alternatively use npm i --save fela-plugin-validator
.
Make sure to read the documentation on how to use plugins.
import { createRenderer } from 'fela'
import validator from 'fela-plugin-validator'
const renderer = createRenderer({
plugins: [ validator() ]
})
Make sure that you place the validator plugin at the end of your plugins array - or else you may get some false error / validation messages.
Option | Value | Default | Description |
---|---|---|---|
logInvalid | (boolean?) | true | logs invalid properties/values |
deleteInvalid | (boolean?) | false | deletes invalid properties/values |
useCSSLint | (boolean?) (Object?) | false | use CSSLint for style validation. If an object is transferred, it will be interpreted as a set of rules for the validation (see here) |
import { createRenderer } from 'fela'
import validator from 'fela-plugin-validator'
const validatorPlugin = validator({
logInvalid: true,
deleteInvalid: true,
useCSSLint: true
})
const renderer = createRenderer({
plugins: [ validatorPlugin ]
})
If the deleteInvalid
option is enabled.
{
'0%': {
color: 'red'
},
'101%': {
color: 'blue'
},
color: 'blue'
}
{
'0%': {
color: 'red'
}
}
{
color: 'red',
':hover': {
color: 'green',
foo: {
color: 'blue'
}
},
'nested': {
color: 'yellow'
}
}
{
color: 'red',
':hover': {
color: 'green',
}
}
Fela is licensed under the MIT License.
Documentation is licensed under Creative Common License.
Created with ♥ by @robinweser and all the great contributors.
11.1.1 / 11.1.2
| Package | Changes |
| --- | --- |
| react-fela<br>preact-fela<br>infero-fela<br>reason-fela<br>fela-bindings | (#765) Fixed some regressions with missing exports concerning renderToNodeList
|
FAQs
Fela plugin to validate style objects
The npm package fela-plugin-validator receives a total of 6,926 weekly downloads. As such, fela-plugin-validator popularity was classified as popular.
We found that fela-plugin-validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.