1.10.0 • Published 4 months ago

stylelint-high-performance-animation v1.10.0

Weekly downloads
19,304
License
MIT
Repository
github
Last release
4 months ago

stylelint-high-performance-animation

NPM version Build Status Downloads per month contributions welcome

Stylelint rule for preventing the use of low performance animation and transition properties.

This is a fork of stylelint-performance-animation stylelint plugin. It uses a blacklist for harmful properties instead of a whitelist, which makes it easy to avoid false positives and allows you to specify which type of properties to warn for (layout/paint).

Install

npm install stylelint-high-performance-animation --save-dev

or

yarn add stylelint-high-performance-animation --dev

Usage

Add this config to your .stylelintrc or stylelint config inside package.json:

{
  "plugins": ["stylelint-high-performance-animation"],
  "rules": {
    "plugin/no-low-performance-animation-properties": true
  }
}

Details

div {
  transition: margin 350ms ease-in;
}
/**           ^^^^^^
 * You should not use low performance animation properties */
@keyframes myAnimation {
  50% {
    top: 5px;
  }
}
/** ^^^^^^
 * You should not use low performance animation properties */

For more information read article By Paul Lewis and Paul Irish

Options

true

The following pattern is considered warning:

div {
  transition: margin-left 350ms ease-in;
}

The following pattern is not considered warning:

div {
  transition: transform 350ms ease-in;
}

Optional secondary options

ignore: "paint-properties"

Makes the rule not warn for properties that cause paint and only warn for properties that cause layout.

ignoreProperties: [string]

Given:

{ ignoreProperties: ['color', 'background-color'] }

The following pattern is considered warning:

div {
  transition-property: color, margin;
}

The following pattern is not considered warning:

div {
  transition-property: color, opacity, background-color;
}

Dependencies

This plugin has only stylelint as a dependency.


License

MIT

@nodeart/stylelint@xeho91/stylelint-config@infinitebrahmanuniverse/nolb-stylelint-h@everything-registry/sub-chunk-2842@acmuta-research/stylelint-configeslint-config-lovatafa-linterfrabbit-stylelint@titanom/stylelint-config@trigen/stylelint-config@lint-my-life/stylelint-standard@alexlit/config-stylelint@beardeddudes/stylelint-configscaffoldr-react@alza54/stylelint-config-scss@archoleat/stylelint-config-extended-scss@citruslime/config@twinscom/stylelint-configimhotep@tamland/stylelint@adchitects/stylelint-config@wx-fc/stylelint-config@wayofdev/stylelint-config@ag-media/stylelint-config@1stg/stylelint-config@waldronmatt/stylelint-config@web-configs/stylelint-plugin@craftworks/stylelint-config-angular@craftworks/stylelint-config-craftworkslinter-bundle@anolilab/stylelint-configstylelint-pencilstylelint-code-quality-configstylelint-config-ccbstylelint-config-cloudfourstylelint-config-osedeastylelint-config-pluralstylelint-config-mrtnvhstylelint-config-neoncitylightsstylelint-config-robwstylelint-config-starstuffstylelint-config-strict-modestylelint-config-styled-friendlystylelint-config-seegnostylelint-config-superology-scssstylelint-config-so-prettystylelint-config-spaceninjastylelint-config-zoniastylelint-config-craftworksstylelint-config-copilot-pluginsstylelint-config-goodbyte-styleguide@danifoldi/stylelint-presets@hybrbase/stylelint-config@wemake-services/stylelint-config-scss@m-fe/stylelint-config@fruktorum/stylelint-config@ggascoigne/stylelint-config@jhqn/vue@jhqn/reactcra-template-js@miirinjej/stylelint-config-extracra-template-ts@jothsa/stylelint-config@max-norin/style-project-initbundled-stylelint-config@hidoo/stylelint-config@embyth/stylelint-config@minna-ui/stylelint-config@kwai-explore/stylelint-config@ngineer/config-stylelint@nodeart/stylelint-config-nodeart@modyqyw/fabric@lint-my-life/stylelint-vue@lint-my-life/stylelint-vue-scss@lint-my-life/stylelint-paintbrush@lint-my-life/stylelint-scss@morev/stylelint-config@littlemissrobot/stylelint-config@studiometa/stylelint-config@terminal-nerds/stylelint-config@sweetlikepete/stylelint
1.10.0

4 months ago

1.9.0

9 months ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

2 years ago

1.5.2

3 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago