Aethel Bot OSS repository!
aethel.xyz
bot
fun
ai
discord
discord-bot
aethel
1import js from '@eslint/js';
2import globals from 'globals';
3import tseslint from 'typescript-eslint';
4
5export default [
6 {
7 ignores: [
8 '**/node_modules/**',
9 '**/dist/**',
10 '**/build/**',
11 '**/.next/**',
12 '**/coverage/**',
13 '**/*.min.js',
14 '**/logs/**',
15 ],
16 },
17
18 js.configs.recommended,
19 ...tseslint.configs.recommended,
20
21 {
22 files: ['**/*.{js,mjs,cjs,ts,mts,cts,tsx}'],
23 languageOptions: {
24 globals: {
25 ...globals.node,
26 ...globals.es2022,
27 },
28 ecmaVersion: 2022,
29 sourceType: 'module',
30 },
31 rules: {
32 'no-console': 'off',
33 'no-debugger': 'error',
34 'no-alert': 'error',
35 'no-eval': 'error',
36 'no-implied-eval': 'error',
37
38 eqeqeq: ['error', 'always'],
39 curly: ['warn', 'multi-line'],
40 'no-else-return': 'warn',
41 'no-empty-function': 'warn',
42 'no-return-assign': 'error',
43 'no-throw-literal': 'error',
44
45 'no-unreachable': 'error',
46 'no-unused-expressions': 'error',
47 'no-useless-return': 'warn',
48
49 '@typescript-eslint/no-unused-vars': [
50 'error',
51 {
52 argsIgnorePattern: '^_',
53 varsIgnorePattern: '^_',
54 caughtErrorsIgnorePattern: '^_',
55 destructuredArrayIgnorePattern: '^_',
56 },
57 ],
58 '@typescript-eslint/no-explicit-any': 'warn',
59 '@typescript-eslint/explicit-function-return-type': 'off',
60 '@typescript-eslint/explicit-module-boundary-types': 'off',
61 '@typescript-eslint/no-inferrable-types': 'warn',
62 '@typescript-eslint/no-non-null-assertion': 'off',
63 '@typescript-eslint/prefer-for-of': 'error',
64 '@typescript-eslint/consistent-type-imports': 'off',
65
66 'no-unused-vars': 'off',
67 'no-undef': 'off',
68 'no-redeclare': 'off',
69 '@typescript-eslint/no-redeclare': 'error',
70
71 'no-process-exit': 'off',
72 'no-new-require': 'error',
73 'no-path-concat': 'error',
74 'no-sync': 'warn',
75 },
76 },
77
78 {
79 files: ['**/*.config.{js,mjs,ts}', '**/eslint.config.mjs', '**/src/index.ts'],
80 rules: {
81 'no-console': 'off',
82 'no-process-exit': 'off',
83 },
84 },
85
86 {
87 files: ['**/*.test.{js,ts}', '**/*.spec.{js,ts}', '**/tests/**/*.{js,ts}'],
88 languageOptions: {
89 globals: {
90 ...globals.jest,
91 ...globals.node,
92 },
93 },
94 rules: {
95 '@typescript-eslint/no-explicit-any': 'off',
96 '@typescript-eslint/explicit-function-return-type': 'off',
97 },
98 },
99];