chore(v2): fix eslint TS setup (#2949)

* update eslint parser

* fix yarn lint script

* lint-staged, lint ts files

* fix TS eslint configuration + fix some lint errors (https://github.com/facebook/docusaurus/pull/2949)

* eslint root + separate linting in 2 scripts

* test commit

* test commit

* test commit

* fix /// TS directive
This commit is contained in:
Sébastien Lorber 2020-06-18 11:37:48 +02:00 committed by GitHub
parent 38c8478e75
commit 72884a0c1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 391 additions and 60 deletions

View file

@ -1,5 +1,5 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
@ -36,7 +36,7 @@ const blogPosts: BlogPost[] = [
},
];
const transform = (filepath) => {
const transform = (filepath: string) => {
const content = fs.readFileSync(filepath, 'utf-8');
const transformedContent = linkify(content, sitePath, blogPath, blogPosts);
return [content, transformedContent];