Skip to content
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

refactor: hide 'avoid-*' rules from presets and docs #876

Merged
merged 1 commit into from
Dec 9, 2024
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 VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.19.0
1.19.0-next.4
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint-react/monorepo",
"version": "1.19.0",
"version": "1.19.0-next.4",
"private": true,
"description": "Monorepo for eslint-plugin-react-[x, dom, web-api, hooks-extra, naming-convention].",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint-react/core",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's ESLint utility module for static analysis of React core APIs and Patterns.",
"homepage": "https://github.com/rel1cx/eslint-react",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin-react-debug/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-react-debug",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's ESLint plugin for debugging related rules.",
"keywords": [
"eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin-react-dom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-react-dom",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's ESLint plugin for React DOM related rules.",
"keywords": [
"eslint",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-react-hooks-extra",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's ESLint plugin for React Hooks related rules.",
"keywords": [
"eslint",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-react-naming-convention",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's ESLint plugin for naming convention related rules.",
"keywords": [
"eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin-react-web-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-react-web-api",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's ESLint plugin for interacting with Web APIs",
"keywords": [
"eslint",
Expand Down
2 changes: 0 additions & 2 deletions packages/plugins/eslint-plugin-react-x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ export default [

| Rule | Description | 💼 | 💭 | |
| :--------------------------------------- | :--------------------------------------------------------------------------------------------------- | :-: | :-: | :-: |
| `avoid-shorthand-boolean` | Prevents using shorthand syntax for boolean attributes. | 🎨 | | 🔧 |
| `avoid-shorthand-fragment` | Prevents using shorthand syntax for fragments. | 🎨 | | |
| `ensure-forward-ref-using-ref` | Requires that components wrapped with `forwardRef` must have a `ref` parameter. | ✔️ | | |
| `jsx-no-duplicate-props` | Prevents duplicate props in JSX. | ✔️ | | |
| `jsx-uses-vars` | Prevents variables used in JSX to be marked as unused. | ✔️ | | |
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin-react-x/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-react-x",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
"keywords": [
"eslint",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint-react/eslint-plugin",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "The main ESLint plugin of ESLint React. Contains all the rules and presets of ESLint React.",
"keywords": [
"eslint",
Expand Down
2 changes: 0 additions & 2 deletions packages/plugins/eslint-plugin/src/configs/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import * as dom from "./dom";
export const name = "@eslint-react/all";

export const rules = {
"@eslint-react/avoid-shorthand-boolean": "warn",
"@eslint-react/avoid-shorthand-fragment": "warn",
"@eslint-react/ensure-forward-ref-using-ref": "warn",
"@eslint-react/jsx-no-duplicate-props": "warn",
"@eslint-react/jsx-uses-vars": "warn",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint-react/shared",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's Shared constants and functions.",
"homepage": "https://github.com/rel1cx/eslint-react",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint-react/tools",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's std library and primitives.",
"homepage": "https://github.com/rel1cx/eslint-react",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint-react/types",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's type definitions.",
"homepage": "https://github.com/rel1cx/eslint-react",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/ast/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint-react/ast",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's TSESTree AST utility module.",
"homepage": "https://github.com/rel1cx/eslint-react",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/jsx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint-react/jsx",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "ESLint React's TSESTree AST utility module for static analysis of JSX.",
"homepage": "https://github.com/rel1cx/eslint-react",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/var/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint-react/var",
"version": "1.19.0",
"version": "1.19.0-next.4",
"description": "TSESTree AST utility module for static analysis of variables",
"homepage": "https://github.com/rel1cx/eslint-react",
"bugs": {
Expand Down
10 changes: 8 additions & 2 deletions website/pages/docs/rules/_meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ export default {
"prefer-read-only-props": "prefer-read-only-props",
"prefer-shorthand-boolean": "prefer-shorthand-boolean",
"prefer-shorthand-fragment": "prefer-shorthand-fragment",
"avoid-shorthand-boolean": "avoid-shorthand-boolean",
"avoid-shorthand-fragment": "avoid-shorthand-fragment",
"avoid-shorthand-boolean": {
title: "avoid-shorthand-boolean",
display: "hidden",
},
"avoid-shorthand-fragment": {
title: "avoid-shorthand-fragment",
display: "hidden",
},
"dom-no-children-in-void-dom-elements": "dom/no-children-in-void-dom-elements",
"dom-no-dangerously-set-innerhtml": "dom/no-dangerously-set-innerhtml",
"dom-no-dangerously-set-innerhtml-with-children": "dom/no-dangerously-set-innerhtml-with-children",
Expand Down
2 changes: 0 additions & 2 deletions website/pages/docs/rules/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

| Rule | Description | 💼 | 💭 | |
| :--------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- | :-: | :-: | :-: |
| [`avoid-shorthand-boolean`](avoid-shorthand-boolean) | Prevents using shorthand syntax for boolean attributes. | 🎨 | | 🔧 |
| [`avoid-shorthand-fragment`](avoid-shorthand-fragment) | Prevents using shorthand syntax for fragments. | 🎨 | | |
| [`ensure-forward-ref-using-ref`](ensure-forward-ref-using-ref) | Requires that components wrapped with `forwardRef` must have a `ref` parameter. | ✔️ | | |
| [`jsx-no-duplicate-props`](jsx-no-duplicate-props) | Prevents duplicate props in JSX. | ✔️ | | |
| [`jsx-uses-vars`](jsx-uses-vars) | Prevents variables used in JSX to be marked as unused. | ✔️ | | |
Expand Down
2 changes: 0 additions & 2 deletions website/pages/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

| Rule | Description |
| :--------------------------------------- | :--------------------------------------------------------------------------------------------------- |
| `avoid-shorthand-boolean` | Prevents using shorthand syntax for boolean attributes. |
| `avoid-shorthand-fragment` | Prevents using shorthand syntax for fragments. |
| `ensure-forward-ref-using-ref` | Requires that components wrapped with `forwardRef` must have a `ref` parameter. |
| `no-access-state-in-setstate` | Prevents accessing `this.state` inside `setState` calls. |
| `no-array-index-key` | Prevents using array `index` as `key`. |
Expand Down
Loading