From 37cb429487179ecc7b59d547fc2b8ebd109d09cd Mon Sep 17 00:00:00 2001 From: Kevin Deng Date: Sun, 14 Dec 2025 17:41:27 +0800 Subject: [PATCH] feat!: rename `prefer-inline` to `preferInline` --- src/rules/no-duplicates.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rules/no-duplicates.ts b/src/rules/no-duplicates.ts index ecd8c9d..15a03e1 100644 --- a/src/rules/no-duplicates.ts +++ b/src/rules/no-duplicates.ts @@ -5,7 +5,7 @@ import type { RuleContext } from '@typescript-eslint/utils/ts-eslint' export type Options = [ { considerQueryString?: boolean - 'prefer-inline'?: boolean + preferInline?: boolean }?, ] @@ -114,7 +114,7 @@ function getFix( } // pre-caculate preferInline before actual fix function - const preferInline = context.options[0] && context.options[0]['prefer-inline'] + const preferInline = context.options[0] && context.options[0].preferInline return (fixer: TSESLint.RuleFixer) => { const tokens = sourceCode.getTokens(first) @@ -388,7 +388,7 @@ export default createEslintRule({ considerQueryString: { type: 'boolean', }, - 'prefer-inline': { + preferInline: { type: 'boolean', }, }, @@ -401,7 +401,7 @@ export default createEslintRule({ }, defaultOptions: [], create(context) { - const preferInline = context.options[0]?.['prefer-inline'] + const preferInline = context.options[0]?.preferInline const moduleMaps = new Map() function getImportMap(n: TSESTree.ImportDeclaration) { -- 2.51.2