{"id":19754,"library":"eslint-plugin-filenames-simple","title":"ESLint Plugin Filenames Simple","description":"An ESLint plugin for enforcing filename conventions with straightforward configuration. Current stable version 0.9.0 (last updated 2024). Supports ESLint 7.x and 8.x, Node.js >=14.17.0. Provides six rules: extension, named-export, naming-convention, no-index, pluralize, and typescript-module-declaration. Offers pre-configured recommended presets for plain JavaScript/TypeScript, React, and Vue projects. Inspired by eslint-plugin-filenames but with a simpler configuration model and additional rules like named-export and typescript-module-declaration. Does not support ESLint 9.x or flat config yet.","status":"active","version":"0.9.0","language":"javascript","source_language":"en","source_url":"git@github.com:epaew/eslint-plugin-filenames-simple","tags":["javascript","eslint","eslintPlugin","eslint-plugin","file","filename","simple"],"install":[{"cmd":"npm install eslint-plugin-filenames-simple","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-filenames-simple","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-filenames-simple","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: requires ESLint 7.x or 8.x","package":"eslint","optional":false}],"imports":[{"note":"ESLint plugins are loaded declaratively in config, not imported programmatically.","wrong":"const plugin = require('eslint-plugin-filenames-simple')","symbol":"plugin","correct":"// In .eslintrc: { \"plugins\": [\"filenames-simple\"] }"},{"note":"Use the 'plugin:' prefix to reference the plugin's configurations.","wrong":"{ \"extends\": [\"eslint-plugin-filenames-simple/recommended\"] }","symbol":"recommended config","correct":"// In .eslintrc: { \"extends\": [\"plugin:filenames-simple/recommended\"] }"},{"note":"All rules must be prefixed with 'filenames-simple/'","wrong":"{ \"rules\": { \"naming-convention\": \"error\" } }","symbol":"rules","correct":"// In .eslintrc: { \"rules\": { \"filenames-simple/naming-convention\": \"error\" } }"}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"extends\": [\"plugin:filenames-simple/recommended\"],\n  \"rules\": {\n    \"filenames-simple/naming-convention\": [\"error\", { \"rule\": \"kebab-case\" }],\n    \"filenames-simple/extension\": [\"error\", { \"extensions\": [\".js\", \".ts\"] }]\n  }\n}\n\n// Install: npm i -D eslint eslint-plugin-filenames-simple\n// Run: npx eslint --ext .js,.ts .","lang":"javascript","description":"Shows how to configure the plugin with recommended preset and custom rules for kebab-case and specific extensions."},"warnings":[{"fix":"Use ESLint 7.x or 8.x until the plugin is updated.","message":"Plugin does not support ESLint 9.x or flat config yet. Using with ESLint 9.x will fail.","severity":"gotcha","affected_versions":">=0.9.0"},{"fix":"Always explicitly set the 'rule' option to avoid unexpected defaults.","message":"The 'naming-convention' rule requires a 'rule' option (e.g., 'kebab-case', 'camelCase'). Omitting it defaults to 'camelCase' which may not be intended.","severity":"gotcha","affected_versions":"*"},{"fix":"If you need index files, set the rule to 'off' or configure exceptions.","message":"The 'no-index' rule forbids 'index.js' or 'index.ts' files by default. This may conflict with module resolution patterns in Node.js.","severity":"gotcha","affected_versions":"*"},{"fix":"Ensure each file exports only one named symbol, or disable the rule.","message":"The 'named-export' rule requires that a file have exactly one named export matching a convention. Multiple named exports will cause an error.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install -D eslint-plugin-filenames-simple' and ensure .eslintrc uses 'plugins: [\"filenames-simple\"]'.","cause":"Plugin not installed or ESLint config not recognizing it.","error":"ESLint couldn't find the plugin \"eslint-plugin-filenames-simple\"."},{"fix":"Add a 'rule' property: [\"error\", { \"rule\": \"kebab-case\" }].","cause":"Missing 'rule' option in the rule configuration.","error":"Configuration for rule \"filenames-simple/naming-convention\" is invalid: Value [\"error\",{}] is invalid. Option 'rule' is required."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}