File size: 4,013 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
  // Formatting using Prettier by default for all languages
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  // Formatting using Prettier for JavaScript, overrides VSCode default.
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  // Formatting using Rust-Analyzer for Rust.
  "[rust]": {
    "editor.defaultFormatter": "rust-lang.rust-analyzer"
  },
  // Linting using ESLint.
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ],
  "eslint.useFlatConfig": false,
  // Set Jest runMode to on-demand as otherwise it will start running all tests the first time.
  // Equivalent to deprecated option "jest.autoRun": "off"
  "jest.runMode": "on-demand",
  // Debugging.
  "debug.javascript.unmapMissingSources": true,
  "files.exclude": {
    "*[!test]**/node_modules": true
  },
  // Ensure enough terminal history is preserved when running tests.
  "terminal.integrated.scrollback": 10000,
  // Configure todo-tree to exclude node_modules, dist, and compiled.
  "todo-tree.filtering.excludeGlobs": [
    "**/node_modules",
    "**/dist",
    "**/compiled"
  ],
  // Match TODO-APP in addition to other TODOs.
  "todo-tree.general.tags": [
    "BUG",
    "HACK",
    "FIXME",
    "TODO",
    "XXX",
    "[ ]",
    "[x]",
    "TODO-APP"
  ],
  "typescript.preferences.autoImportFileExcludePatterns": [
    // templates reexport many things (see e.g. entry-base.ts), so they clutter import suggestions
    "packages/next/src/build/templates/app-page.ts",
    "packages/next/src/build/templates/app-route.ts",
    "packages/next/src/build/templates/edge-app-route.ts",
    "packages/next/src/build/templates/edge-ssr-app.ts",
    "packages/next/src/build/templates/edge-ssr.ts",
    "packages/next/src/build/templates/middleware.ts",
    "packages/next/src/build/templates/pages-api.ts",
    "packages/next/src/build/templates/pages-edge-api.ts",
    "packages/next/src/build/templates/pages.ts",
    "packages/next/src/server/app-render/entry-base.ts",
    // singleton modules should always use "*.external" instead of "*-instance"
    "packages/next/src/server/app-render/action-async-storage-instance.ts",
    "packages/next/src/server/app-render/after-task-async-storage-instance.ts",
    "packages/next/src/server/app-render/dynamic-access-async-storage-instance.ts",
    "packages/next/src/server/app-render/work-async-storage-instance.ts",
    "packages/next/src/server/app-render/work-unit-async-storage-instance.ts",
    "packages/next/src/client/components/segment-cache-impl/*"
  ],
  // Disable TypeScript surveys.
  "typescript.surveys.enabled": false,
  // Enable file nesting for unit test files.
  "explorer.fileNesting.enabled": true,
  "explorer.fileNesting.patterns": {
    "*.ts": "$(capture).test.ts, $(capture).test.tsx, $(capture).stories.tsx",
    "*.tsx": "$(capture).test.ts, $(capture).test.tsx, $(capture).stories.tsx"
  },
  // Compile rust-analyzer in a separate directory to avoid conflicts with the main project.
  "rust-analyzer.cargo.targetDir": true,
  "rust-analyzer.server.extraEnv": {
    "RUST_BACKTRACE": "0"
  },
  "cSpell.words": [
    "codemod",
    "codemods",
    "Destructuring",
    "buildtime",
    "callsites",
    "codemod",
    "datastream",
    "deduped",
    "draftmode",
    "Entrypoints",
    "jscodeshift",
    "napi",
    "navigations",
    "nextjs",
    "opentelemetry",
    "Preinit",
    "prerendered",
    "prerendering",
    "proxied",
    "renderable",
    "revalidates",
    "subresource",
    "thenables",
    "Threadsafe",
    "Turbopack",
    "unproxied",
    "zipkin"
  ],
  "grammarly.selectors": [
    {
      "language": "markdown",
      "scheme": "file"
    }
  ],
  "typescript.tsdk": "node_modules/typescript/lib",
  "gitlens.advanced.blame.customArguments": [
    "--ignore-revs-file",
    "${workspaceRoot}/.git-blame-ignore-revs"
  ],
  "astGrep.serverPath": "node_modules/@ast-grep/cli/ast-grep",
  "rust-analyzer.imports.prefix": "crate"
}