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

eslint-plugin-formatjs

Package Overview
Dependencies
Maintainers
3
Versions
236
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-formatjs - npm Package Compare versions

Comparing version 1.5.11 to 1.6.0

dist/rules/enforce-default-message.d.ts

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [1.6.0](https://github.com/formatjs/formatjs/compare/eslint-plugin-formatjs@1.5.11...eslint-plugin-formatjs@1.6.0) (2020-03-01)
### Features
* **eslint-plugin-formatjs:** add support for defaultMessage ([#524](https://github.com/formatjs/formatjs/issues/524)) ([63742d6](https://github.com/formatjs/formatjs/commit/63742d697732f2e88176c8f310f89bf65c2f9576))
## [1.5.11](https://github.com/formatjs/formatjs/compare/eslint-plugin-formatjs@1.5.10...eslint-plugin-formatjs@1.5.11) (2020-01-27)

@@ -8,0 +19,0 @@

1

dist/index.d.ts
declare const plugin: {
rules: {
'enforce-description': import("eslint").Rule.RuleModule;
'enforce-default-message': import("eslint").Rule.RuleModule;
'no-camel-case': import("eslint").Rule.RuleModule;

@@ -5,0 +6,0 @@ 'no-emoji': import("eslint").Rule.RuleModule;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const enforce_description_1 = require("./rules/enforce-description");
const enforce_default_message_1 = require("./rules/enforce-default-message");
const no_camel_case_1 = require("./rules/no-camel-case");

@@ -15,2 +16,3 @@ const no_emoji_1 = require("./rules/no-emoji");

'enforce-description': enforce_description_1.default,
'enforce-default-message': enforce_default_message_1.default,
'no-camel-case': no_camel_case_1.default,

@@ -17,0 +19,0 @@ 'no-emoji': no_emoji_1.default,

5

package.json
{
"name": "eslint-plugin-formatjs",
"version": "1.5.11",
"version": "1.6.0",
"description": "ESLint plugin for formatjs",

@@ -37,3 +37,4 @@ "main": "dist/index.js",

"eslint": "^6.0.0"
}
},
"gitHead": "f7f8ddb5ba81afbe04e7da8f438e08662096ae11"
}

@@ -126,2 +126,26 @@ # eslint-plugin-formatjs

### `enforce-default-message`
This enforces `defaultMessage` in the message descriptor.
#### Why
- Can be usefull in case we want to extract messages for translations from source code. This way can make sure people won't forget about defaultMessage
```tsx
import {defineMessages} from 'react-intl';
const messages = defineMessages({
// WORKS
foo: {
defaultMessage: 'This is default message',
description: 'bar',
},
// FAILS
bar: {
description: 'bar',
},
});
```
### `enforce-placeholders`

@@ -128,0 +152,0 @@

import enforceDescription from './rules/enforce-description';
import enforceDefaultMessage from './rules/enforce-default-message';
import noCamelCase from './rules/no-camel-case';

@@ -13,2 +14,3 @@ import noEmoji from './rules/no-emoji';

'enforce-description': enforceDescription,
'enforce-default-message': enforceDefaultMessage,
'no-camel-case': noCamelCase,

@@ -15,0 +17,0 @@ 'no-emoji': noEmoji,

Sorry, the diff of this file is not supported yet

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