eslint-plugin-factorial

raw JSON →
2.0.30 verified Sat Apr 25 auth: no javascript

eslint-plugin-factorial is a collection of custom ESLint rules for JavaScript and TypeScript projects. Version 2.0.30 is the latest stable release. It enforces code quality and consistency, particularly in Factorial projects. Differentiators include opinionated rules tailored to specific coding standards. Installation requires ESLint as a peer dependency. The plugin follows standard ESLint plugin conventions for configuration.

error Error: Failed to load plugin 'factorial' declared in '.eslintrc': Cannot find module 'eslint-plugin-factorial'
cause eslint-plugin-factorial is not installed or missing from node_modules.
fix
Run 'npm install eslint-plugin-factorial --save-dev'.
error Error: Failed to load config 'factorial/recommended' to extend from.
cause Incorrect extends format; using 'factorial/recommended' without 'plugin:' prefix.
fix
Use extends: ['plugin:factorial/recommended'].
error Definition for rule 'factorial/rule-name' was not found.
cause The rule name is misspelled or does not exist in the plugin.
fix
Check available rules in documentation or node_modules/eslint-plugin-factorial/lib/rules/.
gotcha All rule names must be prefixed with 'factorial/'
fix In .eslintrc rules, use 'factorial/rule-name'.
gotcha Plugin configs are only accessible via 'plugin:factorial/...' shorthand
fix Use extends: ['plugin:factorial/recommended'] (or other config name) instead of the full package name.
deprecated Possible use of 'eslint-plugin-factorial' as a prefix is unsupported
fix Do not include 'eslint-plugin-' prefix in plugin or extends config.
gotcha Rule options documentation may be outdated; check source for each rule
fix Refer to the actual rule implementation in node_modules/eslint-plugin-factorial/lib/rules/.
npm install eslint-plugin-factorial
yarn add eslint-plugin-factorial
pnpm add eslint-plugin-factorial

Basic setup for eslint-plugin-factorial: install with npm, configure plugin and rules in ESLint config.

// Install dependencies
// npm install eslint eslint-plugin-factorial --save-dev

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