eslint-plugin-n8n-local-rules

raw JSON →
1.0.0 verified Sat Apr 25 auth: no javascript

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.

error ESLint couldn't find the plugin 'eslint-plugin-n8n-local-rules'.
cause Plugin not installed or not in node_modules.
fix
Run 'npm install eslint-plugin-n8n-local-rules --save-dev'.
error Cannot find module 'eslint-plugin-n8n-local-rules'
cause CommonJS require fails when package is not installed.
fix
Ensure package is installed: npm list eslint-plugin-n8n-local-rules
error Definition for rule 'n8n-local-rules/rule-name' was not found
cause Rule file missing in 'local-rules' directory or name mismatch.
fix
Create a file named 'rule-name.js' in the 'local-rules' directory exporting a rule object.
gotcha Rules are loaded from a 'local-rules' directory; must exist and contain rule files.
fix Create a 'local-rules' directory in your project root with JavaScript rule files.
gotcha Plugin only works with ESLint's legacy config format (.eslintrc.*); flat config not supported.
fix Use .eslintrc.js or .eslintrc.json instead of eslint.config.js.
gotcha Rule names must be kebab-case; plugin fails silently if naming convention is off.
fix Name rule files like 'no-hardcoded-credentials.js' and use that name in config.
npm install eslint-plugin-n8n-local-rules
yarn add eslint-plugin-n8n-local-rules
pnpm add eslint-plugin-n8n-local-rules

Shows how to enable the plugin and set local rules in an ESLint config file.

// .eslintrc.js
module.exports = {
  plugins: ['n8n-local-rules'],
  rules: {
    'n8n-local-rules/no-hardcoded-credentials': 'error',
    'n8n-local-rules/require-translation': 'warn'
  }
};