Skip to content

Commit

Permalink
Merge branch 'main' into RFC-84
Browse files Browse the repository at this point in the history
* main: (932 commits)
  8.55.0
  Build: changelog update for 8.55.0
  chore: upgrade @eslint/js@8.55.0 (eslint#17811)
  chore: package.json update for @eslint/js release
  chore: upgrade @eslint/eslintrc@2.1.4 (eslint#17799)
  feat: importNamePattern option in no-restricted-imports (eslint#17721)
  docs: fix typo `--rules` -> `--rule` (eslint#17806)
  ci: pin Node.js 21.2.0 (eslint#17809)
  chore: fix several `cli` tests to run in the intended flat config mode (eslint#17797)
  docs: remove "Open in Playground" buttons for removed rules (eslint#17791)
  docs: fix correct/incorrect examples of rules (eslint#17789)
  docs: update and fix examples for `no-unused-vars` (eslint#17788)
  docs: add specific stylistic rule for each deprecated rule (eslint#17778)
  chore: remove unused config-extends fixtures (eslint#17781)
  chore: remove formatting/stylistic rules from new rule templates (eslint#17780)
  chore: check rule examples for syntax errors (eslint#17718)
  8.54.0
  Build: changelog update for 8.54.0
  chore: upgrade @eslint/js@8.54.0 (eslint#17773)
  chore: package.json update for @eslint/js release
  ...
  • Loading branch information
bmish committed Dec 3, 2023
2 parents 4c42f65 + e0cb960 commit cd386aa
Show file tree
Hide file tree
Showing 1,368 changed files with 106,098 additions and 27,454 deletions.
File renamed without changes.
4 changes: 3 additions & 1 deletion .eslintignore
@@ -1,6 +1,8 @@
/build/**
/coverage/**
/docs/**
/docs/*
!/docs/*.js
!/docs/tools/
/jsdoc/**
/templates/**
/tests/bench/**
Expand Down
97 changes: 51 additions & 46 deletions .eslintrc.js
@@ -1,10 +1,25 @@
/*
* IMPORTANT!
*
* Any changes made to this file must also be made to eslint.config.js.
*
* Internally, ESLint is using the eslint.config.js file to lint itself.
* This file is needed too, because:
*
* 1. ESLint VS Code extension expects eslintrc config files to be
* present to work correctly.
*
* Once we no longer need to support both eslintrc and flat config, we will
* remove this file.
*/


"use strict";

const path = require("path");

const INTERNAL_FILES = {
CLI_ENGINE_PATTERN: "lib/cli-engine/**/*",
INIT_PATTERN: "lib/init/**/*",
LINTER_PATTERN: "lib/linter/**/*",
RULE_TESTER_PATTERN: "lib/rule-tester/**/*",
RULES_PATTERN: "lib/rules/**/*",
Expand Down Expand Up @@ -47,46 +62,51 @@ module.exports = {
"internal-rules"
],
extends: [
"eslint",
"plugin:eslint-plugin/recommended"
"eslint/eslintrc"
],
parserOptions: {
ecmaVersion: 2021
},

/*
* it fixes eslint-plugin-jsdoc's reports: "Invalid JSDoc tag name "template" jsdoc/check-tag-names"
* refs: https://github.com/gajus/eslint-plugin-jsdoc#check-tag-names
*/
settings: {
jsdoc: {
mode: "typescript"
}
},
rules: {
"eslint-plugin/prefer-message-ids": "error",
"eslint-plugin/prefer-output-null": "error",
"eslint-plugin/prefer-placeholders": "error",
"eslint-plugin/prefer-replace-text": "error",
"eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"],
"eslint-plugin/require-meta-docs-description": "error",
"eslint-plugin/test-case-property-ordering": "error",
"eslint-plugin/test-case-shorthand-strings": "error",
"internal-rules/multiline-comment-style": "error"
},
overrides: [
{
files: ["tools/*.js", "docs/tools/*.js"],
rules: {
"no-console": "off",
"n/no-process-exit": "off"
}
},
{
files: ["lib/rules/*", "tools/internal-rules/*"],
excludedFiles: ["index.js"],
extends: [
"plugin:eslint-plugin/rules-recommended"
],
rules: {
"eslint-plugin/prefer-placeholders": "error",
"eslint-plugin/prefer-replace-text": "error",
"eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"],
"eslint-plugin/require-meta-docs-description": ["error", { pattern: "^(Enforce|Require|Disallow) .+[^. ]$" }],
"internal-rules/no-invalid-meta": "error"
}
},
{
files: ["lib/rules/*"],
excludedFiles: ["index.js"],
rules: {
"eslint-plugin/require-meta-docs-url": ["error", { pattern: "https://eslint.org/docs/rules/{{name}}" }]
"eslint-plugin/require-meta-docs-url": ["error", { pattern: "https://eslint.org/docs/latest/rules/{{name}}" }]
}
},
{
files: ["tests/lib/rules/*", "tests/tools/internal-rules/*"],
extends: [
"plugin:eslint-plugin/tests-recommended"
],
rules: {
"eslint-plugin/test-case-property-ordering": "error",
"eslint-plugin/test-case-shorthand-strings": "error"
}
},
{
Expand All @@ -105,49 +125,37 @@ module.exports = {
files: ["lib/*"],
excludedFiles: ["lib/unsupported-api.js"],
rules: {
"node/no-restricted-require": ["error", [
"n/no-restricted-require": ["error", [
...createInternalFilesPatterns()
]]
}
},
{
files: [INTERNAL_FILES.CLI_ENGINE_PATTERN],
rules: {
"node/no-restricted-require": ["error", [
...createInternalFilesPatterns(INTERNAL_FILES.CLI_ENGINE_PATTERN),
resolveAbsolutePath("lib/init/index.js")
]]
}
},
{
files: [INTERNAL_FILES.INIT_PATTERN],
rules: {
"node/no-restricted-require": ["error", [
...createInternalFilesPatterns(INTERNAL_FILES.INIT_PATTERN),
resolveAbsolutePath("lib/rule-tester/index.js")
"n/no-restricted-require": ["error", [
...createInternalFilesPatterns(INTERNAL_FILES.CLI_ENGINE_PATTERN)
]]
}
},
{
files: [INTERNAL_FILES.LINTER_PATTERN],
rules: {
"node/no-restricted-require": ["error", [
"n/no-restricted-require": ["error", [
...createInternalFilesPatterns(INTERNAL_FILES.LINTER_PATTERN),
"fs",
resolveAbsolutePath("lib/cli-engine/index.js"),
resolveAbsolutePath("lib/init/index.js"),
resolveAbsolutePath("lib/rule-tester/index.js")
]]
}
},
{
files: [INTERNAL_FILES.RULES_PATTERN],
rules: {
"node/no-restricted-require": ["error", [
"n/no-restricted-require": ["error", [
...createInternalFilesPatterns(INTERNAL_FILES.RULES_PATTERN),
"fs",
resolveAbsolutePath("lib/cli-engine/index.js"),
resolveAbsolutePath("lib/init/index.js"),
resolveAbsolutePath("lib/linter/index.js"),
resolveAbsolutePath("lib/rule-tester/index.js"),
resolveAbsolutePath("lib/source-code/index.js")
Expand All @@ -157,10 +165,9 @@ module.exports = {
{
files: ["lib/shared/**/*"],
rules: {
"node/no-restricted-require": ["error", [
"n/no-restricted-require": ["error", [
...createInternalFilesPatterns(),
resolveAbsolutePath("lib/cli-engine/index.js"),
resolveAbsolutePath("lib/init/index.js"),
resolveAbsolutePath("lib/linter/index.js"),
resolveAbsolutePath("lib/rule-tester/index.js"),
resolveAbsolutePath("lib/source-code/index.js")
Expand All @@ -170,11 +177,10 @@ module.exports = {
{
files: [INTERNAL_FILES.SOURCE_CODE_PATTERN],
rules: {
"node/no-restricted-require": ["error", [
"n/no-restricted-require": ["error", [
...createInternalFilesPatterns(INTERNAL_FILES.SOURCE_CODE_PATTERN),
"fs",
resolveAbsolutePath("lib/cli-engine/index.js"),
resolveAbsolutePath("lib/init/index.js"),
resolveAbsolutePath("lib/linter/index.js"),
resolveAbsolutePath("lib/rule-tester/index.js"),
resolveAbsolutePath("lib/rules/index.js")
Expand All @@ -184,10 +190,9 @@ module.exports = {
{
files: [INTERNAL_FILES.RULE_TESTER_PATTERN],
rules: {
"node/no-restricted-require": ["error", [
"n/no-restricted-require": ["error", [
...createInternalFilesPatterns(INTERNAL_FILES.RULE_TESTER_PATTERN),
resolveAbsolutePath("lib/cli-engine/index.js"),
resolveAbsolutePath("lib/init/index.js")
resolveAbsolutePath("lib/cli-engine/index.js")
]]
}
}
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -0,0 +1,2 @@
/docs/ @eslint/website-team @eslint/eslint-team
* @eslint/eslint-team
17 changes: 0 additions & 17 deletions .github/CODEOWNERS.md

This file was deleted.

53 changes: 0 additions & 53 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

43 changes: 0 additions & 43 deletions .github/ISSUE_TEMPLATE/NEW_SYNTAX.md

This file was deleted.

9 changes: 8 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Expand Up @@ -39,7 +39,7 @@ body:
attributes:
label: What did you do?
description: |
Please include a *minimal* reproduction case with source code, configuration file, any other information about how you're using ESLint. You can use Markdown in this field.
Please include a *minimal* reproduction case. If possible, include a link to a reproduction of the problem in the [ESLint demo](https://eslint.org/demo). Otherwise, include source code, configuration file(s), and any other information about how you're using ESLint. You can use Markdown in this field.
value: |
<details>
<summary>Configuration</summary>
Expand Down Expand Up @@ -68,6 +68,13 @@ body:
Please copy-paste the actual ESLint output. You can use Markdown in this field.
validations:
required: true
- type: input
attributes:
label: Link to Minimal Reproducible Example
description: 'Link to a [playground](https://eslint.org/play), [StackBlitz](https://stackblitz.com), or GitHub repo with a minimal reproduction of the problem. **A minimal reproduction is required** so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be auto-closed.'
placeholder: 'https://stackblitz.com/abcd1234'
validations:
required: true
- type: checkboxes
attributes:
label: Participation
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/change.yml
Expand Up @@ -3,7 +3,6 @@ description: "Request a change that is not a bug fix, rule change, or new rule"
title: "Change Request: (fill in)"
labels:
- enhancement
- triage
- core
body:
- type: markdown
Expand Down
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Expand Up @@ -3,3 +3,9 @@ contact_links:
- name: 🗣 Ask a Question, Discuss
url: https://github.com/eslint/eslint/discussions
about: Get help using ESLint
- name: 📝 Help with VS Code ESLint
url: https://github.com/microsoft/vscode-eslint/issues/
about: Bugs and feature requests for the VS Code ESLint plugin
- name: Discord Server
url: https://eslint.org/chat
about: Talk with the team
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/new-rule.yml
Expand Up @@ -26,7 +26,6 @@ body:
options:
- Warns about a potential problem
- Suggests an alternate way of doing something
- Enforces a formatting/stylistic preference
validations:
required: true
- type: textarea
Expand Down

0 comments on commit cd386aa

Please sign in to comment.