{"id":19840,"library":"eslint-plugin-n8n-local-rules","title":"eslint-plugin-n8n-local-rules","description":"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.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/ivov/eslint-plugin-n8n-local-rules","tags":["javascript","eslint","eslintplugin"],"install":[{"cmd":"npm install eslint-plugin-n8n-local-rules","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-n8n-local-rules","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-n8n-local-rules","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; plugin injects rules into ESLint's runtime","package":"eslint","optional":false}],"imports":[{"note":"Package is CommonJS-only; cannot use ESM import syntax.","wrong":"import localRules from 'eslint-plugin-n8n-local-rules';","symbol":"default","correct":"const localRules = require('eslint-plugin-n8n-local-rules');"},{"note":"Export is CJS module.exports, not ESM named export.","wrong":"import { rules } from 'eslint-plugin-n8n-local-rules';","symbol":"rules","correct":"const { rules } = require('eslint-plugin-n8n-local-rules');"},{"note":"Configuration presets provided; requires CJS destructuring.","wrong":"import { configs } from 'eslint-plugin-n8n-local-rules';","symbol":"configs","correct":"const { configs } = require('eslint-plugin-n8n-local-rules');"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  plugins: ['n8n-local-rules'],\n  rules: {\n    'n8n-local-rules/no-hardcoded-credentials': 'error',\n    'n8n-local-rules/require-translation': 'warn'\n  }\n};","lang":"javascript","description":"Shows how to enable the plugin and set local rules in an ESLint config file."},"warnings":[{"fix":"Create a 'local-rules' directory in your project root with JavaScript rule files.","message":"Rules are loaded from a 'local-rules' directory; must exist and contain rule files.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use .eslintrc.js or .eslintrc.json instead of eslint.config.js.","message":"Plugin only works with ESLint's legacy config format (.eslintrc.*); flat config not supported.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Name rule files like 'no-hardcoded-credentials.js' and use that name in config.","message":"Rule names must be kebab-case; plugin fails silently if naming convention is off.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install eslint-plugin-n8n-local-rules --save-dev'.","cause":"Plugin not installed or not in node_modules.","error":"ESLint couldn't find the plugin 'eslint-plugin-n8n-local-rules'."},{"fix":"Ensure package is installed: npm list eslint-plugin-n8n-local-rules","cause":"CommonJS require fails when package is not installed.","error":"Cannot find module 'eslint-plugin-n8n-local-rules'"},{"fix":"Create a file named 'rule-name.js' in the 'local-rules' directory exporting a rule object.","cause":"Rule file missing in 'local-rules' directory or name mismatch.","error":"Definition for rule 'n8n-local-rules/rule-name' was not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}