@react-three/eslint-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@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.

Rule Description 🔧 💡
no-clone-in-loop Disallow cloning vectors in the frame loop which can cause performance problems.
no-new-in-loop Disallow 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"
]

/@react-three/eslint-plugin/

    Package Sidebar

    Install

    npm i @react-three/eslint-plugin

    Weekly Downloads

    2,876

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    16 kB

    Total Files

    19

    Last publish

    Collaborators

    • bela-bohlender
    • nksaraf
    • isaacmason
    • wiledal
    • codyjasonbennett
    • farazshaikh
    • joergjaeckel
    • bjornstar
    • gsimone
    • giulioz
    • stephencorwin
    • dropthebeatbro
    • mlperego
    • sniok
    • iinfin
    • codynova
    • drcmda
    • marcofugaro
    • alaric.baraou
    • tdfka_rick
    • stockhuman
    • unframework