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) {