diff --git a/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md b/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md index 7e0bb8c43de..8e15ac35bb3 100644 --- a/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md +++ b/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md @@ -14,6 +14,8 @@ Programmers who work with tools like [ESLint](https://eslint.org) and [Prettier] But what is an AST, why is it useful for these kinds of tools, and how does that interact with ESLint and TypeScript tooling? Let's dig in! + + ## What's an AST? _Static analysis_ tools are those that look at code without running it. diff --git a/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md b/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md index 2135f6e3b3b..5e0f1e02de5 100644 --- a/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md +++ b/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md @@ -16,7 +16,19 @@ They were added as part of the [ECMAScript Modules (ESM)](https://nodejs.org/api When writing TypeScript code with ESM, it can sometimes be desirable to import or export a type only in the type system. Code may wish to refer to a _type_, but not actually import or export a corresponding _value_. -For that purpose, TypeScript 3.8 [added type-only imports and exports](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) to the TypeScript language: +Type-only imports and exports are not emitted as runtime code when code is transpiled to JavaScript. +This brings up two questions: + +- Why would you want to use these type-only imports and exports? +- How can you enforce a project use them whenever necessary? + +Let's dig in! + + + +## Recap: Type-Only Imports and Exports + +TypeScript 3.8 [added type-only imports and exports](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) to the TypeScript language: ```ts import type { SomeThing } from './some-module.js'; @@ -41,16 +53,6 @@ TypeScript 4.5 also added [inline type qualifiers](https://www.typescriptlang.or import { type SomeType, SomeValue } from './some-module.js'; ``` -Type-only imports and exports are not emitted as runtime code when code is transpiled to JavaScript. -This brings up two questions: - -- Why would you want to use these type-only imports and exports? -- How can you enforce a project use them whenever necessary? - -Let's Dig In! - - - ## Benefits of Enforcing Type-only Imports/Exports ### Avoiding Unintentional Side Effects diff --git a/packages/website/docusaurusConfig.ts b/packages/website/docusaurusConfig.ts index cc283cfc299..3b0f04dbe80 100644 --- a/packages/website/docusaurusConfig.ts +++ b/packages/website/docusaurusConfig.ts @@ -19,6 +19,9 @@ const beforeDefaultRemarkPlugins: MDXPlugin[] = [tabsPlugin]; const githubUrl = 'https://github.com/typescript-eslint/typescript-eslint'; const presetClassicOptions: PresetClassicOptions = { + blog: { + blogSidebarCount: 'ALL', + }, docs: { id: 'rules-docs', path: '../eslint-plugin/docs/rules',