Skip to content

Commit 661865a

Browse files
committed
🎨 Replace tslint with eslint
1 parent 1a3d8cb commit 661865a

File tree

17 files changed

+2020
-539
lines changed

17 files changed

+2020
-539
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The code **must** pass the linter and specs.
3434

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

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

3939
### 5 - Commit & Pull request
4040

eslint.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// @ts-check
2+
3+
import eslint from "@eslint/js"
4+
import tseslint from "typescript-eslint"
5+
import globals from "globals"
6+
7+
delete globals.browser["AudioWorkletGlobalScope "]
8+
9+
export default tseslint.config(
10+
eslint.configs.recommended,
11+
...tseslint.configs.recommended,
12+
{
13+
rules: {
14+
indent: ["error", 2],
15+
"linebreak-style": ["error", "unix"],
16+
quotes: ["error", "double"],
17+
semi: ["error", "never"],
18+
"no-console": "warn",
19+
"arrow-parens": ["error", "as-needed"],
20+
"no-var": "error",
21+
"prefer-const": "error",
22+
"object-curly-spacing": ["error", "always"],
23+
"@typescript-eslint/no-explicit-any": "off",
24+
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
25+
},
26+
languageOptions: {
27+
globals: {
28+
...globals.browser,
29+
"AudioWorkletGlobalScope": false
30+
}
31+
}
32+
}
33+
)

0 commit comments

Comments
 (0)