0.1.1 ā€¢ Published 8 months ago

@react-three/eslint-plugin v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@react-three/eslint-plugin

Version Twitter Discord Open Collective ETH BTC

An ESLint plugin which provides lint rules for @react-three/fiber.

Installation

npm install @react-three/eslint-plugin --save-dev

Configuration

Use the recommended config to get reasonable defaults:

"extends": [
  "plugin:@react-three/recommended"
]

If you do not use a config you will need to specify individual rules and add extra configuration.

Add "@react-three" to the plugins section.

"plugins": [
  "@react-three"
]

Enable the rules that you would like to use.

"rules": {
  "@react-three/no-clone-in-frame-loop": "error"
}

Rules

āœ… Enabled in the recommended configuration. šŸ”§ Automatically fixable by the --fix CLI option. šŸ’” Manually fixable by editor suggestions.

RuleDescriptionāœ…šŸ”§šŸ’”
no-clone-in-loopDisallow cloning vectors in the frame loop which can cause performance problems.āœ…
no-new-in-loopDisallow instantiating new objects in the frame loop which can cause performance problems.āœ…

Shareable configs

Recommended

This plugin exports a recommended configuration that enforces rules appropriate for everyone using React Three Fiber.

"extends": [
  "plugin:@react-three/recommended"
]

All

This plugin also exports an all configuration that includes every available rule.

"extends": [
  "plugin:@react-three/all"
]
0.1.1

8 months ago

0.0.0

1 year ago

0.1.0

1 year ago