Skip to content

Commit 021f894

Browse files
Merge branch 'main' into pr/C-Loftus/2061
2 parents 8cc6480 + 301b2d8 commit 021f894

File tree

6,853 files changed

+138174
-76287
lines changed

Some content is hidden

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

6,853 files changed

+138174
-76287
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ insert_final_newline = false
2222
# with a line that has trailing white space. Many of our recorded
2323
# tests use strings with trailing white space to represent the final
2424
# document contents. For example
25-
# packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/ruby/changeCondition.yml
25+
# data/fixtures/recorded/languages/ruby/changeCondition.yml
2626
trim_trailing_whitespace = false
2727

2828
[Makefile]
2929
indent_style = tab
3030

31-
[**/vendor/**]
31+
[**/{vendor,generated}/**]
3232
charset = unset
3333
end_of_line = unset
3434
indent_size = unset

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.eslintrc.json

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,60 @@
44
"extends": [
55
"eslint:recommended",
66
"plugin:@typescript-eslint/recommended",
7+
// We want to enable this in the long run. For now there are a lot of errors that needs to be handled.
8+
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
79
"plugin:import/typescript",
810
"prettier"
911
],
1012
"parserOptions": {
1113
"ecmaVersion": 6,
12-
"sourceType": "module"
14+
"sourceType": "module",
15+
"project": true
1316
},
14-
"plugins": ["@typescript-eslint", "unused-imports", "import", "unicorn"],
17+
"plugins": [
18+
"@typescript-eslint",
19+
"unused-imports",
20+
"import",
21+
"unicorn",
22+
"mocha"
23+
],
1524
"rules": {
1625
"import/no-relative-packages": "error",
26+
"@typescript-eslint/consistent-type-imports": "error",
1727
"@typescript-eslint/consistent-type-assertions": [
1828
"error",
1929
{
2030
"assertionStyle": "as"
2131
}
2232
],
23-
"@typescript-eslint/naming-convention": "warn",
33+
"@typescript-eslint/naming-convention": [
34+
"error",
35+
{
36+
"selector": ["objectLiteralProperty"],
37+
"format": ["camelCase"],
38+
"filter": {
39+
"regex": "[.]",
40+
"match": false
41+
}
42+
}
43+
],
44+
"@typescript-eslint/no-floating-promises": "error",
2445
"@typescript-eslint/no-explicit-any": "off",
2546
"@typescript-eslint/no-inferrable-types": "off",
2647
"@typescript-eslint/no-non-null-assertion": "off",
2748
"unused-imports/no-unused-imports": "error",
2849
"@typescript-eslint/no-unused-vars": [
29-
"warn",
50+
"error",
3051
{
3152
"argsIgnorePattern": "^_",
3253
"varsIgnorePattern": "^_",
54+
"caughtErrorsIgnorePattern": "^_",
3355
"ignoreRestSiblings": true
3456
}
3557
],
36-
"curly": "warn",
58+
"curly": "error",
3759
"eqeqeq": [
38-
"warn",
60+
"error",
3961
"always",
4062
{
4163
"null": "never"
@@ -51,32 +73,48 @@
5173
"error",
5274
"MemberExpression[object.property.name='constructor'][property.name='name']"
5375
],
54-
"no-throw-literal": "warn",
76+
"no-throw-literal": "error",
5577
"semi": "off",
56-
"unicorn/prefer-module": "error"
78+
"unicorn/prefer-module": "error",
79+
"mocha/no-skipped-tests": "error",
80+
"mocha/no-exclusive-tests": "error"
5781
},
5882
"overrides": [
5983
{
6084
"files": ["*.tsx"],
6185
"rules": {
6286
"@typescript-eslint/naming-convention": [
63-
"warn",
87+
"error",
6488
{
6589
"selector": ["function"],
6690
"format": ["PascalCase", "camelCase"]
6791
}
6892
]
6993
}
94+
},
95+
{
96+
"files": [
97+
"jest.config.ts",
98+
"docusaurus.config.mts",
99+
"mdx-components.tsx",
100+
"typings/**"
101+
],
102+
"extends": ["plugin:@typescript-eslint/disable-type-checked"]
70103
}
71104
],
72105
"settings": {
73106
"import/resolver": {
74107
"typescript": {
75108
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
76-
77109
"project": ["tsconfig.json", "packages/*/tsconfig.json"]
78110
}
79111
}
80112
},
81-
"ignorePatterns": ["**/vendor/**/*.ts", "**/vendor/**/*.js", "**/out/**"]
113+
"ignorePatterns": [
114+
"**/generated/**",
115+
"**/out/**",
116+
"**/vendor/**/*.js",
117+
"**/vendor/**/*.ts",
118+
"/data/playground/**"
119+
]
82120
}

