Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: antfu/eslint-config
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.13.3
Choose a base ref
...
head repository: antfu/eslint-config
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.13.4
Choose a head ref
  • 8 commits
  • 8 files changed
  • 4 contributors

Commits on Apr 12, 2024

  1. fix: file pattern for htm files (#447)

    Bernankez authored Apr 12, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    targos Michaël Zasso
    Copy the full SHA
    b6e9a58 View commit details
  2. docs: rename composer

    antfu committed Apr 12, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    MylesBorins Myles Borins
    Copy the full SHA
    3175362 View commit details
  3. docs: explain how to configure the Vue version (#448)

    Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
    cloydlau and antfu authored Apr 12, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    BethGriggs Bethany Griggs
    Copy the full SHA
    a546bbc View commit details

Commits on Apr 15, 2024

  1. chore: update deps

    antfu committed Apr 15, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    BethGriggs Bethany Griggs
    Copy the full SHA
    d361a2e View commit details
  2. feat: improve types support

    antfu committed Apr 15, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    BethGriggs Bethany Griggs
    Copy the full SHA
    6a7df74 View commit details
  3. chore: fix build

    antfu committed Apr 15, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    BethGriggs Bethany Griggs
    Copy the full SHA
    7d275a6 View commit details
  4. feat(svelte): add support for typing according to sveltejs/rfcs#38 (#450

    )
    kelvindecosta authored Apr 15, 2024
    Copy the full SHA
    e075210 View commit details
  5. chore: release v2.13.4

    antfu committed Apr 15, 2024
    Copy the full SHA
    f819499 View commit details
Showing with 257 additions and 228 deletions.
  1. +33 −3 README.md
  2. +16 −16 package.json
  3. +186 −186 pnpm-lock.yaml
  4. +8 −1 scripts/typegen.ts
  5. +2 −2 src/configs/formatters.ts
  6. +2 −2 src/configs/svelte.ts
  7. +7 −7 src/factory.ts
  8. +3 −11 src/types.ts
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -331,7 +331,7 @@ export default antfu(
)
```

We also provided a `overrides` options in each integration to make it easier:
We also provided the `overrides` options in each integration to make it easier:

```js
// eslint.config.js
@@ -356,9 +356,9 @@ export default antfu({
})
```

### Pipeline
### Config Composer

Since v2.10.0, the factory function `antfu()` returns a [pipeline object from `eslint-flat-config-utils`](https://github.com/antfu/eslint-flat-config-utils#pipe) where you can chain the methods to compose the config even more flexibly.
Since v2.10.0, the factory function `antfu()` returns a [`FlatConfigComposer` object from `eslint-flat-config-utils`](https://github.com/antfu/eslint-flat-config-utils#composer) where you can chain the methods to compose the config even more flexibly.

```js
// eslint.config.js
@@ -385,6 +385,36 @@ export default antfu()
// ...
```

### Vue

Vue support is detected automatically by checking if `vue` is installed in your project. You can also explicitly enable/disable it:

```js
// eslint.config.js
import antfu from '@antfu/eslint-config'

export default antfu({
vue: true
})
```

#### Vue 2

We have limited support for Vue 2 (as it's already [reached EOL](https://v2.vuejs.org/eol/)). If you are still using Vue 2, you can configure it manually by setting `vueVersion` to `2`:

```js
// eslint.config.js
import antfu from '@antfu/eslint-config'

export default antfu({
vue: {
vueVersion: 2
},
})
```

As it's in maintenance mode, we only accept bug fixes for Vue 2. It might also be removed in the future when `eslint-plugin-vue` drops support for Vue 2. We recommend upgrading to Vue 3 if possible.

### Optional Configs

We provide some optional configs for specific use cases, that we don't include their dependencies by default.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@antfu/eslint-config",
"type": "module",
"version": "2.13.3",
"packageManager": "pnpm@8.15.6",
"version": "2.13.4",
"packageManager": "pnpm@8.15.7",
"description": "Anthony's ESLint config",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
@@ -98,22 +98,22 @@
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"eslint-config-flat-gitignore": "^0.1.5",
"eslint-flat-config-utils": "^0.2.1",
"eslint-flat-config-utils": "^0.2.3",
"eslint-merge-processors": "^0.1.0",
"eslint-plugin-antfu": "^2.1.2",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import-x": "^0.5.0",
"eslint-plugin-jsdoc": "^48.2.3",
"eslint-plugin-jsonc": "^2.15.0",
"eslint-plugin-jsonc": "^2.15.1",
"eslint-plugin-markdown": "^4.0.1",
"eslint-plugin-n": "^17.1.0",
"eslint-plugin-n": "^17.2.1",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-perfectionist": "^2.8.0",
"eslint-plugin-perfectionist": "^2.9.0",
"eslint-plugin-toml": "^0.11.0",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-unused-imports": "^3.1.0",
"eslint-plugin-vitest": "^0.5.1",
"eslint-plugin-vue": "^9.24.1",
"eslint-plugin-vitest": "^0.5.3",
"eslint-plugin-vue": "^9.25.0",
"eslint-plugin-yml": "^1.14.0",
"eslint-processor-vue-blocks": "^0.1.1",
"globals": "^15.0.0",
@@ -130,14 +130,14 @@
"@antfu/eslint-config": "workspace:*",
"@antfu/eslint-plugin-prettier": "^5.0.1-1",
"@antfu/ni": "^0.21.12",
"@eslint/config-inspector": "^0.4.5",
"@eslint/config-inspector": "^0.4.6",
"@stylistic/eslint-plugin-migrate": "^1.7.0",
"@types/eslint": "^8.56.7",
"@types/eslint": "^8.56.9",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.12.6",
"@types/node": "^20.12.7",
"@types/prompts": "^2.4.9",
"@types/yargs": "^17.0.32",
"@unocss/eslint-plugin": "^0.59.0",
"@unocss/eslint-plugin": "^0.59.2",
"astro-eslint-parser": "^0.17.0",
"bumpp": "^9.4.0",
"bundle-require": "^4.0.2",
@@ -149,7 +149,7 @@
"eslint-plugin-react-refresh": "^0.4.6",
"eslint-plugin-solid": "^0.13.2",
"eslint-plugin-svelte": "2.36.0-next.13",
"eslint-typegen": "^0.2.2",
"eslint-typegen": "^0.2.3",
"esno": "^4.7.0",
"execa": "^8.0.1",
"fast-glob": "^3.3.2",
@@ -159,11 +159,11 @@
"prettier-plugin-slidev": "^1.0.5",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.11.1",
"svelte": "^4.2.12",
"svelte": "^4.2.14",
"svelte-eslint-parser": "^0.34.1",
"tsup": "^8.0.2",
"typescript": "^5.4.4",
"vitest": "^1.4.0",
"typescript": "^5.4.5",
"vitest": "^1.5.0",
"vue": "^3.4.21"
},
"simple-git-hooks": {
Loading