mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +02:00
ESLintify Part 3 (#846)
* ESLintify Part 3 * ESLintify Part 3 * ESLintify Part 3
This commit is contained in:
parent
5ac2cee658
commit
a7a214fb3a
54 changed files with 435 additions and 497 deletions
|
@ -13,8 +13,8 @@ const glob = require('glob');
|
|||
const path = require('path');
|
||||
|
||||
let languages;
|
||||
if (fs.existsSync(CWD + '/languages.js')) {
|
||||
languages = require(CWD + '/languages.js');
|
||||
if (fs.existsSync(`${CWD}/languages.js`)) {
|
||||
languages = require(`${CWD}/languages.js`);
|
||||
} else {
|
||||
languages = [
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ const enabledLanguages = languages.filter(lang => lang.enabled);
|
|||
|
||||
const translation = {languages: enabledLanguages};
|
||||
|
||||
const files = glob.sync(CWD + '/i18n/**');
|
||||
const files = glob.sync(`${CWD}/i18n/**`);
|
||||
const langRegex = /\/i18n\/(.*)\.json$/;
|
||||
|
||||
files.forEach(file => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue