eslint-plugin-mavenlint

raw JSON →
0.4.1 verified Fri May 01 auth: no javascript

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.

error Error: Failed to load plugin 'mavenlint' declared in '.eslintrc.js': Cannot find module 'eslint-plugin-mavenlint'
cause Plugin not installed or not in node_modules.
fix
Run 'npm install eslint-plugin-mavenlint --save-dev'
error 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'.
cause Invalid severity level.
fix
Use 'error', 'warn', or 'off' (or 2, 1, 0).
error Definition for rule 'rule-name' was not found.
cause Rule name spelled incorrectly or missing prefix.
fix
Use 'mavenlint/rule-name' instead of 'rule-name'.
gotcha Plugin must be listed in plugins array, not just rules.
fix Add 'plugins: ["mavenlint"]' to your ESLint config.
gotcha Rules are prefixed with 'mavenlint/'.
fix Use rule names like 'mavenlint/rule-name'.
deprecated Deprecated: using 'mavenlint' without prefix may be removed.
fix Use full rule name with 'mavenlint/' prefix.
npm install eslint-plugin-mavenlint
yarn add eslint-plugin-mavenlint
pnpm add eslint-plugin-mavenlint

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

// .eslintrc.js
module.exports = {
  plugins: ['mavenlint'],
  rules: {
    'mavenlint/rule-name': 'error'
  }
};