Skip to content

Commit

Permalink
eslint: Add support for *.mjs files
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Jan 10, 2022
1 parent e5a00a7 commit e020efb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,25 @@
"yoda": "warn"
},
"globals": {
"console": "writable",
"svg": "writable",
"HIDController": "writable",
"HIDDebug": "writable",
"HIDPacket": "writable",
"controller": "writable"
}
"console": "readable"
},
"overrides": [
{
"files": ["**/*.mjs"],
"parserOptions": {
"sourceType": "module"
}
},
{
"files": ["res/controllers/*.js"],
"globals": {
"console": "readable",
"svg": "writable",
"HIDController": "writable",
"HIDDebug": "writable",
"HIDPacket": "writable",
"controller": "writable"
}
}
]
}
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ repos:
hooks:
- id: eslint
args: [--fix, --report-unused-disable-directives]
files: \.m?js$
types: [file]
stages:
- commit
- manual
Expand Down

0 comments on commit e020efb

Please sign in to comment.