diff --git a/README.md b/README.md index c31a50b..ac2de35 100644 --- a/README.md +++ b/README.md @@ -27,40 +27,51 @@ Please also make sure that you have `typescript` and `eslint` installed. Because of the complexity of this config, it is exported as a factory function that takes an options object and returns an ESLint configuration object. +This package exports 2 utility functions: + +- `defineConfig`, as a re-export of the [`config` function from `typescript-eslint`](https://typescript-eslint.io/packages/typescript-eslint#config). +- `createConfig`, used for creating an ESLint configuration array that extends from the [`typescript-eslint` shared configs](https://typescript-eslint.io/users/configs). + ### Minimal Setup ```js // eslint.config.mjs -import pluginVue from "eslint-plugin-vue"; -import vueTsEslintConfig from "@vue/eslint-config-typescript"; - -export default [ - ...pluginVue.configs["flat/essential"], - ...vueTsEslintConfig(), -] +import pluginVue from 'eslint-plugin-vue' +import { + defineConfig, + createConfig as vueTsEslintConfig, +} from '@vue/eslint-config-typescript' + +export default defineConfig( + pluginVue.configs['flat/essential'], + vueTsEslintConfig(), +) ``` The above configuration enables [the essential rules for Vue 3](https://eslint.vuejs.org/rules/#priority-a-essential-error-prevention) and [the recommended rules for TypeScript](https://typescript-eslint.io/rules/?=recommended). -All the `