ESLint plugin for defining and using local custom rules within the n8n project. Version 1.0.0, stable. Based on Clayton Watts's eslint-plugin-local-rules, it allows n8n contributors to write project-specific lint rules without publishing separate packages. Key differentiator: designed specifically for n8n's internal code standards, but can serve as a template for any project needing local ESLint rules.
npm install eslint-plugin-n8n-local-rulesVerified import paths — ran on the pinned version, not inferred.
Shows how to enable the plugin and set local rules in an ESLint config file.
Create a 'local-rules' directory in your project root with JavaScript rule files.
Use .eslintrc.js or .eslintrc.json instead of eslint.config.js.
Name rule files like 'no-hardcoded-credentials.js' and use that name in config.
Run 'npm install eslint-plugin-n8n-local-rules --save-dev'.
Ensure package is installed: npm list eslint-plugin-n8n-local-rules
Create a file named 'rule-name.js' in the 'local-rules' directory exporting a rule object.