-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy patheslint.config.mjs
More file actions
59 lines (53 loc) · 2 KB
/
eslint.config.mjs
File metadata and controls
59 lines (53 loc) · 2 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import eslint from '@eslint/js';
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';
import jsdoc from 'eslint-plugin-jsdoc';
export default defineConfig(
// Global ignores (replaces .eslintignore)
{
ignores: ['scripts/', 'docs/', 'dist/', 'node_modules/'],
},
// Base configs
eslint.configs.recommended,
tseslint.configs.recommended,
// JSDoc plugin
jsdoc.configs['flat/recommended'],
// Prettier (disables conflicting rules)
eslintConfigPrettier,
// Project-specific overrides for TypeScript plugin files
{
files: ['src/**/*.ts'],
rules: {
// TypeScript rules
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-wrapper-object-types': 'error',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-unsafe-declaration-merging': 'warn',
'@typescript-eslint/no-duplicate-enum-values': 'warn',
'@typescript-eslint/no-require-imports': 'off',
'no-empty': 'warn',
'no-irregular-whitespace': 'warn',
'no-empty-pattern': 'warn',
// JSDoc rules - relaxed for plugin wrappers (stub methods, Cordova untyped APIs)
'jsdoc/tag-lines': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/require-returns-check': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/check-tag-names': 'off',
'jsdoc/reject-any-type': 'off',
'jsdoc/no-undefined-types': 'off',
'jsdoc/reject-function-type': 'off',
'jsdoc/require-param': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/check-param-names': 'off',
'jsdoc/check-types': 'off',
},
}
);