-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy patheslint.config.js
More file actions
44 lines (42 loc) · 1.02 KB
/
eslint.config.js
File metadata and controls
44 lines (42 loc) · 1.02 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 { defineConfig } from '@vida0905/eslint-config'
const RESTRICTED_IMPORTS_NODE = {
regex: '^node:',
message: 'Node.js built-in modules are not available in browser environments.',
}
export default defineConfig(
{
pnpm: true,
typescript: true,
ignores: ['playground', 'tests/fixtures'],
},
{
name: 'extensions/all',
files: ['src/**/*'],
rules: {
'no-restricted-imports': ['error', {
patterns: [
{
regex: '^semver$',
message: 'Please use the subpath import for smaller bundle size',
},
RESTRICTED_IMPORTS_NODE,
],
}],
},
},
{
name: 'extensions/commands',
files: ['src/commands/**'],
rules: {
'no-restricted-imports': ['error', {
paths: [
{
name: 'reactive-vscode',
message: 'Do not use reactive-vscode composables in command handlers. Use vscode API directly.',
},
],
patterns: [RESTRICTED_IMPORTS_NODE],
}],
},
},
)