This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.ESLint.
Summary
Functions to call eslint.
In order to use this add-in, eslint has to be available.
One option is using Cake.Npm.Module to install ESLint from npmjs.com.
Another option is, if you have an npm project setup, to add ESLint to package.json and call NpmInstall() to be sure it is available.
Example:
#addin "nuget:?package=Cake.Npm"
#addin "nuget:?package=Cake.ESLint"
Task("lint")
.Does(() => {
// ensure elsint is installed from npm
NpmInstall(new NpmInstallSettings {
WorkingDirectory = "src"
});
// run lint
ESLint(x => {
x.WorkingDirectory = "src2";
x.Output = "../output.json"; // relative to WorkingDirectory
x.OutputFormat = ESLintOutputFormat.Json;
x.ContinueOnErrors = true;
x.AddDirectory("."); // relative to WorkingDirectory
});
});
- Assembly
- Cake
.ESLint .dll - Namespace
- Cake
.ESLint - Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type["ESLintAliases"]
class Type type-node
Syntax
public static class ESLintAliases
Attributes
Type | Description |
---|---|
Cake |
Methods
Name | Value | Summary |
---|---|---|
ESLint |
void |
Runs ESLint, using the default settings.
static
|
ESLint |
void |
Runs ESLint, using the given settings.
static
|
Extension Methods
Name | Value | Summary |
---|---|---|
ToDictionary |
IDictionary |
From ObjectHelpers
Requires the Cake.DeployParams addin
|
To |
string |
From StringExtensions
Requires the Cake.Issues addin
|