mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 16:47:26 +02:00
Integrate eslint & precommit to codebase (#815)
* add eslint, precommit & refactor * fix exit code 127 * modify contributing.md & add package-lock * use .eslintrc.js
This commit is contained in:
parent
97eaaad744
commit
21dcea2a31
20 changed files with 4836 additions and 2139 deletions
|
@ -56,9 +56,9 @@ beforeAll(() => {
|
|||
});
|
||||
});
|
||||
|
||||
function afterAll() {
|
||||
afterAll(() => {
|
||||
clearBuildFolder();
|
||||
}
|
||||
});
|
||||
|
||||
test('Build folder exists', function() {
|
||||
return fs.stat(buildDir).then(function(status) {
|
||||
|
@ -73,7 +73,6 @@ test('Generated HTML for each Markdown resource', function() {
|
|||
metadata.push(path.basename());
|
||||
});
|
||||
inputMarkdownFiles.forEach(function(file) {
|
||||
const path = filepath.create(file);
|
||||
const data = fs.readFileSync(file, 'utf8');
|
||||
const frontmatter = fm(data);
|
||||
expect(metadata).toContain(frontmatter.attributes.id + '.html');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue