Skip to content

feat: rename core preset to x #1042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A series of composable ESLint rules for React and friends.

### Modular

- [`eslint-plugin-react-x`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) - Core rules (renderer-agnostic, compatible with x-platform).
- [`eslint-plugin-react-x`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) - X Rules (renderer-agnostic, compatible with x-platform).
- [`eslint-plugin-react-dom`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) - DOM specific rules for React DOM.
- [`eslint-plugin-react-web-api`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-web-api) - Rules for interacting with Web APIs.
- [`eslint-plugin-react-hooks-extra`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-hooks-extra) - Extra React Hooks rules.
Expand Down
1 change: 1 addition & 0 deletions apps/website/content/docs/deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ full: true

| Preset | Replaced by | Deprecated in |
| :-------- | :------------ | :------------ |
| `core` | `x` | 1.42.0 |
| `off-dom` | `disable-dom` | 1.10.0 |
4 changes: 2 additions & 2 deletions apps/website/content/docs/presets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The following presets are available in `@eslint-react/eslint-plugin`:

## Bare Bones

- `core`\
- `x`\
Enable rules for `"react"`.
- `dom`\
Enable rules for `"react-dom"`.
Expand All @@ -19,7 +19,7 @@ The following presets are available in `@eslint-react/eslint-plugin`:

- `recommended`\
Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects.\
_This preset includes the `core`, `dom`, and `web-api` presets._
_This preset includes the `x`, `dom`, and `web-api` presets._

## TypeScript Specialized

Expand Down
2 changes: 1 addition & 1 deletion apps/website/content/docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Minimum supported versions:

### Plugins (with ecological niche explanation)

- [x] `eslint-plugin-react-x` - Core rules (renderer-agnostic, compatible with x-platform)
- [x] `eslint-plugin-react-x` - X Rules (renderer-agnostic, compatible with x-platform)
- [x] `eslint-plugin-react-dom` - DOM Specific rules for React DOM
- [x] `eslint-plugin-react-web-api` - Rules for interacting with Web APIs
- [x] `eslint-plugin-react-hooks-extra` - Extra rules for `eslint-plugin-react-hooks`
Expand Down
2 changes: 1 addition & 1 deletion apps/website/content/docs/rules/meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"pages": [
"overview",
"---Core Rules---",
"---X Rules---",
"jsx-no-duplicate-props",
"jsx-no-undef",
"jsx-uses-react",
Expand Down
2 changes: 1 addition & 1 deletion apps/website/content/docs/rules/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Linter rules can have false positives, false negatives, and some rules are depen
- 2️⃣ - Severity 2
- ✅ - Severity in recommended presets

## Core Rules
## X Rules

| Rule | ✅ | 🌟 | Description | `react` |
| :----------------------------------------------------------------------------------- | :- | :------: | :---------------------------------------------------------------------------------------------------- | :-----: |
Expand Down
5 changes: 5 additions & 0 deletions apps/website/migration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export const redirects = [
destination: "/docs/using-an-alternative-parser/ts-blank-eslint-parser",
permanent: true,
},
{
source: "https://eslint-react.xyz/docs/rules/overview#core-rules",
destination: "https://eslint-react.xyz/docs/rules/overview#x-rules",
permanent: true,
},
// Redirects for old rule names
{
source: "/docs/rules/use-jsx-vars",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin-react-x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ export default tseslint.config({

## Rules

<https://eslint-react.xyz/docs/rules/overview#core-rules>
<https://eslint-react.xyz/docs/rules/overview#x-rules>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/jsx-no-duplicate-props

**Presets**

- `core`
- `x`
- `recommended`

## Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/jsx-uses-react

**Presets**

- `core`
- `x`
- `recommended`

## Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/jsx-uses-vars

**Presets**

- `core`
- `x`
- `recommended`

## Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-access-state-in-setstate

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-array-index-key

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-children-count

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-children-for-each

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-children-map

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-children-only

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-children-to-array

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-class-component

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-clone-element

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-comment-textnodes

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ react-x/no-component-will-mount

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ react-x/no-component-will-receive-props

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ react-x/no-component-will-update

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ react-x/no-context-provider

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-create-ref

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-default-props

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-direct-mutation-state

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-duplicate-key

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ react-x/no-forward-ref

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ react-x/no-implicit-key

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-missing-key

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-nested-component-definitions

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-prop-types

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-redundant-should-component-update

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-set-state-in-component-did-mount

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-set-state-in-component-did-update

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-set-state-in-component-will-update

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-string-refs

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-unsafe-component-will-mount

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-unsafe-component-will-receive-props

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-unsafe-component-will-update

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ react-x/no-unstable-context-value

**Presets**

- `core`
- `x`
- `recommended`
- `recommended-typescript`
- `recommended-type-checked`
Expand Down
Loading