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(eslint-plugin): use defs, not definitions, in rule schemas#5534

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

Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletionspackages/eslint-plugin/src/rules/array-type.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -104,18 +104,18 @@ export default util.createRule<Options, MessageIds>({
},
schema: [
{
definitions: {
$defs: {
arrayOption: {
enum: ['array', 'generic', 'array-simple'],
},
},
properties: {
default: {
$ref: '#/definitions/arrayOption',
$ref: '#/$defs/arrayOption',
description: 'The array type expected for mutable cases...',
},
readonly: {
$ref: '#/definitions/arrayOption',
$ref: '#/$defs/arrayOption',
description:
'The array type expected for readonly cases. If omitted, the value for `default` will be used.',
},
Expand Down
10 changes: 5 additions & 5 deletionspackages/eslint-plugin/src/rules/ban-ts-comment.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,7 @@ export default util.createRule<[Options], MessageIds>({
},
schema: [
{
definitions: {
$defs: {
directiveConfigSchema: {
oneOf: [
{
Expand All@@ -62,11 +62,11 @@ export default util.createRule<[Options], MessageIds>({
type: 'object',
properties: {
'ts-expect-error': {
$ref: '#/definitions/directiveConfigSchema',
$ref: '#/$defs/directiveConfigSchema',
},
'ts-ignore': { $ref: '#/definitions/directiveConfigSchema' },
'ts-nocheck': { $ref: '#/definitions/directiveConfigSchema' },
'ts-check': { $ref: '#/definitions/directiveConfigSchema' },
'ts-ignore': { $ref: '#/$defs/directiveConfigSchema' },
'ts-nocheck': { $ref: '#/$defs/directiveConfigSchema' },
'ts-check': { $ref: '#/$defs/directiveConfigSchema' },
minimumDescriptionLength: {
type: 'number',
default: defaultMinimumDescriptionLength,
Expand Down
20 changes: 10 additions & 10 deletionspackages/eslint-plugin/src/rules/comma-dangle.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,7 +46,7 @@ export default util.createRule<Options, MessageIds>({
extendsBaseRule: true,
},
schema: {
definitions: {
$defs: {
value: {
enum: OPTION_VALUE_SCHEME,
},
Expand All@@ -59,19 +59,19 @@ export default util.createRule<Options, MessageIds>({
{
oneOf: [
{
$ref: '#/definitions/value',
$ref: '#/$defs/value',
},
{
type: 'object',
properties: {
arrays: { $ref: '#/definitions/valueWithIgnore' },
objects: { $ref: '#/definitions/valueWithIgnore' },
imports: { $ref: '#/definitions/valueWithIgnore' },
exports: { $ref: '#/definitions/valueWithIgnore' },
functions: { $ref: '#/definitions/valueWithIgnore' },
enums: { $ref: '#/definitions/valueWithIgnore' },
generics: { $ref: '#/definitions/valueWithIgnore' },
tuples: { $ref: '#/definitions/valueWithIgnore' },
arrays: { $ref: '#/$defs/valueWithIgnore' },
objects: { $ref: '#/$defs/valueWithIgnore' },
imports: { $ref: '#/$defs/valueWithIgnore' },
exports: { $ref: '#/$defs/valueWithIgnore' },
functions: { $ref: '#/$defs/valueWithIgnore' },
enums: { $ref: '#/$defs/valueWithIgnore' },
generics: { $ref: '#/$defs/valueWithIgnore' },
tuples: { $ref: '#/$defs/valueWithIgnore' },
},
additionalProperties: false,
},
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,20 +63,20 @@ export default util.createRule<Options, MessageIds>({
},
schema: [
{
definitions: {
$defs: {
accessibilityLevel,
},
type: 'object',
properties: {
accessibility: { $ref: '#/definitions/accessibilityLevel' },
accessibility: { $ref: '#/$defs/accessibilityLevel' },
overrides: {
type: 'object',
properties: {
accessors: { $ref: '#/definitions/accessibilityLevel' },
constructors: { $ref: '#/definitions/accessibilityLevel' },
methods: { $ref: '#/definitions/accessibilityLevel' },
properties: { $ref: '#/definitions/accessibilityLevel' },
parameterProperties: { $ref: '#/definitions/accessibilityLevel' },
accessors: { $ref: '#/$defs/accessibilityLevel' },
constructors: { $ref: '#/$defs/accessibilityLevel' },
methods: { $ref: '#/$defs/accessibilityLevel' },
properties: { $ref: '#/$defs/accessibilityLevel' },
parameterProperties: { $ref: '#/$defs/accessibilityLevel' },
},

additionalProperties: false,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -594,7 +594,7 @@ export default util.createRule<Options, MessageIds>({
fixable: 'whitespace',
hasSuggestions: false,
schema: {
definitions: {
$defs: {
paddingType: {
enum: Object.keys(PaddingTypes),
},
Expand All@@ -615,9 +615,9 @@ export default util.createRule<Options, MessageIds>({
items: {
type: 'object',
properties: {
blankLine: { $ref: '#/definitions/paddingType' },
prev: { $ref: '#/definitions/statementType' },
next: { $ref: '#/definitions/statementType' },
blankLine: { $ref: '#/$defs/paddingType' },
prev: { $ref: '#/$defs/statementType' },
next: { $ref: '#/$defs/statementType' },
},
additionalProperties: false,
required: ['blankLine', 'prev', 'next'],
Expand Down
4 changes: 2 additions & 2 deletionspackages/eslint-plugin/src/rules/parameter-properties.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,7 +38,7 @@ export default util.createRule<Options, MessageIds>({
},
schema: [
{
definitions: {
$defs: {
modifier: {
enum: [
'readonly',
Expand All@@ -56,7 +56,7 @@ export default util.createRule<Options, MessageIds>({
allow: {
type: 'array',
items: {
$ref: '#/definitions/modifier',
$ref: '#/$defs/modifier',
},
minItems: 1,
},
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp