Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: applied eslint-plugin-perfectionist@4 updates#11168

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletioneslint.config.mjs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
// @ts-check

import eslintCommentsPlugin from '@eslint-community/eslint-plugin-eslint-comments/configs';
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
import { FlatCompat } from '@eslint/eslintrc';
import eslint from '@eslint/js';
import eslintCommentsPlugin from '@eslint-community/eslint-plugin-eslint-comments/configs';
import tseslintInternalPlugin from '@typescript-eslint/eslint-plugin-internal';
import vitestPlugin from '@vitest/eslint-plugin';
import eslintPluginPlugin from 'eslint-plugin-eslint-plugin';
Expand Down
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/base/PropertyDefinitionBase.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ import type { Accessibility } from './Accessibility';
import type { BaseNode } from './BaseNode';

interface PropertyDefinitionBase extends BaseNode {
typeAnnotation: TSTypeAnnotation | undefined;
accessibility: Accessibility | undefined;
computed: boolean;
declare: boolean;
Expand All@@ -21,7 +22,6 @@ interface PropertyDefinitionBase extends BaseNode {
override: boolean;
readonly: boolean;
static: boolean;
typeAnnotation: TSTypeAnnotation | undefined;
value: Expression | null;
}

Expand Down
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/base/TSFunctionSignatureBase.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@ import type { Parameter } from '../unions/Parameter';
import type { BaseNode } from './BaseNode';

export interface TSFunctionSignatureBase extends BaseNode {
typeParameters: TSTypeParameterDeclaration | undefined;
params: Parameter[];
returnType: TSTypeAnnotation | undefined;
typeParameters: TSTypeParameterDeclaration | undefined;
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/base/TSHeritageBase.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,6 @@ import type { BaseNode } from './BaseNode';

export interface TSHeritageBase extends BaseNode {
// TODO(#1852) - this should be restricted to MemberExpression | Identifier
expression: Expression;
typeArguments: TSTypeParameterInstantiation | undefined;
expression: Expression;
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/element/TSIndexSignature/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,9 +6,9 @@ import type { Parameter } from '../../unions/Parameter';

export interface TSIndexSignature extends BaseNode {
type: AST_NODE_TYPES.TSIndexSignature;
typeAnnotation: TSTypeAnnotation | undefined;
accessibility: Accessibility | undefined;
parameters: Parameter[];
readonly: boolean;
static: boolean;
typeAnnotation: TSTypeAnnotation | undefined;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,7 @@ import type {

interface TSMethodSignatureBase extends BaseNode {
type: AST_NODE_TYPES.TSMethodSignature;
typeParameters: TSTypeParameterDeclaration | undefined;
accessibility: Accessibility | undefined;
computed: boolean;
key: PropertyName;
Expand All@@ -21,7 +22,6 @@ interface TSMethodSignatureBase extends BaseNode {
readonly: boolean;
returnType: TSTypeAnnotation | undefined;
static: boolean;
typeParameters: TSTypeParameterDeclaration | undefined;
}

export interface TSMethodSignatureComputedName extends TSMethodSignatureBase {
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,13 +10,13 @@ import type {

interface TSPropertySignatureBase extends BaseNode {
type: AST_NODE_TYPES.TSPropertySignature;
typeAnnotation: TSTypeAnnotation | undefined;
accessibility: Accessibility | undefined;
computed: boolean;
key: PropertyName;
optional: boolean;
readonly: boolean;
static: boolean;
typeAnnotation: TSTypeAnnotation | undefined;
}

export interface TSPropertySignatureComputedName
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,12 +8,12 @@ import type { Parameter } from '../../unions/Parameter';

export interface ArrowFunctionExpression extends BaseNode {
type: AST_NODE_TYPES.ArrowFunctionExpression;
typeParameters: TSTypeParameterDeclaration | undefined;
async: boolean;
body: BlockStatement | Expression;
expression: boolean;
generator: boolean;
id: null;
params: Parameter[];
returnType: TSTypeAnnotation | undefined;
typeParameters: TSTypeParameterDeclaration | undefined;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,8 +6,8 @@ import type { Expression } from '../../unions/Expression';

export interface CallExpression extends BaseNode {
type: AST_NODE_TYPES.CallExpression;
typeArguments: TSTypeParameterInstantiation | undefined;
arguments: CallExpressionArgument[];
callee: Expression;
optional: boolean;
typeArguments: TSTypeParameterInstantiation | undefined;
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/expression/Identifier/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,8 +5,8 @@ import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec';

export interface Identifier extends BaseNode {
type: AST_NODE_TYPES.Identifier;
typeAnnotation: TSTypeAnnotation | undefined;
decorators: Decorator[];
name: string;
optional: boolean;
typeAnnotation: TSTypeAnnotation | undefined;
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/expression/NewExpression/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ import type { Expression } from '../../unions/Expression';

export interface NewExpression extends BaseNode {
type: AST_NODE_TYPES.NewExpression;
typeArguments: TSTypeParameterInstantiation | undefined;
arguments: CallExpressionArgument[];
callee: Expression;
typeArguments: TSTypeParameterInstantiation | undefined;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,6 +5,6 @@ import type { TypeNode } from '../../unions/TypeNode';

export interface TSAsExpression extends BaseNode {
type: AST_NODE_TYPES.TSAsExpression;
expression: Expression;
typeAnnotation: TypeNode;
expression: Expression;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,6 +5,6 @@ import type { Expression } from '../../unions/Expression';

export interface TSInstantiationExpression extends BaseNode {
type: AST_NODE_TYPES.TSInstantiationExpression;
expression: Expression;
typeArguments: TSTypeParameterInstantiation;
expression: Expression;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,6 +5,6 @@ import type { TypeNode } from '../../unions/TypeNode';

export interface TSSatisfiesExpression extends BaseNode {
type: AST_NODE_TYPES.TSSatisfiesExpression;
expression: Expression;
typeAnnotation: TypeNode;
expression: Expression;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,6 +5,6 @@ import type { TypeNode } from '../../unions/TypeNode';

export interface TSTypeAssertion extends BaseNode {
type: AST_NODE_TYPES.TSTypeAssertion;
expression: Expression;
typeAnnotation: TypeNode;
expression: Expression;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ import type { TemplateLiteral } from '../TemplateLiteral/spec';

export interface TaggedTemplateExpression extends BaseNode {
type: AST_NODE_TYPES.TaggedTemplateExpression;
typeArguments: TSTypeParameterInstantiation | undefined;
quasi: TemplateLiteral;
tag: Expression;
typeArguments: TSTypeParameterInstantiation | undefined;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,5 +3,5 @@ import type { UnaryExpressionBase } from '../../base/UnaryExpressionBase';

export interface UnaryExpression extends UnaryExpressionBase {
type: AST_NODE_TYPES.UnaryExpression;
operator: '!' | '+' | '~' | '-' | 'delete' | 'typeof' | 'void';
operator: '!' | '+' | '-' | 'delete' | 'typeof' | 'void' | '~';
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/jsx/JSXOpeningElement/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,8 @@ import type { JSXSpreadAttribute } from '../JSXSpreadAttribute/spec';

export interface JSXOpeningElement extends BaseNode {
type: AST_NODE_TYPES.JSXOpeningElement;
typeArguments: TSTypeParameterInstantiation | undefined;
attributes: (JSXAttribute | JSXSpreadAttribute)[];
name: JSXTagNameExpression;
selfClosing: boolean;
typeArguments: TSTypeParameterInstantiation | undefined;
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/parameter/ArrayPattern/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,8 +6,8 @@ import type { DestructuringPattern } from '../../unions/DestructuringPattern';

export interface ArrayPattern extends BaseNode {
type: AST_NODE_TYPES.ArrayPattern;
typeAnnotation: TSTypeAnnotation | undefined;
decorators: Decorator[];
elements: (DestructuringPattern | null)[];
optional: boolean;
typeAnnotation: TSTypeAnnotation | undefined;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,9 @@ import type { Expression } from '../../unions/Expression';

export interface AssignmentPattern extends BaseNode {
type: AST_NODE_TYPES.AssignmentPattern;
typeAnnotation: TSTypeAnnotation | undefined;
decorators: Decorator[];
left: BindingName;
optional: boolean;
right: Expression;
typeAnnotation: TSTypeAnnotation | undefined;
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/parameter/ObjectPattern/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,8 @@ import type { RestElement } from '../RestElement/spec';

export interface ObjectPattern extends BaseNode {
type: AST_NODE_TYPES.ObjectPattern;
typeAnnotation: TSTypeAnnotation | undefined;
decorators: Decorator[];
optional: boolean;
properties: (Property | RestElement)[];
typeAnnotation: TSTypeAnnotation | undefined;
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/parameter/RestElement/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,9 @@ import type { AssignmentPattern } from '../AssignmentPattern/spec';

export interface RestElement extends BaseNode {
type: AST_NODE_TYPES.RestElement;
typeAnnotation: TSTypeAnnotation | undefined;
argument: DestructuringPattern;
decorators: Decorator[];
optional: boolean;
typeAnnotation: TSTypeAnnotation | undefined;
value: AssignmentPattern | undefined;
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/type/TSImportType/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,8 @@ import type { TypeNode } from '../../unions/TypeNode';

export interface TSImportType extends BaseNode {
type: AST_NODE_TYPES.TSImportType;
typeArguments: TSTypeParameterInstantiation | null;
argument: TypeNode;
options: ObjectExpression | null;
qualifier: EntityName | null;
typeArguments: TSTypeParameterInstantiation | null;
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/type/TSMappedType/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,12 +6,12 @@ import type { TypeNode } from '../../unions/TypeNode';

export interface TSMappedType extends BaseNode {
type: AST_NODE_TYPES.TSMappedType;
typeAnnotation: TypeNode | undefined;
constraint: TypeNode;
key: Identifier;
nameType: TypeNode | null;
optional: boolean | '+' | '-' | undefined;
readonly: boolean | '+' | '-' | undefined;
typeAnnotation: TypeNode | undefined;
/** @deprecated Use {@link `constraint`} and {@link `key`} instead. */
typeParameter: TSTypeParameter;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,6 +5,6 @@ import type { TypeNode } from '../../unions/TypeNode';

export interface TSTemplateLiteralType extends BaseNode {
type: AST_NODE_TYPES.TSTemplateLiteralType;
quasis: TemplateElement[];
types: TypeNode[];
quasis: TemplateElement[];
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/type/TSTypeOperator/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,6 @@ import type { TypeNode } from '../../unions/TypeNode';

export interface TSTypeOperator extends BaseNode {
type: AST_NODE_TYPES.TSTypeOperator;
operator: 'keyof' | 'readonly' | 'unique';
typeAnnotation: TypeNode | undefined;
operator: 'keyof' | 'readonly' | 'unique';
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/type/TSTypePredicate/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ import type { TSThisType } from '../TSThisType/spec';

export interface TSTypePredicate extends BaseNode {
type: AST_NODE_TYPES.TSTypePredicate;
typeAnnotation: TSTypeAnnotation | null;
asserts: boolean;
parameterName: Identifier | TSThisType;
typeAnnotation: TSTypeAnnotation | null;
}
2 changes: 1 addition & 1 deletionpackages/ast-spec/src/type/TSTypeQuery/spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,6 @@ import type { TSImportType } from '../TSImportType/spec';

export interface TSTypeQuery extends BaseNode {
type: AST_NODE_TYPES.TSTypeQuery;
exprName: EntityName | TSImportType;
typeArguments: TSTypeParameterInstantiation | undefined;
exprName: EntityName | TSImportType;
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,11 +23,11 @@ export default createRule({
name: __filename,
meta: {
type: 'problem',
fixable: 'code',
docs: {
description:
'Enforce consistent debug() namespaces based on package name and file path',
},
fixable: 'code',
messages: {
mismatched:
'debug() namespace should match package and file. Use the fixer to update it.',
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,10 +10,10 @@ export default createRule({
name: __filename,
meta: {
type: 'suggestion',
fixable: 'code',
docs: {
description: 'Enforce eqeqeq preferences around nullish comparisons',
},
fixable: 'code',
hasSuggestions: true,
messages: {
unexpectedComparison:
Expand Down
6 changes: 3 additions & 3 deletionspackages/eslint-plugin-internal/src/rules/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,11 +11,11 @@ import preferASTTypesEnum from './prefer-ast-types-enum';

export default {
'debug-namespace': debugNamespace,
'eqeq-nullish': eqeqNullish,
'no-poorly-typed-ts-props': noPoorlyTypedTsProps,
'no-relative-paths-to-internal-packages': noRelativePathsToInternalPackages,
'no-typescript-default-import': noTypescriptDefaultImport,
'no-typescript-estree-import': noTypescriptEstreeImport,
'plugin-test-formatting': pluginTestFormatting,
'prefer-ast-types-enum': preferASTTypesEnum,
'eqeq-nullish': eqeqNullish,
'no-relative-paths-to-internal-packages': noRelativePathsToInternalPackages,
'plugin-test-formatting': pluginTestFormatting,
} satisfies Linter.PluginRules;
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,12 +29,12 @@ export default createRule({
name: 'no-poorly-typed-ts-props',
meta: {
type: 'problem',
fixable: 'code',
docs: {
description:
"Enforce that rules don't use TS API properties with known bad type definitions",
requiresTypeChecking: true,
},
fixable: 'code',
hasSuggestions: true,
messages: {
doNotUse: 'Do not use {{type}}.{{property}} because it is poorly typed.',
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,10 +9,10 @@ export default createRule({
name: __filename,
meta: {
type: 'problem',
fixable: 'code',
docs: {
description: 'Disallow relative paths to internal packages',
},
fixable: 'code',
messages: {
noRelativePathsToInternalPackages:
'Use absolute paths instead of relative paths to import modules in other internal packages.',
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,11 +17,11 @@ export default createRule({
name: 'no-typescript-default-import',
meta: {
type: 'problem',
fixable: 'code',
docs: {
description:
"Enforce that packages rules don't do `import ts from 'typescript';`",
},
fixable: 'code',
messages: {
noTSDefaultImport: [
"Do not use the default import for typescript. Doing so will cause the package's type definitions to do the same.",
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,10 +14,10 @@ export default createRule({
name: 'no-typescript-estree-import',
meta: {
type: 'problem',
fixable: 'code',
docs: {
description: `Enforce that eslint-plugin rules don't require anything from ${TSESTREE_NAME} or ${TYPES_NAME}`,
},
fixable: 'code',
messages: {
dontImportPackage: [
`Don't import from {{packageName}}. Everything you need should be available in ${UTILS_NAME}.`,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -114,11 +114,11 @@ export default createRule<Options, MessageIds>({
name: 'plugin-test-formatting',
meta: {
type: 'problem',
fixable: 'code',
docs: {
description: `Enforce that eslint-plugin test snippets are correctly formatted`,
requiresTypeChecking: true,
},
fixable: 'code',
messages: {
invalidFormatting:
'This snippet should be formatted correctly. Use the fixer to format the code.',
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp