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.6.1
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.6.2
Choose a head ref
  • 6 commits
  • 10 files changed
  • 4 contributors

Commits on Dec 27, 2023

  1. chore: lint

    antfu committed Dec 27, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    dtolnay David Tolnay
    Copy the full SHA
    1cb2f9c View commit details

Commits on Dec 29, 2023

  1. Copy the full SHA
    cb651f4 View commit details

Commits on Jan 8, 2024

  1. Copy the full SHA
    6ee2e39 View commit details
  2. Copy the full SHA
    e3328a9 View commit details
  3. chore: update deps

    antfu committed Jan 8, 2024
    Copy the full SHA
    eff6c03 View commit details
  4. chore: release v2.6.2

    antfu committed Jan 8, 2024
    Copy the full SHA
    61e1bff View commit details
Showing with 394 additions and 544 deletions.
  1. +3 −0 README.md
  2. +8 −0 fixtures/input/svelte.svelte
  3. +8 −0 fixtures/output/all/svelte.svelte
  4. +16 −15 package.json
  5. +355 −527 pnpm-lock.yaml
  6. +0 −1 src/configs/imports.ts
  7. +0 −1 src/configs/jsdoc.ts
  8. +1 −0 src/configs/svelte.ts
  9. +2 −0 src/factory.ts
  10. +1 −0 test/fixtures.test.ts
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -506,6 +506,9 @@ and then

```bash
npm i -D lint-staged simple-git-hooks

// to active the hooks
npx simple-git-hooks
```

## View what rules are enabled
8 changes: 8 additions & 0 deletions fixtures/input/svelte.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script lang='ts'>
export const content = "hi!"
</script>

<article>
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
<div>{@html content}</div>
</article>
8 changes: 8 additions & 0 deletions fixtures/output/all/svelte.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script lang='ts'>
export const content = 'hi!'
</script>

<article>
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
<div>{@html content}</div>
</article>
31 changes: 16 additions & 15 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.6.1",
"packageManager": "pnpm@8.13.1",
"version": "2.6.2",
"packageManager": "pnpm@8.14.0",
"description": "Anthony's ESLint config",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
@@ -73,20 +73,20 @@
"@antfu/eslint-define-config": "^1.23.0-2",
"@antfu/install-pkg": "^0.3.1",
"@eslint-types/jsdoc": "46.8.2-1",
"@eslint-types/typescript-eslint": "^6.16.0",
"@eslint-types/typescript-eslint": "^6.17.0",
"@eslint-types/unicorn": "^50.0.1",
"@stylistic/eslint-plugin": "^1.5.1",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@stylistic/eslint-plugin": "^1.5.3",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"eslint-config-flat-gitignore": "^0.1.2",
"eslint-merge-processors": "^0.1.0",
"eslint-plugin-antfu": "^2.1.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-i": "^2.29.1",
"eslint-plugin-jsdoc": "^46.9.1",
"eslint-plugin-jsdoc": "^48.0.2",
"eslint-plugin-jsonc": "^2.11.2",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-n": "^16.5.0",
"eslint-plugin-n": "^16.6.1",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-perfectionist": "^2.5.0",
"eslint-plugin-toml": "^0.8.0",
@@ -111,16 +111,16 @@
"@antfu/eslint-config": "workspace:*",
"@antfu/eslint-plugin-prettier": "^5.0.1-1",
"@antfu/ni": "^0.21.12",
"@stylistic/eslint-plugin-migrate": "^1.5.1",
"@types/eslint": "^8.56.0",
"@stylistic/eslint-plugin-migrate": "^1.5.3",
"@types/eslint": "^8.56.1",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.10.5",
"@types/node": "^20.10.7",
"@types/prompts": "^2.4.9",
"@types/yargs": "^17.0.32",
"@unocss/eslint-plugin": "^0.58.0",
"@unocss/eslint-plugin": "^0.58.3",
"bumpp": "^9.2.1",
"eslint": "npm:eslint-ts-patch@^8.56.0-0",
"eslint-flat-config-viewer": "^0.1.3",
"eslint-flat-config-viewer": "^0.1.4",
"eslint-plugin-format": "^0.1.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
@@ -134,11 +134,12 @@
"lint-staged": "^15.2.0",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"svelte": "^4.2.8",
"svelte-eslint-parser": "^0.33.1",
"tsup": "^8.0.1",
"typescript": "^5.3.3",
"vitest": "^1.1.0",
"vue": "^3.3.13"
"vitest": "^1.1.3",
"vue": "^3.4.5"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
882 changes: 355 additions & 527 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/configs/imports.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { off } from 'node:process'
import type { FlatConfigItem, OptionsStylistic } from '../types'
import { pluginAntfu, pluginImport } from '../plugins'
import { GLOB_SRC_EXT } from '../globs'
1 change: 0 additions & 1 deletion src/configs/jsdoc.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ export async function jsdoc(options: OptionsStylistic = {}): Promise<FlatConfigI
{
name: 'antfu:jsdoc',
plugins: {
// @ts-expect-error missing types
jsdoc: await interopDefault(import('eslint-plugin-jsdoc')),
},
rules: {
1 change: 1 addition & 0 deletions src/configs/svelte.ts
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ export async function svelte(
},
},
name: 'antfu:svelte:rules',
processor: pluginSvelte.processors['.svelte'],
rules: {
'import/no-mutable-exports': 'off',
'no-undef': 'off', // incompatible with most recent (attribute-form) generic types RFC
2 changes: 2 additions & 0 deletions src/factory.ts
Original file line number Diff line number Diff line change
@@ -113,6 +113,7 @@ export async function antfu(
configs.push(typescript({
...resolveSubOptions(options, 'typescript'),
componentExts,
overrides: getOverrides(options, 'typescript'),
}))
}

@@ -133,6 +134,7 @@ export async function antfu(
if (enableVue) {
configs.push(vue({
...resolveSubOptions(options, 'vue'),
overrides: getOverrides(options, 'vue'),
stylistic: stylisticOptions,
typescript: !!enableTypeScript,
}))
1 change: 1 addition & 0 deletions test/fixtures.test.ts
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ runWithConfig('js', {
runWithConfig('all', {
typescript: true,
vue: true,
svelte: true,
})
runWithConfig('no-style', {
typescript: true,