Skip to content

Commit 4420e4a

Browse files
authored
Merge branch 'sourcegraph:main' into main
2 parents f1db9c9 + 7f6651b commit 4420e4a

File tree

1,958 files changed

+23195
-39900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,958 files changed

+23195
-39900
lines changed

.bazeliskrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
BAZELISK_BASE_URL=https://github.com/aspect-build/aspect-cli/releases/download
2-
USE_BAZEL_VERSION=aspect/5.5.4
2+
USE_BAZEL_VERSION=aspect/5.8.5

.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ test:go-verbose-test --test_env=GO_TEST_WRAP_TESTV=1
4747
# .aspect/bazelrc/correctness.bazelrc sets this, but this breaks with a lot of Go external deps, so
4848
# we instead disable it.
4949
common --noincompatible_disallow_empty_glob
50+
51+
# Ensure clippy runs for rust targets
52+
build --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
53+
build --output_groups=+clippy_checks

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.1.1
1+
7.0.0-pre.20231011.2

.browserslistrc

Lines changed: 0 additions & 19 deletions
This file was deleted.

.buildkite/hooks/pre-command

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ set -e
55
# Create the folder for annotations
66
mkdir -p ./annotations/
77

8+
if [[ "$BUILDKITE_AGENT_META_DATA_QUEUE" =~ aspect-.* ]]; then
9+
exit 0
10+
fi
11+
812
# asdf setup
913
# ----------
1014
if [[ "$BUILDKITE_AGENT_META_DATA_QUEUE" != "bazel" && "$BUILDKITE_AGENT_META_DATA_QUEUE" != "macos" ]]; then

.buildkite/pipeline.async.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.dockerignore

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,6 @@ pnpm-debug.log
4646

4747
/cmd/frontend/internal/graphqlbackend/node_modules
4848

