Skip to content

Commit

Permalink
fix: #158 configure no-undef eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelbeltran committed Apr 30, 2024
1 parent c709d4e commit 36de8ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
// Add node globals to ignore undefined
globals: {
"__dirname": false,
"console": false,
"module": false,
"process": false,
"require": false,
"setTimeout": false,
}
},
rules: {
// Unused vars reported as error
"@typescript-eslint/no-unused-vars": [
Expand All @@ -19,7 +30,6 @@ export default tseslint.config(
// Required to import JS modules
"@typescript-eslint/no-var-requires": "off",
// TODO: Remove ignored rules and fix the code
"no-undef": "off",
"no-unreachable": "off",
"no-useless-catch": "off",
}
Expand Down
1 change: 1 addition & 0 deletions examples/using-domains/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ appDomain.run(function () {
// Or we can deal with it in our "Fake Error Handler" below

// This will throw an error as fakeErrorHandler doesn't exist
// eslint-disable-next-line
fakeErrorHandler.DealWith(err);
}
});
Expand Down

0 comments on commit 36de8ac

Please sign in to comment.