mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-23 04:58:03 +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
|
@ -8,15 +8,16 @@
|
|||
import type {NumberPrefixParser} from '@docusaurus/plugin-content-docs';
|
||||
|
||||
// Best-effort to avoid parsing some patterns as number prefix
|
||||
const IgnoredPrefixPatterns = (function () {
|
||||
const IgnoredPrefixPatterns = (() => {
|
||||
// ignore common date-like patterns: https://github.com/facebook/docusaurus/issues/4640
|
||||
const DateLikePrefixRegex =
|
||||
/^((\d{2}|\d{4})[-_.]\d{2}([-_.](\d{2}|\d{4}))?)(.*)$/;
|
||||
|
||||
// ignore common versioning patterns: https://github.com/facebook/docusaurus/issues/4653
|
||||
// note: we could try to parse float numbers in filenames but that is probably not worth it
|
||||
// as a version such as "8.0" can be interpreted as both a version and a float
|
||||
// User can configure his own NumberPrefixParser if he wants 8.0 to be interpreted as a float
|
||||
// note: we could try to parse float numbers in filenames but that is
|
||||
// probably not worth it as a version such as "8.0" can be interpreted as both
|
||||
// a version and a float. User can configure her own NumberPrefixParser if
|
||||
// she wants 8.0 to be interpreted as a float
|
||||
const VersionLikePrefixRegex = /^(\d+[-_.]\d+)(.*)$/;
|
||||
|
||||
return new RegExp(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue