mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 19:32:35 +02:00
chore(v2): Fix more eslint errors (#2976)
This commit is contained in:
parent
3611c96f90
commit
6e43c9bd34
81 changed files with 375 additions and 237 deletions
|
@ -5,13 +5,20 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
let versions: string[] = [];
|
||||
let versions: string[];
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line global-require
|
||||
versions = require('@site/versions.json');
|
||||
} catch (e) {}
|
||||
} catch {
|
||||
versions = [];
|
||||
}
|
||||
|
||||
function useVersioning() {
|
||||
function useVersioning(): {
|
||||
versioningEnabled: boolean;
|
||||
versions: string[];
|
||||
latestVersion: string;
|
||||
} {
|
||||
return {
|
||||
versioningEnabled: versions.length > 0,
|
||||
versions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue