Skip to content

Commit

Permalink
Merge branch 'main' into fix-explicit-member-accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Aug 24, 2022
2 parents 6395b8f + 1b2601a commit 5471380
Show file tree
Hide file tree
Showing 25 changed files with 1,109 additions and 1,569 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 @@ -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 deletions packages/eslint-plugin/src/rules/ban-ts-comment.ts
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 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 @@ -68,20 +68,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
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 @@ -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
Expand Up @@ -397,6 +397,11 @@ tester.addFixturePatternConfig('typescript/basics', {
* SyntaxError: Missing initializer in const declaration.
*/
'var-with-definite-assignment',
/**
* [BABEL ERRORED, BUT TS-ESTREE DID NOT]
* SyntaxError: A JSON module can only be imported with `default`.
*/
'export-with-import-assertions',
],
ignoreSourceType: [
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/website/docusaurusConfig.ts
Expand Up @@ -55,8 +55,8 @@ const pluginContentDocsOptions: PluginContentDocsOptions = {

const themeConfig: ThemeCommonConfig & AlgoliaThemeConfig = {
algolia: {
appId: 'BH4D9OD16A',
apiKey: '1ad6b47d4e742c4c0653877b5511c602',
appId: 'N1HUB2TU6A',
apiKey: '74d42ed10d0f7b327d74d774570035c7',
indexName: 'typescript-eslint',
},
metadata: [
Expand Down
12 changes: 6 additions & 6 deletions packages/website/package.json
Expand Up @@ -15,10 +15,10 @@
},
"dependencies": {
"@babel/runtime": "^7.18.3",
"@docusaurus/core": "2.0.0-beta.21",
"@docusaurus/preset-classic": "2.0.0-beta.21",
"@docusaurus/remark-plugin-npm2yarn": "2.0.0-beta.21",
"@docusaurus/theme-common": "2.0.0-beta.21",
"@docusaurus/core": "~2.0.1",
"@docusaurus/preset-classic": "~2.0.1",
"@docusaurus/remark-plugin-npm2yarn": "~2.0.1",
"@docusaurus/theme-common": "~2.0.1",
"@mdx-js/react": "1.6.22",
"@typescript-eslint/parser": "5.34.0",
"@typescript-eslint/website-eslint": "5.34.0",
Expand All @@ -37,7 +37,7 @@
"typescript": "*"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.0.0-beta.21",
"@docusaurus/module-type-aliases": "~2.0.1",
"@types/react": "^18.0.9",
"@types/react-helmet": "^6.1.5",
"@types/react-router-dom": "^5.3.3",
Expand All @@ -50,7 +50,7 @@
"eslint-plugin-react-hooks": "^4.5.0",
"globby": "^11.1.0",
"monaco-editor": "^0.33.0",
"webpack": "^5.72.1"
"webpack": "^5.74.0"
},
"browserslist": {
"production": [
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/components/ErrorsViewer.tsx
Expand Up @@ -3,7 +3,7 @@ import type Monaco from 'monaco-editor';
import clsx from 'clsx';

import type { ErrorItem, ErrorGroup } from './types';
import IconExternalLink from '@theme/IconExternalLink';
import IconExternalLink from '@theme/Icon/ExternalLink';
import styles from './ErrorsViewer.module.css';

export interface ErrorsViewerProps {
Expand Down
6 changes: 5 additions & 1 deletion packages/website/src/pages/play.tsx
Expand Up @@ -8,7 +8,11 @@ function Play(): JSX.Element {
<Layout title="Playground" description="Playground" noFooter={true}>
<BrowserOnly fallback={<Loader />}>
{(): JSX.Element => {
const Playground = lazy(() => import('../components/Playground'));
const Playground = lazy(
() =>
// @ts-expect-error: This does not follow Node resolution
import('../components/Playground') as Promise<() => JSX.Element>,
);
return (
<Suspense fallback={<Loader />}>
<Playground />
Expand Down
5 changes: 2 additions & 3 deletions packages/website/src/theme/CodeBlock/Content/String.tsx
Expand Up @@ -2,15 +2,14 @@

import React from 'react';
import clsx from 'clsx';
import { useThemeConfig, usePrismTheme } from '@docusaurus/theme-common';
import {
useThemeConfig,
parseCodeBlockTitle,
parseLanguage,
parseLines,
containsLineNumbers,
usePrismTheme,
useCodeWordWrap,
} from '@docusaurus/theme-common';
} from '@docusaurus/theme-common/internal';
import Highlight, { defaultProps, type Language } from 'prism-react-renderer';
import Line from '@theme/CodeBlock/Line';
import CopyButton from '@theme/CodeBlock/CopyButton';
Expand Down
4 changes: 2 additions & 2 deletions packages/website/tsconfig.json
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"module": "CommonJS",
"moduleResolution": "NodeNext",
"allowJs": true,
"esModuleInterop": true,
"jsx": "react",
Expand Down

0 comments on commit 5471380

Please sign in to comment.