Skip to content

Commit 61e695c

Browse files
committed
:t-shirt: refactor: fix typo
closes #13
1 parent 69e16a6 commit 61e695c

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

lib/rules/no-html-messages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
const { extname } = require('path')
77
const parse5 = require('parse5')
88
const {
9-
UNEXPETECD_ERROR_LOCATION,
9+
UNEXPECTED_ERROR_LOCATION,
1010
findExistLocaleMessage,
1111
getLocaleMessages,
1212
extractJsonInfo,
@@ -48,7 +48,7 @@ function create (context) {
4848
const { settings } = context
4949
if (!settings['vue-i18n'] || !settings['vue-i18n'].localeDir) {
5050
context.report({
51-
loc: UNEXPETECD_ERROR_LOCATION,
51+
loc: UNEXPECTED_ERROR_LOCATION,
5252
message: `You need to 'localeDir' at 'settings. See the 'eslint-plugin-vue-i18n documentation`
5353
})
5454
return {}

lib/rules/no-missing-keys.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'use strict'
55

66
const {
7-
UNEXPETECD_ERROR_LOCATION,
7+
UNEXPECTED_ERROR_LOCATION,
88
defineTemplateBodyVisitor,
99
getLocaleMessages,
1010
findMissingsFromLocaleMessages
@@ -14,8 +14,8 @@ function create (context) {
1414
const { settings } = context
1515
if (!settings['vue-i18n'] || !settings['vue-i18n'].localeDir) {
1616
context.report({
17-
loc: UNEXPETECD_ERROR_LOCATION,
18-
message: `You need to 'localeDir' at 'settings. See the 'eslint-plugin-vue-i18n documentation`
17+
loc: UNEXPECTED_ERROR_LOCATION,
18+
message: `You need to set 'localeDir' at 'settings. See the 'eslint-plugin-vue-i18n documentation`
1919
})
2020
return {}
2121
}

lib/rules/no-unused-keys.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const jsonDiffPatch = require('jsondiffpatch').create({})
88
const flatten = require('flat')
99
const collectKeys = require('../utils/collect-keys')
1010
const {
11-
UNEXPETECD_ERROR_LOCATION,
11+
UNEXPECTED_ERROR_LOCATION,
1212
findExistLocaleMessage,
1313
getLocaleMessages,
1414
extractJsonInfo,
@@ -36,7 +36,7 @@ function getUnusedKeys (context, json, usedkeys) {
3636
})
3737
} catch (e) {
3838
context.report({
39-
loc: UNEXPETECD_ERROR_LOCATION,
39+
loc: UNEXPECTED_ERROR_LOCATION,
4040
message: e.message
4141
})
4242
unusedKeys = null
@@ -82,7 +82,7 @@ function create (context) {
8282
const { settings } = context
8383
if (!settings['vue-i18n'] || !settings['vue-i18n'].localeDir) {
8484
context.report({
85-
loc: UNEXPETECD_ERROR_LOCATION,
85+
loc: UNEXPECTED_ERROR_LOCATION,
8686
message: `You need to 'localeDir' at 'settings. See the 'eslint-plugin-vue-i18n documentation`
8787
})
8888
return {}

lib/utils/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const glob = require('glob')
88
const { resolve } = require('path')
99
const jsonAstParse = require('json-to-ast')
1010

11-
const UNEXPETECD_ERROR_LOCATION = { line: 1, column: 0 }
11+
const UNEXPECTED_ERROR_LOCATION = { line: 1, column: 0 }
1212

1313
/**
1414
* Register the given visitor to parser services.
@@ -18,7 +18,7 @@ const UNEXPETECD_ERROR_LOCATION = { line: 1, column: 0 }
1818
function defineTemplateBodyVisitor (context, templateBodyVisitor, scriptVisitor) {
1919
if (context.parserServices.defineTemplateBodyVisitor === null) {
2020
context.report({
21-
loc: UNEXPETECD_ERROR_LOCATION,
21+
loc: UNEXPECTED_ERROR_LOCATION,
2222
message: 'Use the latest vue-eslint-parser. See also https://github.com/vuejs/eslint-plugin-vue#what-is-the-use-the-latest-vue-eslint-parser-error'
2323
})
2424
return {}
@@ -83,7 +83,7 @@ function extractJsonInfo (context, node) {
8383
]
8484
} catch (e) {
8585
context.report({
86-
loc: UNEXPETECD_ERROR_LOCATION,
86+
loc: UNEXPECTED_ERROR_LOCATION,
8787
message: e.message
8888
})
8989
return []
@@ -107,7 +107,7 @@ function generateJsonAst (context, json, filename) {
107107
}
108108

109109
module.exports = {
110-
UNEXPETECD_ERROR_LOCATION,
110+
UNEXPECTED_ERROR_LOCATION,
111111
defineTemplateBodyVisitor,
112112
getLocaleMessages,
113113
findMissingsFromLocaleMessages,

tests/lib/rules/no-missing-keys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ tester.run('no-missing-keys', rule, {
106106
// settings.vue-i18n.localeDir' error
107107
code: `$t('missing')`,
108108
errors: [
109-
`You need to 'localeDir' at 'settings. See the 'eslint-plugin-vue-i18n documentation`
109+
`You need to set 'localeDir' at 'settings. See the 'eslint-plugin-vue-i18n documentation`
110110
]
111111
}, {
112112
// nested basic

0 commit comments

Comments
 (0)