Skip to content

Commit 54d286d

Browse files
committed
one-var
1 parent 5b26fca commit 54d286d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ All notable changes to this project will be documented in this file.
8080
- `no-template-curly-in-string`: Changed from `'off'` to `'error'`
8181
- `no-throw-literal`: Changed from `'off'` to `'error'`
8282
- `object-shorthand`: Enhanced with `['error', 'always', { avoidQuotes: true, ignoreConstructors: false }]`
83-
- `one-var`: Simplified to `['error', { initialized: 'never' }]`
8483
- `valid-typeof`: Added `requireStringLiterals: true` option
8584
- **Node.js Rules**: Disabled `n/no-callback-literal` (not used by antfu/eslint-config)
8685
- **prefer-node-protocol**: Changed from `n/prefer-node-protocol` to `unicorn/prefer-node-protocol` (matching antfu/eslint-config)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@eslint-sets/eslint-config",
33
"description": "Modern ESLint config with flat config support for Vue, React, Svelte, TypeScript, Next.js, Nuxt, Astro, Angular, UnoCSS and more",
4-
"version": "6.0.0-beta.4",
4+
"version": "6.0.0-beta.5",
55
"packageManager": "pnpm@9.0.6",
66
"bin": {
77
"eslint-sets": "./dist/cli/index.js"

src/configs/javascript.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,14 @@ export function javascript(options: JavaScriptOptions = {}): Linter.Config {
172172
'no-void': 'error',
173173
'no-with': 'error',
174174
'object-shorthand': ['error', 'always', { avoidQuotes: true, ignoreConstructors: false }],
175-
'one-var': ['error', { initialized: 'never' }],
175+
'one-var': [
176+
'warn',
177+
{
178+
const: 'never',
179+
let: 'always',
180+
var: 'always',
181+
},
182+
],
176183
'operator-linebreak': 'off',
177184
'prefer-arrow-callback': [
178185
'error',

0 commit comments

Comments
 (0)