Skip to content

Commit 9f75634

Browse files
committed
chore: refine ESLint configuration by removing unnecessary comments and plugins
1 parent 8bee1fa commit 9f75634

File tree

17 files changed

+419
-1273
lines changed

17 files changed

+419
-1273
lines changed

.github/CONTRIBUTING.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ Before submitting your contribution though, please make sure to take a moment an
99
- [Pull Request Guidelines](#pull-request-guidelines)
1010
- [Development Guide](#development-guide)
1111
- [Packages Overview](#packages-overview)
12-
- [Developing Documentation](#developing-documentation)
13-
- [Developing Rules](#developing-rules)
14-
- [Developing Core and Related Components](#developing-core-and-related-components)
15-
- [Building the documentation locally](#building-the-documentation-locally)
1612

1713
> [!NOTE]\
1814
> FYI: The ESLint Raect project is not a fork of the `eslint-plugin-react` project and meanwhile `eslint-plugin-react` is not the upstream of ESLint React.\

eslint.config.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import url from "node:url";
55
import eslintJs from "@eslint/js";
66
import eslintMarkdown from "@eslint/markdown";
77
import eslintStylistic from "@stylistic/eslint-plugin";
8-
import eslintPluginImport from "eslint-plugin-import-x";
98
import eslintPluginJsdoc from "eslint-plugin-jsdoc";
109
import eslintPluginLocal from "@workspace/eslint-plugin-local";
1110
import eslintPluginPerfectionist from "eslint-plugin-perfectionist";
@@ -14,8 +13,6 @@ import eslintPluginSafeTypeScript from "@susisu/eslint-plugin-safe-typescript";
1413
import eslintPluginSimpleImportSort from "eslint-plugin-simple-import-sort";
1514
import eslintPluginUnicorn from "eslint-plugin-unicorn";
1615
import eslintPluginVitest from "eslint-plugin-vitest";
17-
// @ts-expect-error - missing types
18-
import eslintPluginEslintPlugin from "eslint-plugin-eslint-plugin";
1916
import eslintConfigFlatGitignore from "eslint-config-flat-gitignore";
2017
import tseslint from "typescript-eslint";
2118

@@ -120,11 +117,9 @@ export default tseslint.config(
120117
extends: [
121118
eslintJs.configs.recommended,
122119
...tseslint.configs.strict,
123-
eslintPluginImport.flatConfigs.recommended,
124120
eslintPluginPerfectionist.configs["recommended-natural"],
125121
eslintPluginRegexp.configs["flat/recommended"],
126122
eslintPluginJsdoc.configs["flat/recommended-typescript-error"],
127-
eslintPluginEslintPlugin.configs["flat/all-type-checked"],
128123
],
129124
languageOptions: {
130125
parser: tseslint.parser,
@@ -245,11 +240,6 @@ export default tseslint.config(
245240
tags: templateIndentAnnotations,
246241
},
247242
],
248-
// Part: eslint-plugin rules
249-
"eslint-plugin/meta-property-ordering": "off",
250-
"eslint-plugin/no-property-in-node": "off",
251-
"eslint-plugin/require-meta-docs-recommended": "off",
252-
"eslint-plugin/require-meta-docs-url": "off",
253243
// Part: local rules
254244
"local/avoid-multiline-template-expression": "warn",
255245
"local/no-shadow-underscore": "error",
@@ -296,12 +286,6 @@ export default tseslint.config(
296286
},
297287
],
298288
},
299-
settings: {
300-
"import-x/parsers": {
301-
"@typescript-eslint/parser": GLOB_TS,
302-
},
303-
"import-x/resolver": "oxc",
304-
},
305289
},
306290
{
307291
files: GLOB_JS,
@@ -338,7 +322,6 @@ export default tseslint.config(
338322
...disableTypeCheckedRules,
339323
...eslintPluginVitest.configs.recommended.rules,
340324
"@typescript-eslint/no-empty-function": ["error", { allow: ["arrowFunctions"] }],
341-
"import-x/no-extraneous-dependencies": "off",
342325
"local/avoid-multiline-template-expression": "off",
343326
"@nx/enforce-module-boundaries": "off",
344327
},

package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"@eslint/js": "^9.18.0",
5656
"@eslint/markdown": "^6.2.1",
5757
"@napi-rs/canvas": "^0.1.65",
58-
"@nx/eslint": "20.3.1",
5958
"@stylistic/eslint-plugin": "^2.13.0",
6059
"@susisu/eslint-plugin-safe-typescript": "^0.9.2",
6160
"@swc/core": "^1.10.7",
@@ -77,9 +76,6 @@
7776
"esbuild": "^0.24.2",
7877
"eslint": "^9.18.0",
7978
"eslint-config-flat-gitignore": "^1.0.0",
80-
"eslint-import-resolver-oxc": "^0.8.0",
81-
"eslint-plugin-eslint-plugin": "^6.4.0",
82-
"eslint-plugin-import-x": "^4.6.1",
8379
"eslint-plugin-jsdoc": "^50.6.2",
8480
"eslint-plugin-perfectionist": "^4.6.0",
8581
"eslint-plugin-regexp": "^2.7.0",

packages/plugins/eslint-plugin-react-debug/src/rules/class-component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export default createRule<[], MessageID>({
1616
meta: {
1717
type: "problem",
1818
docs: {
19-
// eslint-disable-next-line eslint-plugin/require-meta-docs-description
2019
description: "report all class components, including anonymous ones",
2120
[Symbol.for("rule_features")]: RULE_FEATURES,
2221
},

packages/plugins/eslint-plugin-react-debug/src/rules/function-component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export default createRule<[], MessageID>({
1616
meta: {
1717
type: "problem",
1818
docs: {
19-
// eslint-disable-next-line eslint-plugin/require-meta-docs-description
2019
description: "report all function components, including anonymous ones",
2120
[Symbol.for("rule_features")]: RULE_FEATURES,
2221
},

packages/plugins/eslint-plugin-react-debug/src/rules/hook.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export default createRule<[], MessageID>({
1616
meta: {
1717
type: "problem",
1818
docs: {
19-
// eslint-disable-next-line eslint-plugin/require-meta-docs-description
2019
description: "report all React Hooks",
2120
[Symbol.for("rule_features")]: RULE_FEATURES,
2221
},

packages/plugins/eslint-plugin-react-debug/src/rules/is-from-react.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export default createRule<[], MessageID>({
2020
meta: {
2121
type: "problem",
2222
docs: {
23-
// eslint-disable-next-line eslint-plugin/require-meta-docs-description
2423
description: "report all identifiers that are initialized from React.",
2524
[Symbol.for("rule_features")]: RULE_FEATURES,
2625
},
@@ -67,7 +66,6 @@ export default createRule<[], MessageID>({
6766
messageId: "isFromReact",
6867
node,
6968
data: {
70-
// eslint-disable-next-line eslint-plugin/no-unused-placeholders
7169
type: node.type,
7270
name,
7371
importSource,

packages/plugins/eslint-plugin-react-x/src/rules/no-class-component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export default createRule<[], MessageID>({
4444
messageId: "noClassComponent",
4545
node: component,
4646
data: {
47-
// eslint-disable-next-line eslint-plugin/no-unused-placeholders
4847
name,
4948
},
5049
});

packages/plugins/eslint-plugin-react-x/src/rules/no-nested-components.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable eslint-plugin/no-unused-placeholders */
21
import * as AST from "@eslint-react/ast";
32
import {
43
ERComponentHint,

packages/plugins/eslint-plugin-react-x/src/rules/prefer-shorthand-fragment.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ export default createRule<[], MessageID>({
4545
return [];
4646
}
4747
return [
48-
// eslint-disable-next-line eslint-plugin/prefer-replace-text
4948
fixer.replaceTextRange([openingElement.range[0], openingElement.range[1]], "<>"),
50-
// eslint-disable-next-line eslint-plugin/prefer-replace-text
5149
fixer.replaceTextRange([closingElement.range[0], closingElement.range[1]], "</>"),
5250
];
5351
},

0 commit comments

Comments
 (0)