Skip to content

Performance Plugin

Flint’s performance plugin includes rules targeted to code that runs with specialized performance needs. As in, this plugin enforces performance best practices that only apply when code must be as performant as possible.

Terminal window
npm install @flint.fyi/plugin-performance

Flint’s performance plugin provides the following preset:

PresetRecommendedDescription
logical✅ AlwaysCommon rules for finding bugs and good practices for high-performance code.

Flint recommends using the logical preset:

flint.config.ts
import { performance } from "@flint.fyi/performance";
import { defineConfig } from "flint";
export default defineConfig({
use: [
{
files: performance.files.all,
rules: [performance.presets.logical],
},
],
});

Rules that find bugs and enforce good performance practices and catch common pitfalls for most-to-all JavaScript and TypeScript files.

flint.config.ts
import { performance } from "@flint.fyi/performance";
import { defineConfig } from "flint";
export default defineConfig({
use: [
{
files: performance.files.all,
rules: performance.presets.logical,
},
],
});
Implemented: 0 of 3 (0%)
Flint NamePresetBiome Rule(s)Deno Lint Rule(s)ESLint Rule(s)Oxlint Rule(s)
deletesLogicalnoDelete
importedNamespaceDynamicAccessesLogicalnoDynamicNamespaceImportAccess
spreadAccumulatorsLogicalnoAccumulatingSpreadoxc/no-accumulating-spread
Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.