Registry / testing / eslint-plugin-mavenlint

eslint-plugin-mavenlint

JSON →
library0.4.1jsnpmunverified

Custom ESLint rules for the Mavenlink codebase. This ESLint plugin provides a set of custom lint rules tailored for Mavenlink's specific coding conventions and best practices. Version 0.4.1 is the latest stable release. The plugin is maintained as part of the Mavenlink organization on GitHub. Unlike generic ESLint plugins, these rules enforce Mavenlink-specific patterns and avoid common pitfalls in their projects. The package requires eslint >=4.14.0 as a peer dependency.

npm install eslint-plugin-mavenlint
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-MAVE
E
eslint-plugin-mavenlint
testingjavascriptv0.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

default (plugin object)
module.exports = { plugins: ['mavenlint'], rules: { 'mavenlint/rule-name': 'error' } };
require('eslint-plugin-mavenlint')
This is an ESLint plugin. It is not imported directly in code but configured in .eslintrc or eslint config file.
configs
import { configs } from 'eslint-plugin-mavenlint';
const configs = require('eslint-plugin-mavenlint/configs');
If using TypeScript or ESM, import configs like this. If using CommonJS, use the plugin object directly.
rules
import { rules } from 'eslint-plugin-mavenlint';
const rules = require('eslint-plugin-mavenlint').rules;
Access individual rule definitions for custom configuration.

Shows how to configure the plugin in an ESLint configuration file.

// .eslintrc.js module.exports = { plugins: ['mavenlint'], rules: { 'mavenlint/rule-name': 'error' } };
Debug
Known issues
gotchaPlugin must be listed in plugins array, not just rules.
fix
Add 'plugins: ["mavenlint"]' to your ESLint config.
affects: >=0.0.0
gotchaRules are prefixed with 'mavenlint/'.
fix
Use rule names like 'mavenlint/rule-name'.
affects: >=0.0.0
deprecatedDeprecated: using 'mavenlint' without prefix may be removed.
fix
Use full rule name with 'mavenlint/' prefix.
affects: >=0.4.0
Errors
Common errors & fixes
Error: Failed to load plugin 'mavenlint' declared in '.eslintrc.js': Cannot find module 'eslint-plugin-mavenlint'
Plugin not installed or not in node_modules.
fix
Run 'npm install eslint-plugin-mavenlint --save-dev'
ESLint configuration error: The rules configuration 'mavenlint/rule-name' has a severity of 'warn' which is not allowed. Allowed values: 0, 1, 2, 'off', 'warn', 'error'.
Invalid severity level.
fix
Use 'error', 'warn', or 'off' (or 2, 1, 0).
Definition for rule 'rule-name' was not found.
Rule name spelled incorrectly or missing prefix.
fix
Use 'mavenlint/rule-name' instead of 'rule-name'.
Upgrade
Version history
0.4.1latest on npm
Audit
Dependencies
eslintrequiredpeer dependency required for plugin to function
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-mavenlint — npm install eslint-plugin-mavenlint · libregistry