Skip to content

Commit

Permalink
chore: bump eslint to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
double-beep committed Sep 7, 2024
1 parent 4ecf59a commit 4bb3cce
Show file tree
Hide file tree
Showing 7 changed files with 322 additions and 205 deletions.
50 changes: 0 additions & 50 deletions .eslintrc.json

This file was deleted.

53 changes: 53 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import stylistic from "@stylistic/eslint-plugin";
import globals from "globals";

export default tseslint.config({
extends: [
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
...tseslint.configs.recommendedTypeChecked,
stylistic.configs.customize({
quotes: "double",
indent: 4,
semi: true,
}),
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
globals: {
...globals.browser,
StackExchange: "readonly"
},
},
},
],
rules: {
"eqeqeq": "error",
"no-await-in-loop": "off",
"no-implicit-coercion": "off",
"no-loop-func": "error",
"no-useless-return": "off",
"no-var": "error",
"no-undefined": "error",
"no-unneeded-ternary": "error",
"no-param-reassign": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"require-await": "error",

"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{ "checksVoidReturn": false }
],

"@stylistic/arrow-parens": "error",
"@stylistic/brace-style": ["error", "1tbs", { "allowSingleLine": true }],
}
});
Loading

0 comments on commit 4bb3cce

Please sign in to comment.