Skip to content

Commit

Permalink
Merge branch 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Aug 24, 2022
2 parents 74b7d44 + 7d402f3 commit 392d84e
Show file tree
Hide file tree
Showing 26 changed files with 2,311 additions and 1,603 deletions.
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportNamedDeclaration _error_ assertion TSESTree - Error 1`] = `"NO ERROR"`;
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportNamedDeclaration _error_ assertion Babel - Error 1`] = `[SyntaxError: A JSON module can only be imported with \`default\`. (1:9)]`;
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportNamedDeclaration _error_ assertion Error Alignment 1`] = `"Babel errored but TSESTree didn't"`;
Expand Up @@ -9,6 +9,7 @@ Object {
"declaration/ExportAllDeclaration/fixtures/_error_/kind-type/fixture.ts",
"declaration/ExportAllDeclaration/fixtures/_error_/type-kind/fixture.ts",
"declaration/ExportNamedDeclaration/fixtures/_error_/anonymous-class/fixture.ts",
"declaration/ExportNamedDeclaration/fixtures/_error_/assertion/fixture.ts",
"declaration/FunctionDeclaration/fixtures/_error_/missing-type-param/fixture.ts",
"declaration/TSDeclareFunction/fixtures/_error_/async/fixture.ts",
"declaration/TSDeclareFunction/fixtures/_error_/declare-with-body/fixture.ts",
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin/src/rules/array-type.ts
Expand Up @@ -103,7 +103,7 @@ export default util.createRule<Options, MessageIds>({
"Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden for non-simple types. Use '{{className}}<{{type}}>' instead.",
},
schema: {
definitions: {
$defs: {
arrayOption: {
enum: ['array', 'generic', 'array-simple'],
},
Expand All @@ -112,11 +112,11 @@ export default util.createRule<Options, MessageIds>({
{
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 deletions packages/eslint-plugin/src/rules/ban-ts-comment.ts
Expand Up @@ -39,7 +39,7 @@ export default util.createRule<[Options], MessageIds>({
'The description for the "@ts-{{directive}}" directive must match the {{format}} format.',
},
schema: {
definitions: {
$defs: {
directiveConfigSchema: {
oneOf: [
{
Expand All @@ -62,11 +62,11 @@ export default util.createRule<[Options], MessageIds>({
{
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 deletions packages/eslint-plugin/src/rules/comma-dangle.ts
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
Expand Up @@ -62,23 +62,23 @@ export default util.createRule<Options, MessageIds>({
'Public accessibility modifier on {{type}} {{name}}.',
},
schema: {
definitions: {
$defs: {
accessibilityLevel,
},
prefixItems: [
{
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' },
accessors: { $ref: '#/$defs/accessibilityLevel' },
constructors: { $ref: '#/$defs/accessibilityLevel' },
methods: { $ref: '#/$defs/accessibilityLevel' },
properties: { $ref: '#/$defs/accessibilityLevel' },
parameterProperties: {
$ref: '#/definitions/accessibilityLevel',
$ref: '#/$defs/accessibilityLevel',
},
},

Expand Down
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 deletions packages/eslint-plugin/src/rules/parameter-properties.ts
Expand Up @@ -37,7 +37,7 @@ export default util.createRule<Options, MessageIds>({
'Property {{parameter}} should be declared as a parameter property.',
},
schema: {
definitions: {
$defs: {
modifier: {
enum: [
'readonly',
Expand All @@ -57,7 +57,7 @@ export default util.createRule<Options, MessageIds>({
allow: {
type: 'array',
items: {
$ref: '#/definitions/modifier',
$ref: '#/$defs/modifier',
},
minItems: 1,
},
Expand Down

0 comments on commit 392d84e

Please sign in to comment.