eslint-plugin-dependabot
v0.6.0
Published
Eslint Plugin to enforce Dependabot best practices
Downloads
1,276
Maintainers
Readme
Usage
Installation
npm install eslint-plugin-dependabot eslint-yaml --save-devConfiguration
This plugin requires the eslint-yaml package to parse YAML files.
Add the plugin and language configuration to your eslint.config.mjs:
// eslint.config.mjs
import dependabot from "eslint-plugin-dependabot";
import { yaml } from "eslint-yaml";
import { defineConfig } from "eslint/config";
export default defineConfig([
{
name: "dependabot config",
files: ["**/.github/dependabot.{yml,yaml}"],
language: "yaml/yaml",
plugins: {
dependabot,
yaml,
},
extends: [dependabot.configs.recommended],
},
]);VSCode Setup
By default, the VSCode ESLint extension does not validate YAML files. To enable ESLint validation for YAML files in VSCode, add the following to your VSCode settings:
- For workspace settings:
.vscode/settings.jsonin your project - For user settings: Command Palette > Preferences: Open Settings (JSON)
{
"eslint.validate": ["yaml"]
}This tells the VSCode ESLint extension to also run on YAML files, allowing you to see Dependabot linting errors and warnings directly in your editor.
Rules
💼 Configurations enabled in.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.
| Name | Description | 💼 | 🔧 | | :------------------------------------------------------------------- | :-------------------------------------------------------------------------------- | :-- | :-- | | require-config-version | Require Dependabot configuration files to have a version property | ✅ | 🔧 | | require-cooldown | Require each package-ecosystem to have a cooldown configuration with default-days | ✅ | 🔧 | | require-package-ecosystem | Require package-ecosystem configurations based on files in the repository | ✅ | 🔧 |
Development
See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md.
Thanks! 💖
Contributors
💝 This package was templated with
create-typescript-appusing the Bingo framework.
