Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

docs(readme): remove extra code blocks #58

Merged
merged 1 commit into from
Aug 18, 2024
Merged
Changes from all 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
38 changes: 0 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,6 @@ bun i -D @archoleat/eslint-flat-compatibility

### Before

```js
import { resolve } from 'node:path';

import { defineFlatConfig } from 'eslint-define-config';
import { FlatCompat } from '@eslint/eslintrc';

const compat = new FlatCompat({
baseDirectory: resolve(),
resolvePluginsRelativeTo: resolve(),
});

export default defineFlatConfig([
...compat.extends(
'airbnb-typescript/base',
'plugin:import/recommended',
'plugin:import/typescript',
),
// ...
```

or

```js
import { fileURLToPath } from 'url';
import path from 'path';
Expand All @@ -77,22 +55,6 @@ export default defineFlatConfig([

## After

```js
import { defineFlatConfig } from 'eslint-define-config';
import { extend } from '@archoleat/eslint-flat-compatibility';

export default defineFlatConfig([
// Mimic extends
...extend(
'airbnb-typescript/base',
'plugin:import/recommended',
'plugin:import/typescript',
),
// ...
```

Also available:

```js
import { config, env, extend, plugins } from '@archoleat/eslint-flat-compatibility';
import { defineFlatConfig } from 'eslint-define-config';
Expand Down