eslint-plugin-summer
raw JSON → 2.0.1 verified Fri May 01 auth: no javascript
An ESLint plugin that enforces coding style rules themed around 'summer', including restrictions on null/undefined comparisons, let usage, and plain new Date() calls. Version 2.0.1 requires ESLint ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0. It provides a recommended config and a set of opinionated rules. The plugin is lightweight and focuses on specific style preferences rather than general linting.
Common errors
error ESLint: Failed to load plugin 'summer': Cannot find module 'eslint-plugin-summer' ↓
cause Plugin not installed or not in node_modules.
fix
Run 'npm install --save-dev eslint-plugin-summer'.
error ESLint: Rule 'summer/no-let' not found ↓
cause Incorrect rule name or plugin not registered.
fix
Ensure plugin is listed in 'plugins' array and rule name is correct.
error Configuration for rule 'summer/no-eqeqeq-null-undefined' is invalid ↓
cause Invalid rule options or severity level.
fix
Set severity to 'off', 'warn', or 'error' without extra options.
Warnings
gotcha Plugin expects ESLint version 4, 5, 6, or 7. Does not work with ESLint 8 or later. ↓
fix Use ESLint 7.x or earlier, or check for newer versions of the plugin.
gotcha The rule 'no-eqeqeq-null-undefined' does not cover all null/undefined comparisons; only strict equality with null or undefined is flagged. ↓
fix Review the rule documentation for exact patterns.
gotcha The plugin's recommended config may conflict with other style rules from other plugins. ↓
fix Test well when combining with other configs.
Install
npm install eslint-plugin-summer yarn add eslint-plugin-summer pnpm add eslint-plugin-summer Imports
- Plugin wrong
// using 'eslint-plugin-summer' in pluginscorrect// .eslintrc: plugins: ['summer'] - Rules wrong
// rules: { 'no-let': 'error' }correct// .eslintrc: rules: { 'summer/no-let': 'error' } - Recommended config wrong
extends: ['summer/recommended']correctextends: ['plugin:summer/recommended']
Quickstart
// .eslintrc file
{
"plugins": ["summer"],
"rules": {
"summer/no-eqeqeq-null-undefined": "error",
"summer/no-let": "error",
"summer/no-plain-new-date": "error"
}
}