Skip to content

Conversation

@aladdin-add
Copy link

@aladdin-add aladdin-add commented Jan 10, 2026

This pull request updates documentation and configuration for the eslint-plugin-n project to introduce and clarify the new all configuration, improve documentation on configuration usage, and update rule tables and examples for consistency and clarity.

Documentation and Config Updates:

  • Added a new all configuration to the documentation and updated the rules table to indicate which rules are enabled by it. [1] [2] [3] [4] [5] [6] [7]
  • Updated configuration usage examples in README.md to use modern eslint.config.js with defineConfig and ES module syntax, and removed legacy .eslintrc.json examples.
  • Clarified usage of the mixed CommonJS/ESM configuration and renamed it from flat/mixed-esm-and-cjs to mixed-esm-and-cjs throughout the documentation and config files. [1] [2]
  • Cleaned up the emoji legend and config emoji mapping in .eslint-doc-generatorrc.js to remove unused or outdated entries.

These changes help users understand the available configurations, encourage use of modern ESLint config formats, and keep documentation accurate and up to date.

All configs are updated to modern; however, "flat/*" is still retained (for maximum compatibility).
@aladdin-add aladdin-add marked this pull request as ready for review January 11, 2026 04:32
Copilot AI review requested due to automatic review settings January 11, 2026 04:32
@aladdin-add aladdin-add changed the title feat: remove deprecated ESLint config(eslintrc) feat!: remove deprecated ESLint config(eslintrc) Jan 11, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the deprecated ESLint eslintrc configuration format, modernizing all configs to use the flat config format exclusively. The "flat/*" prefixed configs are retained for backward compatibility but marked as deprecated.

Changes:

  • Removed eslintrc exports from all configuration files (recommended.js, recommended-script.js, recommended-module.js)
  • Updated primary config exports (recommended-module, recommended-script, recommended, all) to use flat config format
  • Added new "mixed-esm-and-cjs" config for handling mixed module types
  • Removed eslintrc test file and updated documentation generator configuration
  • Updated rule documentation to reflect that all rules are now included in the "all" config

Reviewed changes

Copilot reviewed 47 out of 47 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/lib/configs/eslintrc.js Removed entire test file for deprecated eslintrc configs
lib/index.js Updated config exports to use flat format for primary config names; deprecated "flat/*" prefixed configs retained for backward compatibility
lib/configs/recommended.js Removed eslintrc export, keeping only flat config export
lib/configs/recommended-script.js Removed eslintrc export and self-references; flat config now self-contained with explicit globals
lib/configs/recommended-module.js Removed eslintrc export and self-references; flat config now self-contained with explicit globals
lib/configs/all.js Updated type annotation from Linter.FlatConfig to Linter.Config
docs/rules/*.md Updated 37 rule documentation files to show rules are enabled in "all" config
README.md Added "all" config to the configs legend and updated rules table to show "all" config inclusion
.eslint-doc-generatorrc.js Added "mixed-esm-and-cjs" to ignored configs; removed emoji mappings for deprecated configs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 34 to +45
const configs = {
"recommended-module": { plugins: ["n"], ...esmConfig.eslintrc },
"recommended-script": { plugins: ["n"], ...cjsConfig.eslintrc },
recommended: { plugins: ["n"], ...recommendedConfig.eslintrc },
"recommended-module": { plugins: { n: base }, ...esmConfig.flat },
"recommended-script": { plugins: { n: base }, ...cjsConfig.flat },
recommended: { plugins: { n: base }, ...recommendedConfig.flat },
"mixed-esm-and-cjs": [
{ files: ["**/*.js"], plugins: { n: base }, ...recommendedConfig.flat },
{ files: ["**/*.mjs"], plugins: { n: base }, ...esmConfig.flat },
{ files: ["**/*.cjs"], plugins: { n: base }, ...cjsConfig.flat },
],
all: { plugins: { n: base }, ...allRulesConfig.flat },
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newly introduced non-prefixed configs (recommended-module, recommended-script, recommended, mixed-esm-and-cjs, all) lack test coverage. While the deprecated "flat/*" prefixed configs have tests in tests/lib/configs/flat.js, there are no tests verifying that the new primary config names work correctly. Consider adding test coverage for these configs.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Copy link

Copilot AI commented Jan 11, 2026

@aladdin-add I've opened a new pull request, #505, to work on those changes. Once the pull request is ready, I'll request review from you.

@aladdin-add aladdin-add marked this pull request as draft January 12, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants