mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-04 20:02:54 +02:00
ESLintify Part 1 (#837)
* ESLint-ify * Allow empty try/catch * Escape regexp
This commit is contained in:
parent
128dbfca0a
commit
e8e3f42685
44 changed files with 466 additions and 555 deletions
|
@ -5,8 +5,8 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const anchors = require('../anchors');
|
||||
const rules = require('remarkable/lib/rules');
|
||||
const anchors = require('../anchors');
|
||||
|
||||
const md = {
|
||||
renderer: {
|
||||
|
|
|
@ -11,7 +11,7 @@ const getTOC = require('../getTOC');
|
|||
|
||||
const mdContents = readFileSync(
|
||||
path.join(__dirname, '__fixtures__', 'getTOC.md'),
|
||||
'utf-8'
|
||||
'utf8'
|
||||
);
|
||||
|
||||
test('with defaults', () => {
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
*/
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const utils = require('../utils');
|
||||
const readFileSync = require('fs').readFileSync;
|
||||
|
||||
const blogPostWithTruncateContents = readFileSync(
|
||||
const blogPostWithTruncateContents = fs.readFileSync(
|
||||
path.join(__dirname, '__fixtures__', 'blog-post-with-truncate.md'),
|
||||
'utf-8'
|
||||
'utf8'
|
||||
);
|
||||
|
||||
const blogPostWithoutTruncateContents = readFileSync(
|
||||
const blogPostWithoutTruncateContents = fs.readFileSync(
|
||||
path.join(__dirname, '__fixtures__', 'blog-post-without-truncate.md'),
|
||||
'utf-8'
|
||||
'utf8'
|
||||
);
|
||||
|
||||
describe('utils', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue