-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
44 lines (41 loc) · 1.33 KB
/
Copy patheslint.config.mjs
File metadata and controls
44 lines (41 loc) · 1.33 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
import js from '@eslint/js';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
export default [
js.configs.recommended,
/* All TypeScript source (Node context) -------------------- */
{
files: ['**/*.ts'],
languageOptions: { parser: tsParser },
plugins: { '@typescript-eslint': tsPlugin },
rules: {
// Generic style / safety
'semi': ['error', 'always'],
'quotes': ['error', 'double'],
'@typescript-eslint/no-explicit-any': 'warn',
// Delegate unused-var checking to TS version
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
},
},
/* Web-view front-end files (browser context) -------------- */
{
files: ['resources/js/**/*.js'],
languageOptions: {
globals: {
window: 'readonly',
document: 'readonly',
navigator: 'readonly',
console: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
acquireVsCodeApi: 'readonly', // VS Code web-view bridge
},
},
rules: {
'semi': ['error', 'always'],
'quotes': ['error', 'double'],
'no-unused-vars': 'warn',
},
},
];