@jetshop/intl 5.14.0 → 5.15.0-alpha.184e18a2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/intl.js +1 -1
- package/bin/lint.js +2 -2
- package/package.json +2 -1
package/bin/intl.js
CHANGED
|
@@ -8,7 +8,7 @@ require('@jetshop/react-scripts/config/env');
|
|
|
8
8
|
const spawn = require('react-dev-utils/crossSpawn');
|
|
9
9
|
const args = process.argv.slice(2);
|
|
10
10
|
|
|
11
|
-
const scriptIndex = args.findIndex(x => x === 'extract' || x === 'lint');
|
|
11
|
+
const scriptIndex = args.findIndex((x) => x === 'extract' || x === 'lint');
|
|
12
12
|
const script = scriptIndex === -1 ? args[0] : args[scriptIndex];
|
|
13
13
|
const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];
|
|
14
14
|
|
package/bin/lint.js
CHANGED
|
@@ -19,7 +19,7 @@ const srcFiles = [
|
|
|
19
19
|
|
|
20
20
|
const localeRegexp = /([a-z-_A-Z]+)\.json/;
|
|
21
21
|
|
|
22
|
-
const getLocaleFromFilename = filename => {
|
|
22
|
+
const getLocaleFromFilename = (filename) => {
|
|
23
23
|
if (localeRegexp.test(filename)) {
|
|
24
24
|
return filename.match(localeRegexp)[1];
|
|
25
25
|
} else {
|
|
@@ -74,7 +74,7 @@ const report = {
|
|
|
74
74
|
warningCount: 0
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
srcFiles.forEach(file => {
|
|
77
|
+
srcFiles.forEach((file) => {
|
|
78
78
|
const data = fs.readFileSync(file, 'utf8');
|
|
79
79
|
const fileReport = cli.executeOnText(data, file);
|
|
80
80
|
report.results = report.results.concat(fileReport.results);
|