diff --git a/README.md b/README.md index 3dd47c60..d3ee0605 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,9 @@ It is expected that most version bumps will be major. ## Example config -Here is an example `eslint.config.js`. +Here are example [ESLint configuration files](https://eslint.org/docs/latest/use/configure/configuration-files). + +ECMAScript Modules: ```js import love from 'eslint-config-love' @@ -44,6 +46,21 @@ export default [ ] ``` +CommonJS: + +```js +module.exports = (async function config() { + const { default: love } = await import('eslint-config-love') + + return [ + { + ...love, + files: ['**/*.js', '**/*.ts'], + }, + ] +})() +``` + [Learn how to configure ESLint](https://eslint.org/docs/latest/use/configure/). Note: the config exported by this package sets `languageOptions.parserOptions.project = true`.