Skip to content

Commit

Permalink
chore: [eslint-configs] remove category from JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
noshiro-pf committed Mar 2, 2025
1 parent ad11c32 commit 0485829
Show file tree
Hide file tree
Showing 11 changed files with 1,132 additions and 1,407 deletions.
3 changes: 1 addition & 2 deletions packages/eslint-configs/scripts/generate-rules-type-core.mts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,13 @@ const metaToString = (meta: DeepReadonly<Rule['meta']>): string => {

if (docs === undefined) return '';

const { description, recommended, category, url } = docs;
const { description, recommended, url } = docs;

const keyValue: DeepReadonly<[string, boolean | string | undefined][]> = [
['type', type],
['deprecated', isDeprecated(deprecated)],
['fixable', fixable],
['hasSuggestions', hasSuggestions],
['category', category],
['recommended', recommended],
[
'requiresTypeChecking',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-configs/src/configs/plugins.mts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export const plugins: Record<
'react-hooks': eslintPluginReactHooks,
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
'react-refresh': eslintPluginReactRefresh as unknown as Plugin,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
'react-perf': eslintPluginReactPerf,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
security: eslintPluginSecurity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export const createNoUnsafeAssignmentRule =
// TODO fix this copypasta between YieldExpression and ReturnStatement

YieldExpression: (node): void => {
if (node.argument === undefined) {
if (node.argument === null) {
return;
}

Expand All @@ -257,7 +257,7 @@ export const createNoUnsafeAssignmentRule =
const sourceType = checker.getTypeAtLocation(tsNode.expression);

const arrayMethodCallSafety = isSafeAssignmentFromArrayMethod(
node.argument ?? undefined,
node.argument,
destinationType,
sourceType,
);
Expand All @@ -272,7 +272,7 @@ export const createNoUnsafeAssignmentRule =
checker,
destinationType,
sourceType,
node.argument ?? undefined,
node.argument,
) === 'unsafe'
) {
context.report({
Expand Down
110 changes: 50 additions & 60 deletions packages/eslint-configs/src/types/rules/eslint-cypress-rules.mts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ type SpreadOptionsIfIsArray<
* @link https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-assigning-return-values.md
*
* ```md
* | key | value |
* | :---------- | :-------------- |
* | type | problem |
* | deprecated | false |
* | category | Possible Errors |
* | recommended | true |
* | key | value |
* | :---------- | :------ |
* | type | problem |
* | deprecated | false |
* | recommended | true |
* ```
*/
namespace NoAssigningReturnValues {
Expand All @@ -32,12 +31,11 @@ namespace NoAssigningReturnValues {
* @link https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/unsafe-to-chain-command.md
*
* ```md
* | key | value |
* | :---------- | :-------------- |
* | type | problem |
* | deprecated | false |
* | category | Possible Errors |
* | recommended | true |
* | key | value |
* | :---------- | :------ |
* | type | problem |
* | deprecated | false |
* | recommended | true |
* ```
*/
namespace UnsafeToChainCommand {
Expand Down Expand Up @@ -80,12 +78,11 @@ namespace UnsafeToChainCommand {
* @link https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-unnecessary-waiting.md
*
* ```md
* | key | value |
* | :---------- | :-------------- |
* | type | problem |
* | deprecated | false |
* | category | Possible Errors |
* | recommended | true |
* | key | value |
* | :---------- | :------ |
* | type | problem |
* | deprecated | false |
* | recommended | true |
* ```
*/
namespace NoUnnecessaryWaiting {
Expand All @@ -98,12 +95,11 @@ namespace NoUnnecessaryWaiting {
* @link https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-async-before.md
*
* ```md
* | key | value |
* | :---------- | :-------------- |
* | type | problem |
* | deprecated | false |
* | category | Possible Errors |
* | recommended | true |
* | key | value |
* | :---------- | :------ |
* | type | problem |
* | deprecated | false |
* | recommended | true |
* ```
*/
namespace NoAsyncBefore {
Expand All @@ -116,12 +112,11 @@ namespace NoAsyncBefore {
* @link https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-async-tests.md
*
* ```md
* | key | value |
* | :---------- | :-------------- |
* | type | problem |
* | deprecated | false |
* | category | Possible Errors |
* | recommended | true |
* | key | value |
* | :---------- | :------ |
* | type | problem |
* | deprecated | false |
* | recommended | true |
* ```
*/
namespace NoAsyncTests {
Expand All @@ -134,12 +129,11 @@ namespace NoAsyncTests {
* @link https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/assertion-before-screenshot.md
*
* ```md
* | key | value |
* | :---------- | :-------------- |
* | type | problem |
* | deprecated | false |
* | category | Possible Errors |
* | recommended | false |
* | key | value |
* | :---------- | :------ |
* | type | problem |
* | deprecated | false |
* | recommended | false |
* ```
*/
namespace AssertionBeforeScreenshot {
Expand All @@ -152,12 +146,11 @@ namespace AssertionBeforeScreenshot {
* @link https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/require-data-selectors.md
*
* ```md
* | key | value |
* | :---------- | :-------------- |
* | type | suggestion |
* | deprecated | false |
* | category | Possible Errors |
* | recommended | false |
* | key | value |
* | :---------- | :--------- |
* | type | suggestion |
* | deprecated | false |
* | recommended | false |
* ```
*/
namespace RequireDataSelectors {
Expand All @@ -170,12 +163,11 @@ namespace RequireDataSelectors {
* @link https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-force.md
*
* ```md
* | key | value |
* | :---------- | :-------------- |
* | type | suggestion |
* | deprecated | false |
* | category | Possible Errors |
* | recommended | false |
* | key | value |
* | :---------- | :--------- |
* | type | suggestion |
* | deprecated | false |
* | recommended | false |
* ```
*/
namespace NoForce {
Expand All @@ -188,12 +180,11 @@ namespace NoForce {
* @link https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-pause.md
*
* ```md
* | key | value |
* | :---------- | :-------------- |
* | type | suggestion |
* | deprecated | false |
* | category | Possible Errors |
* | recommended | false |
* | key | value |
* | :---------- | :--------- |
* | type | suggestion |
* | deprecated | false |
* | recommended | false |
* ```
*/
namespace NoPause {
Expand All @@ -206,12 +197,11 @@ namespace NoPause {
* @link https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-debug.md
*
* ```md
* | key | value |
* | :---------- | :-------------- |
* | type | suggestion |
* | deprecated | false |
* | category | Possible Errors |
* | recommended | false |
* | key | value |
* | :---------- | :--------- |
* | type | suggestion |
* | deprecated | false |
* | recommended | false |
* ```
*/
namespace NoDebug {
Expand Down
Loading

0 comments on commit 0485829

Please sign in to comment.