eslint-plugin-i18next
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -5,2 +5,11 @@ # Changelog | ||
## [2.3.0](https://github.com/edvardchen/eslint-plugin-i18next/compare/v2.2.0...v2.3.0) (2019-07-26) | ||
### Features | ||
* skip literal in SwitchCase statement ([d270343](https://github.com/edvardchen/eslint-plugin-i18next/commit/d270343)), closes [#2](https://github.com/edvardchen/eslint-plugin-i18next/issues/2) | ||
## [2.2.0](https://github.com/edvardchen/eslint-plugin-i18next/compare/v2.1.1...v2.2.0) (2019-07-24) | ||
@@ -7,0 +16,0 @@ |
@@ -200,2 +200,6 @@ /** | ||
'SwitchCase > Literal'(node) { | ||
visited.add(node); | ||
}, | ||
'Literal:exit'(node) { | ||
@@ -278,3 +282,13 @@ // visited and passed linting | ||
const popularCallee = ['dispatch', 'commit']; // vuex callee | ||
const popularCallee = [ | ||
// | ||
// ─── VUEX CALLEE ──────────────────────────────────────────────────────────────── | ||
// | ||
'dispatch', | ||
'commit', | ||
// ──────────────────────────────────────────────────────────────────────────────── | ||
'includes', | ||
'indexOf' | ||
]; | ||
function generateCalleeWhitelists(option) { | ||
@@ -281,0 +295,0 @@ const ignoreCallee = (option && option.ignoreCallee) || []; |
{ | ||
"name": "eslint-plugin-i18next", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "ESLint plugin for i18n", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -34,3 +34,6 @@ /** | ||
{ code: "name === 'Android' || name === 'iOS'" }, | ||
{ code: "switch(a){ case 'a': break; default: break;}" }, | ||
{ code: 'import name from "hello";' }, | ||
{ code: 'a.indexOf("ios")' }, | ||
{ code: 'a.includes("ios")' }, | ||
{ code: 'export * from "hello_export_all";' }, | ||
@@ -63,2 +66,6 @@ { code: 'export { a } from "hello_export";' }, | ||
{ code: 'a + "b"', errors }, | ||
{ | ||
code: "switch(a){ case 'a': var a ='b'; break; default: break;}", | ||
errors | ||
}, | ||
{ code: 'export const a = "hello_string";', errors }, | ||
@@ -65,0 +72,0 @@ { code: 'const a = "foo";', errors }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30515
484