File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @intlify/eslint-plugin-vue-i18n " : minor
3+ ---
4+
5+ Improved to apply no-dynamic-keys rule to non-Vue files as well.
Original file line number Diff line number Diff line change 11/**
22 * @author kazuya kawaguchi (a.k.a. kazupon)
33 */
4- import { defineTemplateBodyVisitor , isStaticLiteral } from '../utils/index'
4+ import {
5+ compositingVisitors ,
6+ defineTemplateBodyVisitor ,
7+ isStaticLiteral
8+ } from '../utils/index'
59import type { RuleContext , RuleListener } from '../types'
610import type { AST as VAST } from 'vue-eslint-parser'
711import { createRule } from '../utils/rule'
@@ -93,9 +97,8 @@ function checkCallExpression(
9397}
9498
9599function create ( context : RuleContext ) : RuleListener {
96- return defineTemplateBodyVisitor (
97- context ,
98- {
100+ return compositingVisitors (
101+ defineTemplateBodyVisitor ( context , {
99102 "VAttribute[directive=true][key.name='t']" ( node : VAST . VDirective ) {
100103 checkDirective ( context , node )
101104 } ,
@@ -113,7 +116,7 @@ function create(context: RuleContext): RuleListener {
113116 CallExpression ( node : VAST . ESLintCallExpression ) {
114117 checkCallExpression ( context , node )
115118 }
116- } ,
119+ } ) ,
117120 {
118121 CallExpression ( node : VAST . ESLintCallExpression ) {
119122 checkCallExpression ( context , node )
You can’t perform that action at this time.
0 commit comments