mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-15 01:57:28 +02:00
chore: clean up ESLint config, enable a few rules (#6514)
* chore: clean up ESLint config, enable a few rules * enable max-len for comments * fix build
This commit is contained in:
parent
b8ccb869f1
commit
aa446b7a9c
167 changed files with 1157 additions and 960 deletions
|
@ -28,7 +28,7 @@ export function getActivePlugin(
|
|||
options: GetActivePluginOptions = {},
|
||||
): ActivePlugin | undefined {
|
||||
const activeEntry = Object.entries(allPluginDatas)
|
||||
// A quick route sorting: '/android/foo' should match '/android' instead of '/'
|
||||
// Route sorting: '/android/foo' should match '/android' instead of '/'
|
||||
.sort((a, b) => b[1].path.localeCompare(a[1].path))
|
||||
.find(
|
||||
([, pluginData]) =>
|
||||
|
@ -67,7 +67,7 @@ export const getActiveVersion = (
|
|||
): GlobalVersion | undefined => {
|
||||
const lastVersion = getLatestVersion(data);
|
||||
// Last version is a route like /docs/*,
|
||||
// we need to try to match it last or it would match /docs/version-1.0/* as well
|
||||
// we need to match it last or it would match /docs/version-1.0/* as well
|
||||
const orderedVersionsMetadata = [
|
||||
...data.versions.filter((version) => version !== lastVersion),
|
||||
lastVersion,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue