Skip to content

Commit 65389d9

Browse files
authored
Merge pull request #299 from StefanRijnhart/imp-eslint_config-add_browser_globals
[IMP] eslint config: include browser globals such as 'document'
2 parents 4bd7c07 + 01ab78d commit 65389d9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/.pre-commit-config.yaml.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
{%- set repo_rev.eslint_jsdoc = "50.3.1" %}
8080
{%- set repo_rev.flake8 = "3.9.2" %}
8181
{%- set repo_rev.flake8_bugbear = "21.9.2" %}
82+
{%- set repo_rev.globals = "16.0.0" %}
8283
{%- set repo_rev.isort = "5.12.0" %}
8384
{%- set repo_rev.maintainer_tools = "bf9ecb9938b6a5deca0ff3d870fbd3f33341fded" %}
8485
{%- set repo_rev.nodejs = "22.9.0" %}
@@ -221,6 +222,7 @@ repos:
221222
additional_dependencies:
222223
- "eslint@{{ repo_rev.eslint }}"
223224
- "eslint-plugin-jsdoc@{{ repo_rev.eslint_jsdoc }}"
225+
- "globals@{{ repo_rev.globals }}"
224226
- repo: https://github.com/pre-commit/pre-commit-hooks
225227
rev: {{ repo_rev.pre_commit_hooks }}
226228
hooks:

src/{% if odoo_version >= 18 %}eslint.config.cjs{% endif %}

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
var globals = require('globals');
12
jsdoc = require("eslint-plugin-jsdoc");
23

34
const config = [{
@@ -16,6 +17,7 @@ const config = [{
1617
openerp: "readonly",
1718
owl: "readonly",
1819
luxon: "readonly",
20+
...globals.browser,
1921
},
2022

2123
ecmaVersion: 2024,

0 commit comments

Comments
 (0)