eslint-plugin-sitegenesis

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

ESLint plugin with custom rules for Salesforce Commerce Cloud (Demandware) SiteGenesis projects. Current stable version is 1.0.0. This plugin enforces coding standards specific to SiteGenesis cartridge structure and ISML templates. It is a niche tool for Salesforce Commerce Cloud developers, with limited release cadence. Key differentiator: provides linting for SiteGenesis-specific patterns not covered by general ESLint rules.

error ESLint couldn't find the plugin "eslint-plugin-sitegenesis".
cause Plugin not installed or not in node_modules.
fix
Run 'npm install eslint-plugin-sitegenesis --save-dev'
error Definition for rule 'sitegenesis/rule-name' was not found.
cause Rule name misspelled or not existing in the plugin.
fix
Verify rule names from plugin's source; use correct prefix.
error Cannot find module 'eslint-plugin-sitegenesis'
cause Plugin not installed or module resolution fails.
fix
Ensure plugin is in package.json devDependencies and node_modules exists.
gotcha Plugin requires eslint >=3.0.0. Older versions may not load the plugin correctly.
fix Update eslint to version 3.0.0 or later.
gotcha Rules are prefixed with 'sitegenesis/' in configuration. Omitting the prefix will cause rule not found errors.
fix Use 'sitegenesis/rule-name' in rules configuration.
gotcha No README data available. Users may need to inspect source code or the plugin's GitHub repository for rule documentation.
fix Check the package source or open an issue requesting documentation.
npm install eslint-plugin-sitegenesis
yarn add eslint-plugin-sitegenesis
pnpm add eslint-plugin-sitegenesis

Shows how to configure ESLint to use the plugin with the recommended config and custom rules.

// .eslintrc.json
{
  "plugins": ["sitegenesis"],
  "extends": ["plugin:sitegenesis/recommended"],
  "rules": {
    "sitegenesis/no-direct-dw-usage": "error",
    "sitegenesis/require-cartridge-path": "warn"
  }
}