Skip to content
This repository was archived by the owner on May 4, 2020. It is now read-only.

Commit 8affb6d

Browse files
committed
chore: add intl-listformat docs to index
1 parent 5626c57 commit 8affb6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+274
-273
lines changed

packages/babel-plugin-react-intl/test/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe('options', () => {
6565
// Check message output
6666
expect(require(join(fixtureDir, 'actual.json'))).toMatchSnapshot();
6767
});
68-
it('outputEmptyJson should output empty files', function() {
68+
it('outputEmptyJson should output empty files', function () {
6969
const fixtureDir = join(fixturesDir, 'outputEmptyJson');
7070

7171
const actual = transform(join(fixtureDir, 'actual.js'), {
@@ -78,7 +78,7 @@ describe('options', () => {
7878
// Check message output
7979
expect(require(join(fixtureDir, 'actual.json'))).toMatchSnapshot();
8080
});
81-
it('without outputEmptyJson should output empty files', function() {
81+
it('without outputEmptyJson should output empty files', function () {
8282
const fixtureDir = join(fixturesDir, 'empty');
8383

8484
const actual = transform(join(fixtureDir, 'actual.js'), {})!.code;

packages/eslint-plugin-formatjs/src/rules/no-multiple-whitespaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function checkNode(
2727
message: 'Multiple consecutive whitespaces are not allowed',
2828
};
2929
if (messageNode.type === 'Literal' && messageNode.raw) {
30-
reportObject.fix = function(fixer) {
30+
reportObject.fix = function (fixer) {
3131
return fixer.replaceText(
3232
messageNode as Node,
3333
messageNode.raw!.replace(MULTIPLE_SPACES, ' ')

packages/formatjs-extract-cldr-data/src/extract-relative.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function transformFieldData(data: Fields['week']): FieldData {
9393
future: {},
9494
past: {},
9595
};
96-
Object.keys(data).forEach(function(key) {
96+
Object.keys(data).forEach(function (key) {
9797
const type = key.match(/^(relative|relativeTime)-type-(.+)$/) || [];
9898

9999
switch (type[1]) {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import extractCurrencies from '../src/extract-currencies';
22

3-
describe('extract-currencies', function() {
4-
it('should be able to extract en', function() {
3+
describe('extract-currencies', function () {
4+
it('should be able to extract en', function () {
55
expect(extractCurrencies(['en'])).toMatchSnapshot();
66
});
7-
it('should be able to extract uk', function() {
7+
it('should be able to extract uk', function () {
88
expect(extractCurrencies(['uk'])).toMatchSnapshot();
99
});
1010
});
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import extractDisplayNames from '../src/extract-displaynames';
22

3-
describe('extract-units', function() {
4-
it('should be able to extract en', function() {
3+
describe('extract-units', function () {
4+
it('should be able to extract en', function () {
55
expect(extractDisplayNames(['en'])).toMatchSnapshot();
66
});
7-
it('should be able to extract vi', function() {
7+
it('should be able to extract vi', function () {
88
expect(extractDisplayNames(['vi'])).toMatchSnapshot();
99
});
10-
it('should be able to extract ja', function() {
10+
it('should be able to extract ja', function () {
1111
expect(extractDisplayNames(['ja'])).toMatchSnapshot();
1212
});
1313
});
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import extractNumbers from '../src/extract-numbers';
22

3-
describe('extract-numbers', function() {
4-
it('should be able to extract en', function() {
3+
describe('extract-numbers', function () {
4+
it('should be able to extract en', function () {
55
expect(extractNumbers(['en'])).toMatchSnapshot();
66
});
7-
it('should be able to extract vi', function() {
7+
it('should be able to extract vi', function () {
88
expect(extractNumbers(['vi'])).toMatchSnapshot();
99
});
1010
});
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import extractUnits from '../src/extract-units';
22

3-
describe('extract-units', function() {
4-
it('should be able to extract en', function() {
3+
describe('extract-units', function () {
4+
it('should be able to extract en', function () {
55
expect(extractUnits(['en'])).toMatchSnapshot();
66
});
7-
it('should be able to extract vi', function() {
7+
it('should be able to extract vi', function () {
88
expect(extractUnits(['vi'])).toMatchSnapshot();
99
});
10-
it('should be able to extract ja', function() {
10+
it('should be able to extract ja', function () {
1111
expect(extractUnits(['ja'])).toMatchSnapshot();
1212
});
1313
});

packages/intl-displaynames/scripts/cldr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const allData = getAllDisplayNamesLocales().reduce(
3535
const allLocaleDistDir = resolve(__dirname, '../dist/locale-data');
3636

3737
// Dist all locale files to dist/locale-data (JS)
38-
Object.keys(allData).forEach(function(lang) {
38+
Object.keys(allData).forEach(function (lang) {
3939
const destFile = join(allLocaleDistDir, lang + '.js');
4040
outputFileSync(
4141
destFile,
@@ -48,7 +48,7 @@ if (Intl.DisplayNames && typeof Intl.DisplayNames.__addLocaleData === 'function'
4848
});
4949

5050
// Dist all locale files to dist/locale-data (JSON)
51-
Object.keys(allData).forEach(function(locale) {
51+
Object.keys(allData).forEach(function (locale) {
5252
const destFile = join(allLocaleDistDir, locale + '.json');
5353
outputJSONSync(destFile, allData[locale]);
5454
});

packages/intl-displaynames/tests/runner.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ for (const t of json) {
7979
}
8080
if (failedTests.length) {
8181
console.log(
82-
`Tests: ${failedTests.length} failed, ${json.length -
83-
failedTests.length} passed, ${json.length} total`
82+
`Tests: ${failedTests.length} failed, ${
83+
json.length - failedTests.length
84+
} passed, ${json.length} total`
8485
);
8586
process.exitCode = 1;
8687
} else {

packages/intl-format-cache/tests/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import {expect as chaiExpect} from 'chai';
55

66
declare var expect: typeof chaiExpect;
77

8-
describe('intl-format-cache', function() {
9-
it('has a function as the default export', function() {
8+
describe('intl-format-cache', function () {
9+
it('has a function as the default export', function () {
1010
expect(memoizeFormatConstructor).to.be.a('function');
1111
});
1212

13-
describe('Intl built-ins', function() {
14-
describe('Intl.DateTimeFormat', function() {
13+
describe('Intl built-ins', function () {
14+
describe('Intl.DateTimeFormat', function () {
1515
var getDateTimeFormat = memoizeFormatConstructor(Intl.DateTimeFormat);
1616

17-
it('memoizes Intl.DateTimeFormat', function() {
17+
it('memoizes Intl.DateTimeFormat', function () {
1818
var df = getDateTimeFormat('en');
1919

2020
expect(df.resolvedOptions().locale).to.equal('en');
@@ -26,10 +26,10 @@ describe('intl-format-cache', function() {
2626
});
2727
});
2828

29-
describe('Intl.NumberFormat', function() {
29+
describe('Intl.NumberFormat', function () {
3030
var getNumberFormat = memoizeFormatConstructor(Intl.NumberFormat);
3131

32-
it('memoizes Intl.NumberFormat', function() {
32+
it('memoizes Intl.NumberFormat', function () {
3333
var nf = getNumberFormat('en');
3434

3535
expect(nf.resolvedOptions().locale).to.equal('en');

0 commit comments

Comments
 (0)