Skip to content

Commit ee0d7be

Browse files
author
Bubba
committed
chore: add ESLint config with TypeScript-recommended rules (minimal, any allowed, _-prefix unused vars as warn)
1 parent 0f43012 commit ee0d7be

3 files changed

Lines changed: 1113 additions & 20 deletions

File tree

.eslintrc.cjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// @ts-check
2+
'use strict';
3+
4+
/** @type {import('eslint').Linter.Config} */
5+
module.exports = {
6+
root: true,
7+
parser: '@typescript-eslint/parser',
8+
parserOptions: {
9+
ecmaVersion: 2020,
10+
sourceType: 'module',
11+
},
12+
plugins: ['@typescript-eslint'],
13+
extends: [
14+
'eslint:recommended',
15+
'plugin:@typescript-eslint/recommended',
16+
],
17+
rules: {
18+
// Allow explicit `any` — codebase uses it intentionally in many places
19+
'@typescript-eslint/no-explicit-any': 'off',
20+
// Allow unused vars prefixed with _ (common pattern in this codebase)
21+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
22+
// Allow require() in .cjs files
23+
'@typescript-eslint/no-var-requires': 'off',
24+
},
25+
ignorePatterns: [
26+
'dist/',
27+
'node_modules/',
28+
'coverage/',
29+
'*.d.ts',
30+
],
31+
};

0 commit comments

Comments
 (0)