Skip to main content

no-deprecated-node-runtime

Rule catalog ID: R044

Targeted pattern scopeโ€‹

GitHub Action metadata runs.using for JavaScript actions.

What this rule reportsโ€‹

Reports deprecated Node.js runtimes such as node12 and node16.

Why this rule existsโ€‹

Deprecated runtimes age out of security support and eventually break action execution.

โŒ Incorrectโ€‹

runs:
using: node16
main: dist/index.js

โœ… Correctโ€‹

runs:
using: node20
main: dist/index.js

Additional examplesโ€‹

For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.

ESLint flat config exampleโ€‹

import githubActions from "eslint-plugin-github-actions-2";

export default [
{
files: ["**/*.{yml,yaml}"],
plugins: {
"github-actions": githubActions,
},
rules: {
"github-actions/no-deprecated-node-runtime": "error",
},
},
];

When not to use itโ€‹

You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.

Further readingโ€‹