Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-i18next

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-i18next - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

CHANGELOG.md

6

commitlint.config.js

@@ -6,4 +6,8 @@ const conventional = require('@commitlint/config-conventional');

rules: {
'type-enum': [2, 'always', [...conventional.rules['type-enum'][2], 'dev']]
'type-enum': [
2,
'always',
[...conventional.rules['type-enum'][2], 'dev', 'deps']
]
}
};

2

package.json
{
"name": "eslint-plugin-i18next",
"version": "1.1.1",
"version": "1.1.2",
"description": "ESLint plugin for i18n",

@@ -5,0 +5,0 @@ "keywords": [

@@ -46,12 +46,43 @@ # eslint-plugin-i18next

Literay strings that are not constant string (all characters are `UPPERCASE`) are typically mistakes. For example:
All literal strings in html template are typically mistakes. For JSX example:
```HTML
<div>foo</div>
```
They should be translated by [i18next translation api](https://www.i18next.com/):
```HTML
<div>{i18next.t('foo')}</div>
```
Same for [Vue template](https://vuejs.org/v2/guide/syntax.html):
```vue
<!-- incorrect -->
<template>
foo
</template>
<!-- correct -->
<template>
{{ i18next.t('foo') }}
</template>
```
For plain javascript, literal strings that are not constant string (all characters are `UPPERCASE`) are disallowed:
```js
// incorrect
const foo = 'foo';
// correct
const foo = i18next.t('foo');
```
They are frowned upon in favor of internationalization:
It is all right to use `UPPERCASE` string in javascript:
```js
const foo = i18next.t('foo'); // wrapped by i18n translation function
// correct
const foo = 'FOO';
```

@@ -58,0 +89,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc