Skip to content

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

License

Notifications You must be signed in to change notification settings

wowjeeez/fxLinter

Repository files navigation

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*/]

To get a humanly readalbe text for the errors, you can use the `fxLinter:getLocale` event (server)
Args:
rule: `string` the rule name
locale: `string` the locale code (default is `en`) WIP callback: the locale string

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published