eslint-config-gulp
raw JSON → 6.0.0 verified Sat Apr 25 auth: no javascript
Sharable ESLint configuration for Gulp projects. Current stable version 6.0.0 (released to support ESLint flat config). Previously v5.x used traditional .eslintrc format. Breaking changes at v6: complete rewrite for flat config, dropping Node <20. Differentiators: specifically tailored for Gulp-style codebases, used by the Gulp team. Release cadence: major versions align with ESLint or Node EOL.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/eslint-config-gulp/index.js from /path/to/eslint.config.js not supported. ↓
cause v6+ is ESM-only; require() cannot load it.
fix
Use import syntax: import gulpConfig from 'eslint-config-gulp' or convert your config to ESM.
error Failed to load config 'gulp' to extend from. ↓
cause Using string extension reference 'gulp' in .eslintrc with v6+ which only supports flat config.
fix
Upgrade to flat config: create eslint.config.js and import the config directly.
error TypeError: config is not iterable ↓
cause Spreading the default export (which is iterable) incorrectly or using it directly as a single config.
fix
In flat config, spread the imported array: export default [...gulpConfig];
Warnings
breaking v6.0.0 rewrites the entire config to use ESLint flat config; no longer compatible with .eslintrc formats. ↓
fix Migrate to flat config: replace .eslintrc.* with eslint.config.js using import gulpConfig from 'eslint-config-gulp'.
breaking v6.0.0 drops support for Node.js <20. ↓
fix Update Node.js to version 20 or higher.
breaking v5.0.0 increased minimum Node.js version to 10. ↓
fix Use Node.js 10+ or stick with v4.x.
breaking v4.0.0 removed formatting rules in favor of Prettier. ↓
fix Use Prettier for formatting; do not rely on this config for style rules.
gotcha The default export is an array of config objects (flat config). Spreading into an array is required. ↓
fix Use `export default [...gulpConfig];` not `export default gulpConfig;` which would be invalid.
Install
npm install eslint-config-gulp yarn add eslint-config-gulp pnpm add eslint-config-gulp Imports
- default export wrong
const gulpConfig = require('eslint-config-gulp')correctimport gulpConfig from 'eslint-config-gulp' - default export (as array) wrong
module.exports = gulpConfigcorrectexport default [...gulpConfig] - default export (legacy) wrong
import config from 'eslint-config-gulp'correctconst config = require('eslint-config-gulp')
Quickstart
// eslint.config.js
import gulpConfig from 'eslint-config-gulp';
export default [
...gulpConfig,
{
files: ['**/*.js'],
rules: {
'semi': ['error', 'always'],
},
},
];