id = "eslint" name = "ESLint" description = "Pluggable JavaScript linter." homepage = "https://eslint.org" executables = ["eslint"] [commands] format = 1 label = "Lint files" description = "Lint files or directories and optionally fix problems. Plugin, parser and rule overrides are left out." quality = "ai-draft" base = "fig:eslint" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/eslint.ts" license = "MIT" [[commands.field]] id = "targets" label = "Files, directories or globs" type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } sources = ["fig"] [[commands.field]] id = "fix" label = "Fix problems" type = "boolean" option = ["--fix"] effect = "overwrite" sources = ["fig"] [[commands.field]] id = "fix_dry_run" label = "Fix without saving" type = "boolean" option = ["--fix-dry-run"] sources = ["fig"] [[commands.field]] id = "quiet" label = "Errors only" type = "boolean" option = ["--quiet"] sources = ["fig"] [[commands.field]] id = "max_warnings" label = "Max warnings" type = "integer" option = ["--max-warnings"] sources = ["fig"] [[commands.field]] id = "format" label = "Output format" type = "string" option = ["--format", "-f"] suggestions = [{ value = "stylish", label = "Stylish" }, { value = "json", label = "JSON" }, { value = "compact", label = "Compact" }, { value = "unix", label = "Unix" }, { value = "html", label = "HTML" }] sources = ["fig"] [[commands.field]] id = "config" label = "Config file" type = "path" option = ["--config", "-c"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "ext" label = "File extensions" type = "string" option = ["--ext"] sources = ["fig"] [[commands.field]] id = "cache" label = "Cache results" type = "boolean" option = ["--cache"] sources = ["fig"] [[commands.field]] id = "output_file" label = "Report file" type = "path" option = ["--output-file", "-o"] path = { kind = "file", role = "output" } effect = "overwrite" sources = ["fig"] [[commands.task]] id = "lint" label = "Lint" fields = ["targets", "quiet", "format", "max_warnings"] required = ["targets"] [[commands.task]] id = "fix" label = "Lint and fix" set = { fix = [true] } fields = ["targets", "fix", "quiet"] required = ["targets"] [[commands.group]] id = "basic" label = "Basic" fields = ["targets", "fix", "fix_dry_run", "quiet"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["max_warnings", "format", "config", "ext", "cache", "output_file"]