[](https://github.com/Nas3nmann/nx-oxlint/actions/workflows/weekly-e2e.yml)
npm install nx-oxlint
An Nx plugin for oxlint - a fast ESLint alternative written in Rust.
The easiest way to set up nx-oxlint in your workspace is to use the init generator:
``bash`
npx nx add nx-oxlint
This command will:
- Add nx-oxlint as a devDependency to your workspace@nx/eslint/plugin
- Remove existing configuration in your nx.jsonnx-oxlint
- Add a plugin configuration for with an interferred lint target to your nx.json
This command will not:
- Create an .oxlintrc.json, so running lint will use the default config. Feel free to add a config file and modify the rules as needed
You might need to update the nx deamon and cache using
`bash`
nx reset
`bash`
npm install nx-oxlint
`json`
{
"plugins": [
{
"plugin": "nx-oxlint",
"options": {
"lintTargetName": "lint"
}
}
]
}
`json`
{
"targets": {
"lint": {
"executor": "nx-oxlint:lint"
}
}
}
`bash`
nx run your-project:lint
or
`bash`
nx run-many --target lint
All options are optional. The plugin will use lint as default target
- lintTargetName _(optional)_ - target name for running oxlint, with this you can even keep using eslint as backup
- All other options that the executor provides. See below
All options are optional. The executor will work with minimal configuration.
- projectRoot _(optional)_ - Project root directory (defaults to current project root)configFile
- _(optional)_ - Path to oxlint configuration file (auto-detected by oxlint if not specified, if specified other config files are ignored)fix
- _(optional)_ - Automatically fix problems (default: false)format
- _(optional)_ - Output format (default: "default")checkstyle
- Available formats: , default, github, gitlab, json, junit, stylish, unixquiet
- _(optional)_ - Report errors only, disable warnings (default: false)maxWarnings
- _(optional)_ - Number of warnings to trigger nonzero exit code (minimum: 0)additionalArguments
- _(optional)_ - Additional arguments to pass to oxlint (e.g., --type-aware or --type-check)
If no config file is passed to the plugin/executor, Oxlint will automatically look for configuration files and even consider nested configs with name .oxlintrc.json`
See oxlint documentation for configuration options.