-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
33 lines (32 loc) 路 1.18 KB
/
Copy patheslint.config.mjs
File metadata and controls
33 lines (32 loc) 路 1.18 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
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: ['dist/**', 'coverage/**', 'node_modules/**', 'release/**'],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
globals: {
chrome: 'readonly',
},
},
rules: {
// The NetworkOverrides* namespaces are consumed cross-file at runtime
// (script tags / importScripts), so eslint sees them as unused.
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^NetworkOverrides' },
],
'@typescript-eslint/no-explicit-any': 'off',
'no-empty': ['warn', { allowEmptyCatch: true }],
// This extension shares code between separately-compiled entry points via
// global TypeScript namespaces loaded through <script> tags / importScripts
// (MV3 service workers and unbundled HTML pages can't use ES imports here).
// Namespaces + triple-slash references are the intentional mechanism, not a bug.
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
},
}
);