Skip to content

Commit

Permalink
Run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Apr 25, 2022
1 parent c8815db commit 4c06767
Show file tree
Hide file tree
Showing 95 changed files with 497 additions and 502 deletions.
69 changes: 31 additions & 38 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"prettier"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"curly": "warn",
"eqeqeq": [
"warn",
"always",
{
"null": "never"
}
],
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"**/vendor/**/*.ts",
"**/vendor/**/*.js"
]
}
"root": true,
"parser": "@typescript-eslint/parser",
"extends": ["prettier"],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"curly": "warn",
"eqeqeq": [
"warn",
"always",
{
"null": "never"
}
],
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": ["**/vendor/**/*.ts", "**/vendor/**/*.js"]
}
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @pokey
* @pokey
5 changes: 1 addition & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
30 changes: 12 additions & 18 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
"pokey.cursorless-local",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
Expand All @@ -36,9 +34,7 @@
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
Expand All @@ -47,7 +43,7 @@
"request": "launch",
"env": {
"CURSORLESS_TEST": "true",
"CURSORLESS_TEST_UPDATE_FIXTURES": "true",
"CURSORLESS_TEST_UPDATE_FIXTURES": "true"
},
"args": [
"--disable-extension",
Expand All @@ -57,18 +53,16 @@
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Docusaurus Start (Debug)",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}/website",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "start"],
}
"name": "Docusaurus Start (Debug)",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}/website",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "start"]
}
]
}
}
40 changes: 20 additions & 20 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"python.formatting.provider": "black",
"editor.defaultFormatter": "esbenp.prettier-vscode",
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"cSpell.words": [
"Autoformatting",
"camelize",
"canonicalize",
"crosshairs",
"eqeqeq",
"nonlocal",
"pojo",
"subword"
]
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"python.formatting.provider": "black",
"editor.defaultFormatter": "esbenp.prettier-vscode",
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"cSpell.words": [
"Autoformatting",
"camelize",
"canonicalize",
"crosshairs",
"eqeqeq",
"nonlocal",
"pojo",
"subword"
]
}
7 changes: 2 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
"tasks": [
{
"label": "Build",
"dependsOn": [
"ESBuild",
"TSBuild"
],
"dependsOn": ["ESBuild", "TSBuild"],
"group": {
"kind": "build",
"isDefault": true
Expand Down Expand Up @@ -46,4 +43,4 @@
"group": "build"
}
]
}
}
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ node_modules/**
out/**
dist/**
!dist/extension.js
website/**
website/**
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--ignore-engines true
--ignore-engines true
2 changes: 1 addition & 1 deletion cursorless-snippets/link.cursorless-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
],
"description": "Link"
}
}
}
2 changes: 1 addition & 1 deletion cursorless-talon/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @pokey
* @pokey
2 changes: 1 addition & 1 deletion cursorless-talon/.github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
- uses: psf/black@stable
2 changes: 1 addition & 1 deletion cursorless-talon/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.flac
data/
.vscode/settings.json
.vscode/settings.json
2 changes: 1 addition & 1 deletion cursorless-talon/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
10 changes: 4 additions & 6 deletions cursorless-talon/src/actions/actions.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from talon import Module, app, actions
from talon import Module, actions, app

from ..csv_overrides import init_csv_and_watch_changes
from .actions_simple import simple_action_defaults
from .actions_callback import callback_action_defaults, callback_action_map
from .actions_makeshift import (
makeshift_action_defaults,
makeshift_action_map,
)
from .actions_custom import custom_action_defaults
from .actions_makeshift import makeshift_action_defaults, makeshift_action_map
from .actions_simple import simple_action_defaults

mod = Module()

Expand Down
8 changes: 5 additions & 3 deletions cursorless-talon/src/actions/actions_callback.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from talon import Module
from dataclasses import dataclass
from .homophones import run_homophones_action
from .find import run_find_action

from talon import Module

from .call import run_call_action
from .find import run_find_action
from .homophones import run_homophones_action


@dataclass
Expand Down
3 changes: 2 additions & 1 deletion cursorless-talon/src/actions/actions_custom.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from talon import Module, app
from ..csv_overrides import init_csv_and_watch_changes, SPOKEN_FORM_HEADER

from ..csv_overrides import SPOKEN_FORM_HEADER, init_csv_and_watch_changes

custom_action_defaults = {}

Expand Down
3 changes: 2 additions & 1 deletion cursorless-talon/src/actions/actions_makeshift.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from talon import Module
from dataclasses import dataclass

from talon import Module


@dataclass
class MakeshiftAction:
Expand Down
3 changes: 2 additions & 1 deletion cursorless-talon/src/actions/call.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from ..primitive_target import IMPLICIT_TARGET
from talon import Module, actions

from ..primitive_target import IMPLICIT_TARGET

mod = Module()


Expand Down
1 change: 1 addition & 0 deletions cursorless-talon/src/actions/find.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from talon import actions

from .get_text import get_text


Expand Down
1 change: 1 addition & 0 deletions cursorless-talon/src/actions/homophones.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from talon import actions, app

from .get_text import get_text


Expand Down
1 change: 1 addition & 0 deletions cursorless-talon/src/actions/move_bring.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from talon import Module

from ..primitive_target import IMPLICIT_TARGET

mod = Module()
Expand Down
2 changes: 1 addition & 1 deletion cursorless-talon/src/actions/reformat.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from talon import Module, actions
from .get_text import get_text

from .get_text import get_text

mod = Module()

Expand Down
1 change: 1 addition & 0 deletions cursorless-talon/src/actions/swap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from talon import Module

from ..primitive_target import BASE_TARGET

mod = Module()
Expand Down
9 changes: 5 additions & 4 deletions cursorless-talon/src/actions/wrap.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from typing import Any, Union
from ..paired_delimiter import paired_delimiters_map
from talon import Module, actions, app, Context
from ..csv_overrides import init_csv_and_watch_changes
from typing import Any

from talon import Context, Module, actions, app

from ..csv_overrides import init_csv_and_watch_changes
from ..paired_delimiter import paired_delimiters_map

mod = Module()

Expand Down
12 changes: 6 additions & 6 deletions cursorless-talon/src/cheatsheet/cheat_sheet.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from talon import Module, ui, skia, actions, cron
from talon.canvas import Canvas
import webbrowser
import math
import webbrowser

from .sections.actions import get_actions
from .sections.scopes import get_scopes
from .sections.compound_targets import get_compound_targets
from talon import Module, actions, cron, skia, ui
from talon.canvas import Canvas

from .get_list import get_list, get_lists
from .sections.actions import get_actions
from .sections.compound_targets import get_compound_targets
from .sections.scopes import get_scopes

mod = Module()
mod.mode("cursorless_cheat_sheet", "Mode for showing cursorless cheat sheet gui")
Expand Down
2 changes: 1 addition & 1 deletion cursorless-talon/src/cheatsheet/cheat_sheet.talon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mode: user.cursorless_cheat_sheet
-

cursorless help: user.cursorless_cheat_sheet_toggle()
cursorless help: user.cursorless_cheat_sheet_toggle()
6 changes: 4 additions & 2 deletions cursorless-talon/src/cheatsheet/get_list.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from ..conventions import get_cursorless_list_name
from talon import registry
import re

from talon import registry

from ..conventions import get_cursorless_list_name


def get_list(name, descriptions=None):
if descriptions is None:
Expand Down
2 changes: 1 addition & 1 deletion cursorless-talon/src/cheatsheet/sections/actions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from ..get_list import get_raw_list, make_dict_readable
from ...actions.actions import ACTION_LIST_NAMES
from ..get_list import get_raw_list, make_dict_readable


def get_actions():
Expand Down
Loading

0 comments on commit 4c06767

Please sign in to comment.