Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
chore: promote rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Oct 26, 2022
1 parent 533a7b2 commit fec25a9
Show file tree
Hide file tree
Showing 129 changed files with 1,885 additions and 1,289 deletions.
36 changes: 19 additions & 17 deletions crates/rome_diagnostics_categories/src/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,51 @@ define_dategories! {
"lint/correctness/noCatchAssign": "https://rome.tools/docs/lint/rules/noCatchAssign",
"lint/correctness/noCommentText": "https://rome.tools/docs/lint/rules/noCommentText",
"lint/correctness/noCompareNegZero": "https://rome.tools/docs/lint/rules/noCompareNegZero",
"lint/correctness/noDebugger": "https://rome.tools/docs/lint/rules/noDebugger",
"lint/correctness/noDelete": "https://rome.tools/docs/lint/rules/noDelete",
"lint/correctness/noDoubleEquals": "https://rome.tools/docs/lint/rules/noDoubleEquals",
"lint/correctness/noDupeArgs": "https://rome.tools/docs/lint/rules/noDupeArgs",
"lint/correctness/noEmptyPattern": "https://rome.tools/docs/lint/rules/noEmptyPattern",
"lint/correctness/noFunctionAssign": "https://rome.tools/docs/lint/rules/noFunctionAssign",
"lint/correctness/noImplicitBoolean": "https://rome.tools/docs/lint/rules/noImplicitBoolean",
"lint/correctness/noImportAssign": "https://rome.tools/docs/lint/rules/noImportAssign",
"lint/correctness/noLabelVar": "https://rome.tools/docs/lint/rules/noLabelVar",
"lint/correctness/noMultipleSpacesInRegularExpressionLiterals": "https://rome.tools/docs/lint/rules/noMultipleSpacesInRegularExpressionLiterals",
"lint/correctness/noShadowRestrictedNames": "https://rome.tools/docs/lint/rules/noShadowRestrictedNames",
"lint/correctness/noSparseArray": "https://rome.tools/docs/lint/rules/noSparseArray",
"lint/correctness/noUnnecessaryContinue": "https://rome.tools/docs/lint/rules/noUnnecessaryContinue",
"lint/correctness/noUnsafeNegation": "https://rome.tools/docs/lint/rules/noUnsafeNegation",
"lint/correctness/noUnusedTemplateLiteral": "https://rome.tools/docs/lint/rules/noUnusedTemplateLiteral",
"lint/correctness/useBlockStatements": "https://rome.tools/docs/lint/rules/useBlockStatements",
"lint/correctness/useSingleCaseStatement": "https://rome.tools/docs/lint/rules/useSingleCaseStatement",
"lint/correctness/useSingleVarDeclarator": "https://rome.tools/docs/lint/rules/useSingleVarDeclarator",
"lint/correctness/useValidTypeof": "https://rome.tools/docs/lint/rules/useValidTypeof",
"lint/correctness/useWhile": "https://rome.tools/docs/lint/rules/useWhile",
"lint/correctness/noNewSymbol": "https://rome.tools/docs/lint/rules/noNewSymbol",
"lint/correctness/noUselessFragments": "https://rome.tools/docs/lint/rules/noUselessFragments",
"lint/correctness/noUnusedVariables": "https://rome.tools/docs/lint/rules/noUnusedVariables",
"lint/correctness/noUnreachable": "https://rome.tools/docs/lint/rules/noUnreachable",
"lint/correctness/noRestrictedGlobals": "https://rome.tools/docs/lint/rules/noRestrictedGlobals",
"lint/correctness/useOptionalChain": "https://rome.tools/docs/lint/rules/useOptionalChain",
"lint/correctness/noUndeclaredVariables": "https://rome.tools/docs/lint/rules/noUndeclaredVariables",
"lint/correctness/useValidTypeof": "https://rome.tools/docs/lint/rules/useValidTypeof",
"lint/correctness/noVoidElementsWithChildren": "https://rome.tools/docs/lint/rules/noVoidElementsWithChildren",
"lint/correctness/noArrayIndexKey": "https://rome.tools/docs/lint/rules/noArrayIndexKey",
"lint/correctness/noChildrenProp": "https://rome.tools/docs/lint/rules/noChildrenProp",
"lint/correctness/noRenderReturnValue": "https://rome.tools/docs/lint/rules/noRenderReturnValue",

// style category
// style group
"lint/style/noNegationElse": "https://rome.tools/docs/lint/rules/noNegationElse",
"lint/style/noShoutyConstants": "https://rome.tools/docs/lint/rules/noShoutyConstants",
"lint/style/useSelfClosingElements": "https://rome.tools/docs/lint/rules/useSelfClosingElements",
"lint/style/useShorthandArrayType": "https://rome.tools/docs/lint/rules/useShorthandArrayType",
"lint/style/useFragmentSyntax": "https://rome.tools/docs/lint/rules/useFragmentSyntax",
"lint/style/useTemplate": "https://rome.tools/docs/lint/rules/useTemplate",
"lint/style/useCamelCase": "https://rome.tools/docs/lint/rules/useCamelCase",
"lint/style/useSingleVarDeclarator": "https://rome.tools/docs/lint/rules/useSingleVarDeclarator",
"lint/style/useOptionalChain": "https://rome.tools/docs/lint/rules/useOptionalChain",
"lint/style/useBlockStatements": "https://rome.tools/docs/lint/rules/useBlockStatements",
"lint/style/noImplicitBoolean": "https://rome.tools/docs/lint/rules/noImplicitBoolean",
"lint/style/noUnusedTemplateLiteral": "https://rome.tools/docs/lint/rules/noUnusedTemplateLiteral",

// complexity
"lint/complexity/useSimplifiedLogicExpression": "https://rome.tools/docs/lint/rules/useSimplifiedLogicExpression",
"lint/complexity/noExtraBooleanCast": "https://rome.tools/docs/lint/rules/noExtraBooleanCast",

// a11y category
// a11y group
"lint/a11y/noAutofocus": "https://rome.tools/docs/lint/rules/noAutofocus",
"lint/a11y/noPositiveTabindex": "https://rome.tools/docs/lint/rules/noPositiveTabindex",
"lint/a11y/useKeyWithMouseEvents": "https://rome.tools/docs/lint/rules/useKeyWithMouseEvents",
Expand All @@ -65,21 +68,20 @@ define_dategories! {
"lint/a11y/useValidAnchor": "https://rome.tools/docs/lint/rules/useValidAnchor",
"lint/a11y/useKeyWithClickEvents": "https://rome.tools/docs/lint/rules/useKeyWithClickEvents",
"lint/a11y/useButtonType": "https://rome.tools/docs/lint/rules/useButtonType",
// react
"lint/react/noDangerouslySetInnerHtml": "https://rome.tools/docs/lint/rules/noDangerouslySetInnerHtml",
"lint/react/noDangerouslySetInnerHtmlWithChildren": "https://rome.tools/docs/lint/rules/noDangerouslySetInnerHtmlWithChildren",
"lint/react/noVoidElementsWithChildren": "https://rome.tools/docs/lint/rules/noVoidElementsWithChildren",
"lint/react/noChildrenProp": "https://rome.tools/docs/lint/rules/noChildrenProp",
"lint/react/noRenderReturnValue": "https://rome.tools/docs/lint/rules/noRenderReturnValue",
"lint/react/noArrayIndexKey": "https://rome.tools/docs/lint/rules/noArrayIndexKey",

"lint/a11y/useAltText": "https://rome.tools/docs/lint/rules/useAltText",
// security
"lint/security/noDangerouslySetInnerHtml": "https://rome.tools/docs/lint/rules/noDangerouslySetInnerHtml",
"lint/security/noDangerouslySetInnerHtmlWithChildren": "https://rome.tools/docs/lint/rules/noDangerouslySetInnerHtmlWithChildren",
"lint/security/noDebugger": "https://rome.tools/docs/lint/rules/noDebugger",


// nursery
"lint/nursery/useFlatMap": "https://rome.tools/docs/lint/rules/useFlatMap",
"lint/nursery/noConstAssign": "https://rome.tools/docs/lint/rules/noConstAssign",
"lint/nursery/noExplicitAny": "https://rome.tools/docs/lint/rules/noExplicitAny",
"lint/nursery/useValidForDirection": "https://rome.tools/docs/lint/rules/useValidForDirection",
"lint/nursery/noInvalidConstructorSuper": "https://rome.tools/docs/lint/rules/noInvalidConstructorSuper",
"lint/nursery/useExhaustiveDependencies": "https://rome.tools/docs/lint/rules/useExhaustiveDependencies",
;

// General categories
Expand Down
3 changes: 2 additions & 1 deletion crates/rome_js_analyze/src/analyzers.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/rome_js_analyze/src/analyzers/a11y.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/rome_js_analyze/src/analyzers/a11y/no_auto_focus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ declare_rule! {
pub(crate) NoAutoFocus {
version: "10.0.0",
name: "noAutofocus",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ declare_rule! {
pub(crate) UseAltText {
version: "10.0.0",
name: "useAltText",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ declare_rule! {
pub(crate) UseAnchorContent {
version: "10.0.0",
name: "useAnchorContent",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ declare_rule! {
pub(crate) UseBlankTarget {
version: "10.0.0",
name: "useBlankTarget",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ declare_rule! {
pub(crate) UseKeyWithClickEvents {
version: "10.0.0",
name: "useKeyWithClickEvents",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ declare_rule! {
pub(crate) UseKeyWithMouseEvents {
version: "10.0.0",
name: "useKeyWithMouseEvents",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ declare_rule! {
pub(crate) UseValidAnchor {
version: "10.0.0",
name: "useValidAnchor",
recommended: false,
recommended: true,
}
}

Expand Down
8 changes: 1 addition & 7 deletions crates/rome_js_analyze/src/analyzers/correctness.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ declare_rule! {
pub(crate) NoNewSymbol {
version: "0.10.0",
name: "noNewSymbol",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use rome_rowan::{AstNode, BatchMutationExt};
use crate::{utils, JsRuleAction};

declare_rule! {
/// Avoid using unnecessary `ContinueStatement`.
/// Avoid using unnecessary `continue`.
///
/// ## Examples
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ declare_rule! {
pub(crate) NoUnreachable {
version: "0.7.0",
name: "noUnreachable",
recommended: false,
recommended: true,
}
}

Expand Down
12 changes: 1 addition & 11 deletions crates/rome_js_analyze/src/analyzers/nursery.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions crates/rome_js_analyze/src/analyzers/security.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion crates/rome_js_analyze/src/analyzers/style.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ declare_rule! {
pub(crate) UseOptionalChain {
version: "0.10.0",
name: "useOptionalChain",
recommended: false,
recommended: true,
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/rome_js_analyze/src/semantic_analyzers.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ declare_rule! {
pub(crate) NoPositiveTabindex {
version: "10.0.0",
name: "noPositiveTabindex",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ declare_rule! {
pub(crate) UseButtonType {
version: "0.10.0",
name: "useButtonType",
recommended: false,
recommended: true,
}
}

Expand Down
6 changes: 5 additions & 1 deletion crates/rome_js_analyze/src/semantic_analyzers/correctness.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ declare_rule! {
pub(crate) NoArrayIndexKey {
version: "0.10.0",
name: "noArrayIndexKey",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ declare_rule! {
pub(crate) NoChildrenProp {
version: "0.10.0",
name: "noChildrenProp",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ declare_rule! {
pub(crate) NoRenderReturnValue {
version: "0.10.0",
name: "noRenderReturnValue",
recommended: false,
recommended: true,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ declare_rule! {
pub(crate) NoVoidElementsWithChildren {
version: "0.10.0",
name: "noVoidElementsWithChildren",
recommended: false,
recommended: true,
}
}

Expand Down
Loading

0 comments on commit fec25a9

Please sign in to comment.