summaryrefslogtreecommitdiff
path: root/eslint.config.js
diff options
context:
space:
mode:
authorElizabeth Hunt <me@liz.coffee>2025-08-17 23:50:24 -0700
committerElizabeth Hunt <me@liz.coffee>2025-08-17 23:53:38 -0700
commit1a4fc9535a89b58e8b67c8996ade0b833116af3a (patch)
treed16f3129d7bb69f204bba8422e909354195a0042 /eslint.config.js
parent157dc327e8fe63541b517cfbeeaf202a3e8553a5 (diff)
downloaduptime-1a4fc9535a89b58e8b67c8996ade0b833116af3a.tar.gz
uptime-1a4fc9535a89b58e8b67c8996ade0b833116af3a.zip
Move to pengueno.
Diffstat (limited to 'eslint.config.js')
-rw-r--r--eslint.config.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000..a21d24b
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,48 @@
+// eslint.config.js
+import tseslint from 'typescript-eslint';
+import prettierPlugin from 'eslint-plugin-prettier';
+
+export default tseslint.config({
+ ignores: ['dist/', 'node_modules/', '*.js', '*.d.ts'],
+
+ extends: [
+ tseslint.configs.recommended,
+ tseslint.configs.recommendedTypeChecked,
+ {
+ files: ['**/*.ts', '**/*.tsx'],
+ languageOptions: {
+ parser: tseslint.parser,
+ parserOptions: {
+ ecmaVersion: 2022,
+ sourceType: 'module',
+ project: './tsconfig.json',
+ },
+ },
+ plugins: {
+ prettier: prettierPlugin,
+ },
+ rules: {
+ '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
+ '@typescript-eslint/no-explicit-any': 'warn',
+ '@typescript-eslint/explicit-function-return-type': 'off',
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
+ '@typescript-eslint/no-non-null-assertion': 'warn',
+ '@typescript-eslint/prefer-nullish-coalescing': 'error',
+ '@typescript-eslint/prefer-optional-chain': 'error',
+ '@typescript-eslint/no-floating-promises': 'error',
+ 'no-console': 'warn',
+ 'prefer-const': 'error',
+ 'prettier/prettier': 'error',
+ },
+ },
+ ],
+
+ languageOptions: {
+ ecmaVersion: 2022,
+ sourceType: 'module',
+ },
+
+ linterOptions: {
+ reportUnusedDisableDirectives: true,
+ },
+});