summaryrefslogtreecommitdiff
path: root/eslint.config.js
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-09-07 02:28:34 -0700
committerFuwn <[email protected]>2025-09-07 02:28:34 -0700
commit188c714f43635fb57eac70b167dba682d6b93a2f (patch)
tree28a5bc64a6a8efd78c19cdaa666b98e42d3b90b5 /eslint.config.js
parentfeat: Add top command (diff)
downloadumabotdiscord-188c714f43635fb57eac70b167dba682d6b93a2f.tar.xz
umabotdiscord-188c714f43635fb57eac70b167dba682d6b93a2f.zip
build: Switch to TypeScript
Diffstat (limited to 'eslint.config.js')
-rw-r--r--eslint.config.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/eslint.config.js b/eslint.config.js
index e8dde1c..d609ca7 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -1,12 +1,39 @@
import prettier from 'eslint-plugin-prettier/recommended';
import js from '@eslint/js';
+import ts from '@typescript-eslint/eslint-plugin';
+import tsParser from '@typescript-eslint/parser';
import globals from 'globals';
export default [
{
+ files: ['**/*.ts'],
languageOptions: {
globals: {
...globals.browser,
+ ...globals.node,
+ },
+ parser: tsParser,
+ parserOptions: {
+ ecmaVersion: 'latest',
+ sourceType: 'module',
+ project: './tsconfig.json',
+ },
+ },
+ plugins: {
+ '@typescript-eslint': ts,
+ },
+ rules: {
+ ...ts.configs.recommended.rules,
+ '@typescript-eslint/no-unused-vars': 'error',
+ '@typescript-eslint/no-explicit-any': 'warn',
+ },
+ },
+ {
+ files: ['**/*.js'],
+ languageOptions: {
+ globals: {
+ ...globals.browser,
+ ...globals.node,
},
},
},