Skip to content

Commit b072615

Browse files
authored
Merge branch 'main' into generate-examples
2 parents c0e9532 + f041217 commit b072615

File tree

2,790 files changed

+28226
-14007
lines changed

Some content is hidden

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

2,790 files changed

+28226
-14007
lines changed

.eslintrc.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
"ecmaVersion": 6,
1111
"sourceType": "module"
1212
},
13-
"plugins": ["@typescript-eslint"],
13+
"plugins": ["@typescript-eslint", "unused-imports"],
1414
"rules": {
15+
// Note: you must disable the base rule as it can report incorrect errors
16+
"no-restricted-imports": "off",
17+
"@typescript-eslint/no-restricted-imports": "error",
1518
"@typescript-eslint/consistent-type-assertions": [
1619
"error",
1720
{
@@ -22,6 +25,7 @@
2225
"@typescript-eslint/no-explicit-any": "off",
2326
"@typescript-eslint/no-inferrable-types": "off",
2427
"@typescript-eslint/no-non-null-assertion": "off",
28+
"unused-imports/no-unused-imports": "error",
2529
"@typescript-eslint/no-unused-vars": [
2630
"warn",
2731
{
@@ -38,7 +42,12 @@
3842
"null": "never"
3943
}
4044
],
41-
"no-constant-condition": ["error", { "checkLoops": false }],
45+
"no-constant-condition": [
46+
"error",
47+
{
48+
"checkLoops": false
49+
}
50+
],
4251
"no-throw-literal": "warn",
4352
"semi": "off"
4453
},

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
4c0676728c0ccfdcc4b6593a4a13ac49fc20a82a
2+
619d7f7271506c7fd5913cca68574f722ab392d8

.github/FUNDING.yml

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
## Checklist
22

33
- [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
4+
- [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet)
5+
- [ ] I have not broken the cheatsheet

.github/workflows/deploy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1313
environment: production
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
18-
- uses: actions/setup-node@v2
18+
- uses: actions/setup-node@v3
1919
with:
2020
node-version: 16
2121
cache: yarn
@@ -46,7 +46,7 @@ jobs:
4646
needs: publish-extension
4747
environment: production
4848
steps:
49-
- uses: actions/checkout@v2
49+
- uses: actions/checkout@v3
5050
with:
5151
fetch-depth: 0
5252
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}

.github/workflows/test-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
test-docs-build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
1414
with:
1515
node-version: 16
1616
cache: yarn

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
env:
2424
VSCODE_VERSION: ${{ matrix.vscode_version }}
2525
steps:
26-
- uses: actions/checkout@v2
27-
- uses: actions/setup-node@v2
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-node@v3
2828
with:
2929
node-version: 16
3030
cache: yarn

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,5 @@ node_modules
99
# TypeDoc output
1010
docs/contributing/api/
1111

12-
# Generated docs hub
13-
website-root/docs/
14-
1512
# Local extension / data sandbox for debug launch task
1613
/.vscode-sandbox

.pre-commit-config.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ repos:
3232
hooks:
3333
- id: flynt
3434
- repo: https://github.com/Zac-HD/shed
35-
rev: 0.10.1
35+
rev: 0.10.7
3636
hooks:
3737
- id: shed
3838
# TODO: bump to --py310-plus when Talon moves to Python 3.10.
3939
args: [--refactor, --py39-plus]
4040
types_or: [python, markdown, rst]
41+
- repo: https://github.com/wenkokke/talonfmt
42+
rev: 1.8.1
43+
hooks:
44+
- id: talonfmt
45+
args: ["--in-place", "--max-line-width=88"]

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22

33
# We use our own format for our recorded yaml tests to keep them compact
44
/src/test/suite/fixtures/recorded/**/*.yml
5+
6+
7+
# This was swizzled from a Docusaurus core class
8+
docs-site/src/theme/SearchBar/index.js

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"trailingComma": "all"
3+
}

.vscode/launch.json

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,25 @@
4444
"args": [
4545
"--extensions-dir=${workspaceFolder}/.vscode-sandbox/extensions",
4646
"--extensionDevelopmentPath=${workspaceFolder}",
47-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
47+
"--extensionTestsPath=${workspaceFolder}/out/test/runners/all"
4848
],
49-
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
49+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
50+
"preLaunchTask": "${defaultBuildTask}",
51+
"resolveSourceMapLocations": [
52+
"${workspaceFolder}/**",
53+
"!${workspaceFolder}/.vscode-sandbox/**",
54+
"!**/node_modules/**"
55+
]
56+
},
57+
{
58+
"type": "node",
59+
"request": "launch",
60+
"name": "Unit tests only",
61+
"program": "${workspaceFolder}/out/test/scripts/runUnitTestsOnly",
62+
"env": {
63+
"CURSORLESS_TEST": "true"
64+
},
65+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
5066
"preLaunchTask": "${defaultBuildTask}",
5167
"resolveSourceMapLocations": [
5268
"${workspaceFolder}/**",
@@ -65,9 +81,9 @@
6581
"args": [
6682
"--extensions-dir=${workspaceFolder}/.vscode-sandbox/extensions",
6783
"--extensionDevelopmentPath=${workspaceFolder}",
68-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
84+
"--extensionTestsPath=${workspaceFolder}/out/test/runners/all"
6985
],
70-
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
86+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
7187
"preLaunchTask": "${defaultBuildTask}",
7288
"resolveSourceMapLocations": [
7389
"${workspaceFolder}/**",
@@ -86,9 +102,9 @@
86102
"args": [
87103
"--extensions-dir=${workspaceFolder}/.vscode-sandbox/extensions",
88104
"--extensionDevelopmentPath=${workspaceFolder}",
89-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
105+
"--extensionTestsPath=${workspaceFolder}/out/test/runners/all"
90106
],
91-
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
107+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
92108
"preLaunchTask": "${defaultBuildTask}",
93109
"resolveSourceMapLocations": [
94110
"${workspaceFolder}/**",
@@ -108,9 +124,9 @@
108124
"args": [
109125
"--extensions-dir=${workspaceFolder}/.vscode-sandbox/extensions",
110126
"--extensionDevelopmentPath=${workspaceFolder}",
111-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
127+
"--extensionTestsPath=${workspaceFolder}/out/test/runners/all"
112128
],
113-
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
129+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
114130
"preLaunchTask": "${defaultBuildTask}",
115131
"resolveSourceMapLocations": [
116132
"${workspaceFolder}/**",
@@ -122,14 +138,26 @@
122138
"name": "Docusaurus Start (Debug)",
123139
"type": "node",
124140
"request": "launch",
125-
"cwd": "${workspaceFolder}/website",
141+
"cwd": "${workspaceFolder}/docs-site",
126142
"runtimeExecutable": "npm",
127143
"runtimeArgs": ["run", "start"],
128144
"resolveSourceMapLocations": [
129145
"${workspaceFolder}/**",
130146
"!${workspaceFolder}/.vscode-sandbox/**",
131147
"!**/node_modules/**"
132148
]
149+
},
150+
{
151+
"name": "cursorless.org client-side",
152+
"type": "chrome",
153+
"request": "launch",
154+
"url": "http://localhost:4200",
155+
"webRoot": "${workspaceFolder}/cursorless-nx",
156+
"sourceMapPathOverrides": {
157+
"webpack://_N_E/*": "${webRoot}/apps/cursorless-org/*",
158+
"webpack://_N_E/libs/*": "${webRoot}/libs/*",
159+
"webpack://_N_E/node_modules/*": "${webRoot}/node_modules/*"
160+
}
133161
}
134162
]
135163
}

.vscode/tasks.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,30 @@
4141
"reveal": "never"
4242
},
4343
"group": "build"
44+
},
45+
{
46+
"label": "Serve cursorless.org",
47+
"type": "shell",
48+
"command": "nx serve cursorless-org",
49+
"options": {
50+
"cwd": "cursorless-nx"
51+
},
52+
"problemMatcher": []
53+
},
54+
{
55+
"label": "Install local",
56+
"type": "shell",
57+
"command": "vsce package -o bundle.vsix && code --install-extension bundle.vsix",
58+
"presentation": {
59+
"focus": true
60+
},
61+
"problemMatcher": []
62+
},
63+
{
64+
"label": "Run pre commit",
65+
"type": "shell",
66+
"command": "pre-commit run",
67+
"presentation": {}
4468
}
4569
]
4670
}
320 Bytes
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
}
9+
]
10+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"fileServerFolder": ".",
3+
"fixturesFolder": "./src/fixtures",
4+
"integrationFolder": "./src/integration",
5+
"modifyObstructiveCode": false,
6+
"supportFile": "./src/support/index.ts",
7+
"pluginsFile": false,
8+
"video": true,
9+
"videosFolder": "../../dist/cypress/apps/cursorless-org-e2e/videos",
10+
"screenshotsFolder": "../../dist/cypress/apps/cursorless-org-e2e/screenshots",
11+
"chromeWebSecurity": false
12+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
3+
"sourceRoot": "apps/cursorless-org-e2e/src",
4+
"projectType": "application",
5+
"targets": {
6+
"e2e": {
7+
"executor": "@nrwl/cypress:cypress",
8+
"options": {
9+
"cypressConfig": "apps/cursorless-org-e2e/cypress.json",
10+
"devServerTarget": "cursorless-org:serve:development"
11+
},
12+
"configurations": {
13+
"production": {
14+
"devServerTarget": "cursorless-org:serve:production"
15+
}
16+
}
17+
},
18+
"lint": {
19+
"executor": "@nrwl/linter:eslint",
20+
"outputs": ["{options.outputFile}"],
21+
"options": {
22+
"lintFilePatterns": ["apps/cursorless-org-e2e/**/*.{js,ts}"]
23+
}
24+
}
25+
},
26+
"tags": [],
27+
"implicitDependencies": ["cursorless-org"]
28+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "[email protected]"
4+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { getGreeting } from '../support/app.po';
2+
3+
describe('cursorless-org', () => {
4+
beforeEach(() => cy.visit('/'));
5+
6+
it('should display welcome message', () => {
7+
// Custom command example, see `../support/commands.ts` file
8+
cy.login('[email protected]', 'myPassword');
9+
10+
// Function helper example, see `../support/app.po.ts` file
11+
getGreeting().contains('Welcome cursorless-org');
12+
});
13+
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const getGreeting = () => cy.get('h1');
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// ***********************************************
2+
// This example commands.js shows you how to
3+
// create various custom commands and overwrite
4+
// existing commands.
5+
//
6+
// For more comprehensive examples of custom
7+
// commands please read more here:
8+
// https://on.cypress.io/custom-commands
9+
// ***********************************************
10+
11+
// eslint-disable-next-line @typescript-eslint/no-namespace
12+
declare namespace Cypress {
13+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
14+
interface Chainable<Subject> {
15+
login(email: string, password: string): void;
16+
}
17+
}
18+
//
19+
// -- This is a parent command --
20+
Cypress.Commands.add('login', (email, password) => {
21+
console.log('Custom command example: Login', email, password);
22+
});
23+
//
24+
// -- This is a child command --
25+
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
26+
//
27+
//
28+
// -- This is a dual command --
29+
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
30+
//
31+
//
32+
// -- This will overwrite an existing command --
33+
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// ***********************************************************
2+
// This example support/index.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import './commands';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"sourceMap": false,
5+
"outDir": "../../dist/out-tsc",
6+
"allowJs": true,
7+
"types": ["cypress", "node"]
8+
},
9+
"include": ["src/**/*.ts", "src/**/*.js"]
10+
}

0 commit comments

Comments
 (0)