Skip to content

Commit

Permalink
🎨 Replace tslint with eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
elbywan committed Jun 2, 2024
1 parent 1a3d8cb commit 661865a
Show file tree
Hide file tree
Showing 17 changed files with 2,020 additions and 539 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The code **must** pass the linter and specs.

If you add a new functionality, please write some tests!

If a linter rule which is not already set in the tslint.json file is bothering you, feel free to propose a change.
If a linter rule which is not already set in the `.eslintrc.js` file is bothering you, feel free to propose a change.

### 5 - Commit & Pull request

Expand Down
33 changes: 33 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// @ts-check

import eslint from "@eslint/js"
import tseslint from "typescript-eslint"
import globals from "globals"

delete globals.browser["AudioWorkletGlobalScope "]

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
indent: ["error", 2],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "never"],
"no-console": "warn",
"arrow-parens": ["error", "as-needed"],
"no-var": "error",
"prefer-const": "error",
"object-curly-spacing": ["error", "always"],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
},
languageOptions: {
globals: {
...globals.browser,
"AudioWorkletGlobalScope": false
}
}
}
)
Loading

0 comments on commit 661865a

Please sign in to comment.