chore(eslint): Recognize MongoDB globals
This commit is contained in:
parent
c18f05f643
commit
d16bc9afff
3 changed files with 22 additions and 1 deletions
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
"eslint-config-next": "^12.3.1",
|
||||
"eslint-plugin-jsonc": "^2.4.0",
|
||||
"eslint-plugin-markdown": "^3.0.0",
|
||||
"eslint-plugin-mongo": "^1.0.5",
|
||||
"eslint-plugin-yaml": "^0.5.0",
|
||||
"esm": "^3.2.25",
|
||||
"handlebars": "^4.7.7",
|
||||
|
|
12
yarn.lock
12
yarn.lock
|
@ -7888,6 +7888,13 @@ eslint-plugin-markdown@^3.0.0:
|
|||
dependencies:
|
||||
mdast-util-from-markdown "^0.8.5"
|
||||
|
||||
eslint-plugin-mongo@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-mongo/-/eslint-plugin-mongo-1.0.5.tgz#e0cc946d65d5a2d65b71bf4507fc235c9621ca5b"
|
||||
integrity sha512-hnlJSKwvk0wHWw8dLlZjEKFOgs1XUkYmV5II+yQpTHkcJ03BTQ8PyUFn04wu8Y2eerB8TR53nEU1r5Co6boE8A==
|
||||
dependencies:
|
||||
requireindex "~1.1.0"
|
||||
|
||||
eslint-plugin-n@^15.1.0:
|
||||
version "15.2.4"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.2.4.tgz#d62021a0821ae650701ed459756aaf478a9b6056"
|
||||
|
@ -16943,6 +16950,11 @@ require-package-name@^2.0.1:
|
|||
resolved "https://registry.yarnpkg.com/require-package-name/-/require-package-name-2.0.1.tgz#c11e97276b65b8e2923f75dabf5fb2ef0c3841b9"
|
||||
integrity sha512-uuoJ1hU/k6M0779t3VMVIYpb2VMJk05cehCaABFhXaibcbvfgR8wKiozLjVFSzJPmQMRqIcO0HMyTFqfV09V6Q==
|
||||
|
||||
requireindex@~1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162"
|
||||
integrity sha512-LBnkqsDE7BZKvqylbmn7lTIVdpx4K/QCduRATpO5R+wtPmky/a8pN1bO2D6wXppn1497AJF9mNjqAXr6bdl9jg==
|
||||
|
||||
requires-port@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue