Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/eslint.config.mts')
-rw-r--r--editors/code/eslint.config.mts48
1 files changed, 48 insertions, 0 deletions
diff --git a/editors/code/eslint.config.mts b/editors/code/eslint.config.mts
new file mode 100644
index 0000000000..3520593eef
--- /dev/null
+++ b/editors/code/eslint.config.mts
@@ -0,0 +1,48 @@
+import eslintConfigPrettier from "eslint-config-prettier";
+import stylistic from "@stylistic/eslint-plugin";
+import eslint from "@eslint/js";
+import tseslint from "typescript-eslint";
+import stylisticJs from "@stylistic/eslint-plugin-js";
+import { type FlatESLintConfig } from "eslint-define-config";
+
+const config: FlatESLintConfig[] = [
+ eslintConfigPrettier,
+ eslint.configs.recommended,
+ stylisticJs.configs["disable-legacy"],
+ ...tseslint.configs.recommended,
+ stylistic.configs.customize({
+ indent: 4,
+ quotes: "double",
+ semi: true,
+ braceStyle: "1tbs",
+ arrowParens: true,
+ }),
+ {
+ rules: {
+ "no-console": "warn",
+ "@typescript-eslint/no-unused-vars": [
+ "error",
+ {
+ args: "all",
+ argsIgnorePattern: "^_",
+ caughtErrors: "all",
+ caughtErrorsIgnorePattern: "^_",
+ destructuredArrayIgnorePattern: "^_",
+ varsIgnorePattern: "^_",
+ ignoreRestSiblings: true,
+ },
+ ],
+ // the following stylistic lints conflict with prettier
+ "@stylistic/operator-linebreak": "off",
+ "@stylistic/indent-binary-ops": "off",
+ "@stylistic/indent": "off",
+ "@stylistic/brace-style": "off",
+ "@stylistic/quotes": "off",
+ },
+ },
+ {
+ ignores: ["out/", ".vscode-test/", "node_modules/"],
+ },
+];
+
+export default config;