49-
/ui/artifacts
50-
/ui/node_modules
51-
/ui/assets/_goTemplates.js
52-
/ui/assets/analytics.js
53-
/ui/assets/bundle.js
54-
/ui/assets/bundle.css
55-
/ui/assets/sourcebox.js
56-
/ui/assets/sourcebox.css
57-
/ui/assets/test.js
58-
/ui/assets/test.css
59-
/ui/assets/vs
60-
/ui/assets/*.html
61-
/ui/assets/*.map
62-
/ui/assets/extension
63-
/ui/.tmp
6449
*.json.actual
6550

6651
eb-bundle.zip

.eslintignore

Lines changed: 0 additions & 15 deletions
This file was deleted.

.eslintrc.js

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
11
// @ts-check
22

3+
// Use faster experimental way of doing multi-project TypeScript linting. See
4+
// https://github.com/typescript-eslint/typescript-eslint/pull/6754.
5+
process.env.TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER = 'true'
6+
37
const config = {
8+
root: true,
9+
ignorePatterns: [
10+
'**/graphql-operations.ts',
11+
'**/node_modules/**',
12+
'out/',
13+
'dist/',
14+
'src/schema/*',
15+
'graphql-operations.ts',
16+
'GH2SG.bookmarklet.js',
17+
'**/vendor/*.js',
18+
'svelte.config.js',
19+
'vite.config.ts',
20+
'playwright.config.ts',
21+
'.vscode-test',
22+
'**/*.json',
23+
'**/*.d.ts',
24+
'eslint-relative-formatter.js',
25+
'typedoc.js',
26+
'bundlesize.config.js',
27+
],
428
extends: ['@sourcegraph/eslint-config', 'plugin:storybook/recommended'],
529
env: {
630
browser: true,
@@ -13,8 +37,8 @@ const config = {
1337
ecmaFeatures: {
1438
jsx: true,
1539
},
16-
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
17-
project: __dirname + '/tsconfig.eslint.json',
40+
EXPERIMENTAL_projectService: true,
41+
project: __dirname + '/tsconfig.all.json',
1842
},
1943
settings: {
2044
react: {
@@ -52,6 +76,15 @@ const config = {
5276
],
5377
// This converts 'import {type foo} from ...' to 'import type {foo} from ...'
5478
'@typescript-eslint/no-import-type-side-effects': ['warn'],
79+
80+
// These rules are very slow on-save.
81+
'@typescript-eslint/no-unsafe-assignment': 'off',
82+
'@typescript-eslint/unbound-method': 'off',
83+
'@typescript-eslint/no-misused-promises': 'off',
84+
'@typescript-eslint/no-unnecessary-qualifier': 'off',
85+
'@typescript-eslint/no-unused-vars': 'off', // also duplicated by tsconfig noUnused{Locals,Parameters}
86+
'etc/no-deprecated': 'off',
87+
5588
'no-restricted-imports': [
5689
'error',
5790
{
@@ -99,6 +132,9 @@ See https://handbook.sourcegraph.com/community/faq#is-all-of-sourcegraph-open-so
99132
'!@sourcegraph/branded/src/search-ui/experimental',
100133
'!@sourcegraph/*/src/testing',
101134
'!@sourcegraph/*/src/stories',
135+
'!@sourcegraph/build-config/src/esbuild/*',
136+
'!@sourcegraph/build-config/src/*',
137+
'!@sourcegraph/testing/src/jestDomMatchers',
102138
],
103139
message:
104140
'Imports from package internals are banned. Add relevant export to the entry point of the package to import it from the outside world.',
@@ -108,6 +144,11 @@ See https://handbook.sourcegraph.com/community/faq#is-all-of-sourcegraph-open-so
108144
message:
109145
"Please don't import stuff from the 'out' directory. It’s generated code. Remove the 'out/' part and you should be good go to.",
110146
},
147+
{
148+
group: ['!@sourcegraph/cody-shared/*', '!@sourcegraph/cody-ui/*'],
149+
message:
150+
"Allowed imports from @sourcegraph/cody-* packages while those packages' APIs are being stabilized.",
151+
},
111152
],
112153
},
113154
],
@@ -242,7 +283,26 @@ See https://handbook.sourcegraph.com/community/faq#is-all-of-sourcegraph-open-so
242283
},
243284
],
244285
'import/order': 'off',
245-
'etc/no-deprecated': 'off',
286+
'unicorn/expiring-todo-comments': 'off',
287+
288+
// These rules were newly introduced in @sourcegraph/[email protected] and have not yet been
289+
// fixed in our existing code.
290+
'unicorn/prefer-top-level-await': 'warn',
291+
'unicorn/prefer-logical-operator-over-ternary': 'warn',
292+
'unicorn/prefer-blob-reading-methods': 'warn',
293+
'unicorn/prefer-event-target': 'warn',
294+
'etc/throw-error': 'warn',
295+
'rxjs/throw-error': 'warn',
296+
'prefer-promise-reject-errors': 'warn',
297+
'@typescript-eslint/no-redundant-type-constituents': 'warn',
298+
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
299+
'@typescript-eslint/prefer-optional-chain': 'warn',
300+
'@typescript-eslint/no-duplicate-enum-values': 'warn',
301+
'@typescript-eslint/no-floating-promises': 'warn',
302+
303+
'jsdoc/check-alignment': 'off',
304+
305+
'unicorn/no-negated-condition': 'off', // this one reduces code readability, should remove it from @sourcegraph/eslint-config too
246306
},
247307
overrides: [
248308
{
@@ -259,11 +319,24 @@ See https://handbook.sourcegraph.com/community/faq#is-all-of-sourcegraph-open-so
259319
},
260320
},
261321
{
262-
files: ['**/gulpfile.js', '**/story/**.tsx', '**/story/**.ts', '*.story.tsx'],
322+
files: ['**/dev/**/*.ts', '**/story/**.tsx', '**/story/**.ts', '*.story.tsx', 'client/build-config/**'],
323+
rules: {
324+
'no-console': 'off',
325+
'no-sync': 'off',
326+
},
327+
},
328+
{
329+
files: ['client/browser/**', 'client/jetbrains/**'],
263330
rules: {
264331
'no-console': 'off',
265332
},
266333
},
334+
335+
// client/web
336+
{
337+
files: ['client/web/src/stores/**.ts', 'client/web/src/__mocks__/zustand.ts'],
338+
rules: { 'no-restricted-imports': 'off' },
339+
},
267340
],
268341
}
269342

.github/workflows/batches-notify.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)