diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35aeb5f..178878f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ on: push: branches: - '**' + - '!renovate/**' paths-ignore: - README.md pull_request: @@ -29,7 +30,7 @@ jobs: submodules: 'recursive' - uses: pnpm/action-setup@v3 with: - version: 8 + version: 9 - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9c8ed19..b729f93 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,11 +15,14 @@ jobs: id-token: write steps: - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 'lts/*' registry-url: 'https://registry.npmjs.org' - run: pnpm install - - run: pnpm publish + - run: pnpm publish --no-git-checks env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 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 `