Skip to content

Commit

Permalink
Fix ESLint issue with globals
Browse files Browse the repository at this point in the history
Looks like we were piggy backing on a dependency Hapi lab or something it was using was brining in!
  • Loading branch information
Cruikshanks committed Dec 31, 2024
1 parent 9922a65 commit fec0d3f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const jsdocPlugin = require('eslint-plugin-jsdoc')
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended')
const globals = require('globals')
const neostandard = require('neostandard')

module.exports = [
Expand All @@ -26,9 +25,12 @@ module.exports = [
languageOptions: {
ecmaVersion: 'latest',
// Needed so ESlint knows it is checking Node code. For example, without it all uses of `console.log()` and
// `process.env()` would be flagged by the 'no-undef' rule
// `process.env()` would be flagged by the 'no-undef' rule.
// The source for how to set this we took from https://github.com/sindresorhus/globals/blob/main/globals.json
// and https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables
globals: {
...globals.node
console: 'readable',
process: 'readable'
},
sourceType: 'commonjs'
},
Expand Down

0 comments on commit fec0d3f

Please sign in to comment.