Registry / testing / eslint-plugin-filenames-simple

eslint-plugin-filenames-simple

JSON →
library0.9.0jsnpmunverified

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.

npm install eslint-plugin-filenames-simple
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-FILE
E
eslint-plugin-filenames-simple
testingjavascriptv0.9.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
// In .eslintrc: { "plugins": ["filenames-simple"] }
const plugin = require('eslint-plugin-filenames-simple')
ESLint plugins are loaded declaratively in config, not imported programmatically.
recommended config
// In .eslintrc: { "extends": ["plugin:filenames-simple/recommended"] }
{ "extends": ["eslint-plugin-filenames-simple/recommended"] }
Use the 'plugin:' prefix to reference the plugin's configurations.
rules
// In .eslintrc: { "rules": { "filenames-simple/naming-convention": "error" } }
{ "rules": { "naming-convention": "error" } }
All rules must be prefixed with 'filenames-simple/'

Shows how to configure the plugin with recommended preset and custom rules for kebab-case and specific extensions.

// .eslintrc.json { "extends": ["plugin:filenames-simple/recommended"], "rules": { "filenames-simple/naming-convention": ["error", { "rule": "kebab-case" }], "filenames-simple/extension": ["error", { "extensions": [".js", ".ts"] }] } } // Install: npm i -D eslint eslint-plugin-filenames-simple // Run: npx eslint --ext .js,.ts .
Debug
Known issues
gotchaPlugin does not support ESLint 9.x or flat config yet. Using with ESLint 9.x will fail.
fix
Use ESLint 7.x or 8.x until the plugin is updated.
affects: >=0.9.0
gotchaThe 'naming-convention' rule requires a 'rule' option (e.g., 'kebab-case', 'camelCase'). Omitting it defaults to 'camelCase' which may not be intended.
fix
Always explicitly set the 'rule' option to avoid unexpected defaults.
affects: *
gotchaThe 'no-index' rule forbids 'index.js' or 'index.ts' files by default. This may conflict with module resolution patterns in Node.js.
fix
If you need index files, set the rule to 'off' or configure exceptions.
affects: *
gotchaThe 'named-export' rule requires that a file have exactly one named export matching a convention. Multiple named exports will cause an error.
fix
Ensure each file exports only one named symbol, or disable the rule.
affects: *
Errors
Common errors & fixes
ESLint couldn't find the plugin "eslint-plugin-filenames-simple".
Plugin not installed or ESLint config not recognizing it.
fix
Run 'npm install -D eslint-plugin-filenames-simple' and ensure .eslintrc uses 'plugins: ["filenames-simple"]'.
Configuration for rule "filenames-simple/naming-convention" is invalid: Value ["error",{}] is invalid. Option 'rule' is required.
Missing 'rule' option in the rule configuration.
fix
Add a 'rule' property: ["error", { "rule": "kebab-case" }].
Upgrade
Version history
0.9.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency: requires ESLint 7.x or 8.x
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-filenames-simple — npm install eslint-plugin-filenames-simple · libregistry