Skip to content

Commit

Permalink
ESLint upgrade and config (#1690)
Browse files Browse the repository at this point in the history
This PR updates ESLint and moves our configuration into the 21st
century.

- Use ESModules instead of CommonJS
- Use modern ESLint configuration file
- Prefer double quotes to single for Prettier and ESLint

I sanity checked both the old and new UI.

---------

Co-authored-by: Josh Kalderimis <[email protected]>
  • Loading branch information
nshoes and joshk authored Dec 18, 2024
1 parent 2370d08 commit bb8bf3e
Show file tree
Hide file tree
Showing 13 changed files with 1,924 additions and 2,400 deletions.
8 changes: 0 additions & 8 deletions assets/.eslintrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion assets/.prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
semi: false
singleQuote: true
singleQuote: false
26 changes: 26 additions & 0 deletions assets/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import js from "@eslint/js"
import globals from "globals"

// we need to be on node >= 18 to consume a version of "globals"
// that has this key without a trailing space; if we use it as-is
// eslint blows up
delete globals.browser["AudioWorkletGlobalScope "]

export default [
js.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.jest,
Intl: true
},
ecmaVersion: 6,
sourceType: "module"
},
rules: {
"no-empty": ["error", { allowEmptyCatch: true }],
quotes: ["error", "double"]
}
}
]
Loading

0 comments on commit bb8bf3e

Please sign in to comment.