mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-27 02:41:49 +00:00
Merge pull request #14727 from overleaf/bg-eslint-rule-for-node-fetch
restrict use of node-fetch using eslint rules GitOrigin-RevId: 79fd41a7f69e68d2f9f9c55c5d46ffd7bf3c00fd
This commit is contained in:
parent
78a493d78d
commit
b77f4f1379
1 changed files with 10 additions and 1 deletions
|
@ -101,7 +101,16 @@
|
|||
"import/no-extraneous-dependencies": ["error", {
|
||||
// do not allow importing of devDependencies.
|
||||
"devDependencies": false
|
||||
}]
|
||||
}],
|
||||
|
||||
// do not allow node-fetch in backend code
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
{
|
||||
"selector": "CallExpression[callee.name='require'] > .arguments[value='node-fetch']",
|
||||
"message": "Requiring node-fetch is not allowed in production services, please use fetch-utils."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue