Skip to content

Commit

Permalink
fix: added dependencies and added support for globals in eslint.confi…
Browse files Browse the repository at this point in the history
…g.js
  • Loading branch information
elijah0kello committed Feb 13, 2024
1 parent 110431d commit 585b163
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Expand Up @@ -35,6 +35,10 @@ repos:
rev: v9.0.0-beta.0
hooks:
- id: eslint
additional_dependencies:
- "eslint@v9.0.0-beta.0"
- "@eslint/js@v9.0.0-beta.0"
- "globals"
files: \.js?$
types: [file]
args:
Expand Down
11 changes: 10 additions & 1 deletion eslint.config.js
@@ -1,8 +1,17 @@
const js = require("@eslint/js");
const globals = require("globals");

module.exports = [
js.configs.recommended,
{
files: ["**/*.js"],
languageOptions:{
ecmaVersion: 6,
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
...globals.node
}
}
},
{
Expand Down

0 comments on commit 585b163

Please sign in to comment.