1.0.2 • Published 4 years ago
fxlinter v1.0.2
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
- Clone this repository
- Inside that folder run
yarn
- After you installad all the dependencies, run
yarn build-fivem
- 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*/]