1
0
Fork 0

chore(eslint): Recognize MongoDB globals

This commit is contained in:
nikhil 2022-09-26 22:16:10 -04:00 committed by Nikhil Chelliah
parent c18f05f643
commit d16bc9afff
3 changed files with 22 additions and 1 deletions

View file

@ -1,3 +1,4 @@
const mongoFiles = ['ansible/playbooks/files/migrate_data.{js,mjs,cjs}']
const nodeFiles = [
'**/build.dflt.{js,mjs,cjs}',
'**/build.{js,mjs,cjs}',
@ -37,6 +38,13 @@ module.exports = {
rules: {},
overrides: [
// Partitioned JavaScript files
{
files: mongoFiles,
plugins: ['mongo'],
env: {
'mongo/shell': true,
},
},
{
files: nodeFiles,
env: {
@ -57,7 +65,7 @@ module.exports = {
},
{
files: ['**'],
excludedFiles: [].concat(nodeFiles, frontendFiles),
excludedFiles: [].concat(mongoFiles, nodeFiles, frontendFiles),
env: {
'shared-node-browser': true,
},