mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 00:09:48 +02:00
refactor: convert all fs methods to async (#6725)
* refactor: convert all fs methods to async * fix snap
This commit is contained in:
parent
c0b3c9af65
commit
c6d0d812eb
46 changed files with 518 additions and 429 deletions
30
.eslintrc.js
30
.eslintrc.js
|
@ -107,6 +107,36 @@ module.exports = {
|
|||
property,
|
||||
message: `Use ${alternative} instead.`,
|
||||
})),
|
||||
...[
|
||||
'readdirSync',
|
||||
'readFileSync',
|
||||
'statSync',
|
||||
'lstatSync',
|
||||
'existsSync',
|
||||
'pathExistsSync',
|
||||
'realpathSync',
|
||||
'mkdirSync',
|
||||
'mkdirpSync',
|
||||
'mkdirsSync',
|
||||
'writeFileSync',
|
||||
'writeJsonSync',
|
||||
'outputFileSync',
|
||||
'outputJsonSync',
|
||||
'moveSync',
|
||||
'copySync',
|
||||
'copyFileSync',
|
||||
'ensureFileSync',
|
||||
'ensureDirSync',
|
||||
'ensureLinkSync',
|
||||
'ensureSymlinkSync',
|
||||
'unlinkSync',
|
||||
'removeSync',
|
||||
'emptyDirSync',
|
||||
].map((property) => ({
|
||||
object: 'fs',
|
||||
property,
|
||||
message: 'Do not use sync fs methods.',
|
||||
})),
|
||||
],
|
||||
'no-restricted-syntax': [
|
||||
WARNING,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue