1.0.2 • Published 4 years ago

fxlinter v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

fxLinter

A little utility tool to lint common performance issues in FiveM or RedM scripts

The package you download from npm/yarn is the CLI build.

FiveM build

  1. Clone this repository
  2. Inside that folder run yarn
  3. After you installad all the dependencies, run yarn build-fivem
  4. Start the resource using start fxLinter

API

fxLinter exposes a server event (fxLinter:lint), to lint any folder. Args: path: string The folder to lint ignores: string, string Folders, files, names to ignore (such as node_modules, .git etc) callback: an array containing all the linting results. Array strucutre:

[{
  rule: string, // the rule name
  line: number, // the line number
  lineTxt: string, // the line itself
  file: string, // the file path
  level: "warn" | "error" | "off" // severity of the issue
}, /* more results here*/]