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.0
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.1
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 9, 2024

  1. feat: improve no-unused-vars options

    antfu committed Apr 9, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1e091eb View commit details
  2. feat: update deps

    antfu committed Apr 9, 2024
    Copy the full SHA
    486609b View commit details
  3. chore: release v2.13.1

    antfu committed Apr 9, 2024
    Copy the full SHA
    e4d71a9 View commit details
Showing with 238 additions and 187 deletions.
  1. +9 −9 package.json
  2. +222 −176 pnpm-lock.yaml
  3. +7 −2 src/configs/javascript.ts
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@antfu/eslint-config",
"type": "module",
"version": "2.13.0",
"version": "2.13.1",
"packageManager": "pnpm@8.15.6",
"description": "Anthony's ESLint config",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
@@ -95,8 +95,8 @@
"@antfu/install-pkg": "^0.3.2",
"@clack/prompts": "^0.7.0",
"@stylistic/eslint-plugin": "^1.7.0",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@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-merge-processors": "^0.1.0",
@@ -106,13 +106,13 @@
"eslint-plugin-jsdoc": "^48.2.3",
"eslint-plugin-jsonc": "^2.15.0",
"eslint-plugin-markdown": "^4.0.1",
"eslint-plugin-n": "^17.0.0",
"eslint-plugin-n": "^17.1.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-perfectionist": "^2.8.0",
"eslint-plugin-toml": "^0.11.0",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-unused-imports": "^3.1.0",
"eslint-plugin-vitest": "^0.4.1",
"eslint-plugin-vitest": "^0.5.0",
"eslint-plugin-vue": "^9.24.1",
"eslint-plugin-yml": "^1.14.0",
"eslint-processor-vue-blocks": "^0.1.1",
@@ -130,11 +130,11 @@
"@antfu/eslint-config": "workspace:*",
"@antfu/eslint-plugin-prettier": "^5.0.1-1",
"@antfu/ni": "^0.21.12",
"@eslint/config-inspector": "^0.4.1",
"@eslint/config-inspector": "^0.4.4",
"@stylistic/eslint-plugin-migrate": "^1.7.0",
"@types/eslint": "^8.56.7",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.12.5",
"@types/node": "^20.12.6",
"@types/prompts": "^2.4.9",
"@types/yargs": "^17.0.32",
"@unocss/eslint-plugin": "^0.59.0",
@@ -148,7 +148,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.0",
"eslint-typegen": "^0.2.1",
"esno": "^4.7.0",
"execa": "^8.0.1",
"fast-glob": "^3.3.2",
@@ -159,7 +159,7 @@
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.11.1",
"svelte": "^4.2.12",
"svelte-eslint-parser": "^0.34.0",
"svelte-eslint-parser": "^0.34.1",
"tsup": "^8.0.2",
"typescript": "^5.4.4",
"vitest": "^1.4.0",
398 changes: 222 additions & 176 deletions pnpm-lock.yaml
9 changes: 7 additions & 2 deletions src/configs/javascript.ts
Original file line number Diff line number Diff line change
@@ -201,10 +201,15 @@ export async function javascript(
'symbol-description': 'error',
'unicode-bom': ['error', 'never'],
'unused-imports/no-unused-imports': isInEditor ? 'off' : 'error',

'unused-imports/no-unused-vars': [
'error',
{ args: 'after-used', argsIgnorePattern: '^_', vars: 'all', varsIgnorePattern: '^_' },
{
args: 'after-used',
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
vars: 'all',
varsIgnorePattern: '^_',
},
],
'use-isnan': ['error', { enforceForIndexOf: true, enforceForSwitchCase: true }],
'valid-typeof': ['error', { requireStringLiterals: true }],