-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
31 lines (25 loc) · 1.03 KB
/
Copy patheslint.config.mjs
File metadata and controls
31 lines (25 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// @ts-check
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
export default {
files: ['**/*.ts', '***/*.tsx'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended', // TypeScript recommended rules
'plugin:@typescript-eslint/recommended-type-checked', // TypeScript recommended rules with type checking
'prettier' // Make sure this is always last
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
tsconfigRootDir: __dirname // Use __dirname for CommonJS
},
rules: {
// Add or override rules here as needed
'@typescript-eslint/no-unused-vars': 'warn', // Example: Warn on unused vars
'@typescript-eslint/explicit-function-return-type': 'off', // Allow implicit return types
'@typescript-eslint/no-explicit-any': 'warn', // Warn on using any type
'no-useless-catch': 'off',
quotes: ['error', 'single', { allowTemplateLiterals: true }]
}
};