ESLintSettings Class

Summary

Settings to run eslint.
Assembly
Cake.ESLint.dll
Namespace
Cake.ESLint
Base Types
  • ToolSettings
graph BT Type-->Base0["ToolSettings"] Type["ESLintSettings"] class Type type-node

Syntax

public sealed class ESLintSettings : ToolSettings

Constructors

Name Summary
ESLintSettings() Initializes a new instance of the ESLintSettings class.

Properties

Name Value Summary
Cache bool
Gets or sets a value indicating whether to check only changed files.

Option: --cache.

CacheLocation Path
Gets or sets the path to the cache file or directory.

Option: --cache-location.

CacheStrategy ESLintCacheStrategy
Gets or sets the strategy to use for detecting changed files.

Option: --cache-strategy.

Config FilePath
Gets or sets a path to a config file.

Option: --config.

ContinueOnErrors bool
Gets or sets a value indicating whether to continue on lint errors.

The default is to throw a CakeException if the tool returns a non-zero exit code. If ContinueOnErrors is set to true a warning will be written to the log file but no exception will be thrown, for exit code 1 (see exit-codes in the docs).

Directories IEnumerable<DirectoryPath>
Gets or sets the list of directories to lint.
Environments IEnumerable<string>
Gets or sets the environments.

Option: --env.

Extensions IEnumerable<string>
Gets or sets JavaScript file extensions.

Option: --ext.

Files IEnumerable<FilePath>
Gets or sets the list of Files to lint.
Fix bool
Gets or sets a value indicating whether to fix problems.

Option: --fix.

FixDryRun bool
Gets or sets a value indicating whether to fix problems without saving the changes to the file system.

Option: --fix-dry-run.

FixTypes IEnumerable<ESLintFixType>
Gets or sets the types of fixes to apply.

Option: --fix-types.

Globals IEnumerable<string>
Gets or sets global variables.

Option: --global.

IgnorePath FilePath
Gets or sets the path to the ignoreFile.

Option: --ignore-path.

IgnorePatterns IEnumerable<string>
Gets or sets patterns of files to ignore (in addition to those in .eslintignore).

Option: --ignore-pattern.

MaxWarnings Nullable<int>
Gets or sets the number of warnings to trigger nonzero exit code.

Option: --max-warnings.

NoEslintRc bool
Gets or Sets a value indicating whether to disable use of configuration from eslintrc.

Option: --no-eslintrc.

NoIgnore bool
Gets or sets a value indicating whether to disable use of ignore files and patterns.

Option: --no-ignore.

NoInlineConfig bool
Gets or sets a value indicating whether to prevent comments from changing config or rules.

Option: --no-inline-config.

Output FilePath
Gets or sets the Output file.

Option: --output.

OutputFormat ESLintOutputFormat
Gets or sets output Format.

Option: --format.

Parser string
Gets or sets the parser to be used.

Option: --parser.

ParserOptions IEnumerable<string>
Gets or sets the parser options.

Option: --parser-options.

Plugins IEnumerable<string>
Gets or sets the plugins to use.

Option: --plugin.

Quiet bool
Gets or sets a value indicating whether to report errors only.

Option: --quiet.

ReportUnusedDisableDirectives bool
Gets or sets a value indicating whether to report errors for unused eslint-disable directives.

Option: --report-unused-disable-directives.

ResolvePluginsRelativeTo DirectoryPath
Gets or sets a folder where plugins should be resolved from.

Option: --resolve-plugins-relative-to.

Rules IEnumerable<string>
Gets or sets the Rule(s).

Option: --rule.

RulesDirs IEnumerable<DirectoryPath>
Gets or sets a folder where additional rules are located.

Option: --rulesdir.

UseColors Nullable<bool>
Gets or sets whether to force the using of colors.

Option: --color or --no-color.

Extension Methods

Name Value Summary
AddDirectory(DirectoryPath[]) void
Adds to Directories.
Requires the Cake.ESLint addin
AddFile(FilePath[]) void
adds to Files.
Requires the Cake.ESLint addin
AddFixType(ESLintFixType[]) void
adds to FixTypes.
Requires the Cake.ESLint addin
AddIgnorePattern(DirectoryPath[]) void
adds to IgnorePatterns.
Requires the Cake.ESLint addin
AddIgnorePattern(FilePath[]) void
adds to IgnorePatterns.
Requires the Cake.ESLint addin
AddPlugin(string[]) void
adds to Plugins.
Requires the Cake.ESLint addin
AddRule(string[]) void
adds to Rules.
Requires the Cake.ESLint addin
AddRulesDir(DirectoryPath[]) void
adds to RulesDirs.
Requires the Cake.ESLint addin
Dump<ESLintSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<ESLintSettings>(ESLintSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<ESLintSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<ESLintSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
SetParser(FilePath) void
Sets Parser to a FilePath.
Requires the Cake.ESLint addin
ThrowIfNull<ESLintSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<ESLintSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin