{"record":{"id":"866bbb06cc40438e","repo":"denoland/deno","slug":"no-rules-have-been-configured","errorCode":null,"errorMessage":"No rules have been configured","messagePattern":"No rules have been configured","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/lint/mod.rs","lineNumber":348,"sourceCode":"      if is_err {\n        eprint!(\"{}\", msg);\n      } else {\n        print!(\"{}\", msg);\n      }\n    }\n\n    let mut plugin_runner = None;\n    if !plugin_specifiers.is_empty() {\n      let logger = plugins::PluginLogger::new(logger_printer);\n      let runner = plugins::create_runner_and_load_plugins(\n        plugin_specifiers,\n        logger,\n        exclude,\n      )\n      .await?;\n      plugin_runner = Some(Arc::new(runner));\n    } else if lint_rules.rules.is_empty() {\n      bail!(\"No rules have been configured\")\n    }\n\n    let linter = Arc::new(CliLinter::new(CliLinterOptions {\n      configured_rules: lint_rules,\n      fix: lint_options.fix,\n      deno_lint_config: resolve_lint_config(\n        &self.compiler_options_resolver,\n        member_dir.dir_url(),\n      )?,\n      maybe_plugin_runner: plugin_runner,\n    }));\n\n    let has_error = self.has_error.clone();\n    let reporter_lock = self.reporter_lock.clone();\n\n    let mut futures = Vec::with_capacity(2);\n    if linter.has_package_rules()\n      && let Some(fut) = self.run_package_rules(&linter, &member_dir, &paths)","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/tools/lint/mod.rs#L330-L366","documentation":"`deno lint` resolves the configured rule set from deno.json's lint section. If no plugins are registered AND the resolved built-in rule list comes back empty — a lint config that disables/excludes every rule — there is literally nothing to lint with, so the command bails instead of silently passing.","triggerScenarios":"lint_options.plugins is empty and resolve_lint_rules(lint_options.rules, ...) returns an empty rules vec: e.g. a deno.json that excludes the whole recommended set (\"rules\": { \"exclude\": [...] } covering all defaults) or otherwise selects zero rules, combined with no plugin entries.","commonSituations":"Copy-pasted lint configs from older Deno versions whose exclude lists grew to cover everything; configs that define \"rules\": {} in a nested workspace member where no defaults apply; disabling all rules while intending to use only a plugin, but forgetting to declare the plugin.","solutions":["Add rules back in deno.json: \"lint\": { \"rules\": { \"recommended\": true } }","Trim the exclude list so it no longer covers every rule","If you intended plugin-only linting, register the plugin: \"lint\": { \"plugins\": [\"./my-plugin.ts\"] } (plugins suppress this check)"],"exampleFix":"// before — deno.json (everything excluded, no plugins)\n{ \"lint\": { \"rules\": { \"recommended\": false, \"include\": [] } } }\n\n// after\n{ \"lint\": { \"rules\": { \"recommended\": true } } }\n\n// or plugin-only linting:\n{ \"lint\": { \"plugins\": [\"./lint-plugin.ts\"] } }","handlingStrategy":"validation","validationCode":"// validate the lint config before running lint (Node/js):\nimport json from './deno.json' with { type: 'json' };\nconst lint = json.lint ?? {};\nconst rules = lint.rules ?? {};\nconst hasPlugins = (lint.plugins ?? []).length > 0;\nconst selectsRules =\n  rules.recommended !== false || (rules.include ?? []).length > 0;\nif (!hasPlugins && !selectsRules) {\n  throw new Error('lint config selects no rules and no plugins');\n}","typeGuard":null,"tryCatchPattern":"Catch lint startup failure; if the message is 'No rules have been configured', rewrite deno.json to add \"lint\": { \"rules\": { \"recommended\": true } } (or register the intended plugin) and retry.","preventionTips":["Keep \"recommended\": true (the default) unless you consciously replace it","Audit exclude lists after Deno upgrades — rule sets grow and excludes can over-match","Plugin-only setups must declare plugins in deno.json's lint section"],"tags":["lint","rules","config","deno-json"],"backgroundTag":"no-lint-rules-configured","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}