.github/CODEOWNERS

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
* @pokey @AndreasArvidsson
1+
* @cursorless-dev/code-owners
2+
3+
*keyboard* @cursorless-dev/code-owners @josharian
4+
*Keyboard* @cursorless-dev/code-owners @josharian
5+
6+
*neovim* @cursorless-dev/code-owners @saidelike @fidgetingbits
7+
*Neovim* @cursorless-dev/code-owners @saidelike @fidgetingbits
8+
*nvim* @cursorless-dev/code-owners @saidelike @fidgetingbits
9+
*Nvim* @cursorless-dev/code-owners @saidelike @fidgetingbits
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
body:
2+
- type: markdown
3+
attributes:
4+
value: |
5+
You are submitting to our Architecture Decision Record.
6+
Learn more about ADRs at <https://adr.github.io>, and discussion #1211.
7+
8+
- type: textarea
9+
attributes:
10+
label: Context
11+
description: The issue motivating this decision, and any context that influences or constrains the decision.
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
attributes:
17+
label: Options considered
18+
19+
- type: textarea
20+
attributes:
21+
label: Decision
22+
description: "The change that we're proposing or have agreed to implement."
23+
24+
- type: textarea
25+
attributes:
26+
label: Consequences
27+
description: What becomes easier or more difficult to do and any risks introduced by the change that will need to be mitigated.

.github/PULL_REQUEST_TEMPLATE/new_programming_language.md

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "Lua Language Server Lint"
2+
description: "Lints all lua files with lua-language-server"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- uses: cachix/install-nix-action@v27
7+
with:
8+
nix_path: nixpkgs=channel:nixos-unstable
9+
- uses: DeterminateSystems/magic-nix-cache-action@v2
10+
- run: nix profile install --accept-flake-config .#lua-language-server
11+
shell: bash
12+
- run: scripts/lint-lua-ls.sh
13+
shell: bash
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Neovim Lua Tests"
2+
description: "Set up Neovim Lua environment and run Busted tests"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- uses: leafo/gh-actions-lua@v10
7+
with:
8+
luaVersion: "luajit-openresty"
9+
- uses: leafo/gh-actions-luarocks@v4
10+
- shell: bash
11+
run: |
12+
luarocks install busted
13+
luarocks install luafilesystem
14+
- shell: bash
15+
run: |
16+
cd cursorless.nvim
17+
busted --run unit

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
steps:
4747
- name: Checkout repository
48-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
4949

5050
# Initializes the CodeQL tools for scanning.
5151
- name: Initialize CodeQL

.github/workflows/deploy.yaml

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
env:
1515
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
20-
- uses: pnpm/action-setup@v2
21-
- uses: actions/setup-node@v3
20+
- run: corepack enable
21+
- uses: actions/setup-node@v4
2222
with:
23-
node-version-file: package.json
23+
node-version-file: .nvmrc
2424
cache: pnpm
2525
- run: pnpm --color install
2626
- run: pnpm --color compile
@@ -40,13 +40,53 @@ jobs:
4040
registryUrl: https://marketplace.visualstudio.com
4141
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}
4242

43+
publish-neovim-extension:
44+
runs-on: ubuntu-latest
45+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
46+
environment: production
47+
env:
48+
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
49+
STAGING_DIRECTORY: ${{ github.workspace }}/cursorless.nvim-staging
50+
steps:
51+
- uses: actions/checkout@v4
52+
- run: corepack enable
53+
- uses: actions/setup-node@v4
54+
with:
55+
node-version-file: .nvmrc
56+
cache: pnpm
57+
- run: pnpm --color install
58+
- run: pnpm --color compile
59+
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
60+
env:
61+
CURSORLESS_DEPLOY: true
62+
- uses: actions/checkout@v4
63+
with:
64+
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}
65+
repository: hands-free-vim/cursorless.nvim
66+
path: ${{ env.STAGING_DIRECTORY }}
67+
- name: Configure GPG Key
68+
working-directory: ${{ env.STAGING_DIRECTORY }}
69+
run: |
70+
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
71+
env:
72+
GPG_SIGNING_KEY: ${{ secrets.CURSORLESS_BOT_GPG_SIGNING_KEY }}
73+
- name: git config
74+
working-directory: ${{ env.STAGING_DIRECTORY }}
75+
run: |
76+
git config user.name cursorless-bot
77+
git config user.email [email protected]
78+
git config user.signingkey A9387720AFC62221
79+
git config commit.gpgsign true
80+
- name: Push compiled files to cursorless.nvim plugin repo
81+
run: bash -x scripts/deploy-cursorless-nvim.sh ${{ env.STAGING_DIRECTORY }}
82+
4383
push-cursorless-talon:
4484
name: Push cursorless-talon subrepo
4585
runs-on: ubuntu-latest
4686
needs: publish-extension
4787
environment: production
4888
steps:
49-
- uses: actions/checkout@v3
89+
- uses: actions/checkout@v4
5090
with:
5191
fetch-depth: 0
5292
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}

0 commit comments

Comments
 (0)