Skip to content

Commit

Permalink
docs: update readme to include flat config usage (43081j#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
43081j authored Jun 17, 2024
1 parent 0928591 commit 406b902
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ Then extend the recommended eslint config:
}
```

Or if you're using (flat) config files, add to your `eslint.config.js`:

```ts
import {configs} from 'eslint-plugin-lit';

export default [
configs['flat/recommended'],

// or if you want to specify `files`, or other options
{
...configs['flat/recommended'],
files: ['test/**/*.js']
}
];
```

### Custom Configuration

If you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:
Expand Down

0 comments on commit 406b902

Please sign in to comment.