Skip to content

Commit 16228b7

Browse files
Added stylelint (#3225)
1 parent 3e43a27 commit 16228b7

20 files changed

Lines changed: 741 additions & 142 deletions

File tree

.github/actions/lint-lua-ls/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runs:
77
with:
88
nix_path: nixpkgs=channel:nixos-unstable
99
- uses: DeterminateSystems/magic-nix-cache-action@v2
10-
- run: nix profile install --accept-flake-config .#lua-language-server
10+
- run: nix profile add --accept-flake-config .#lua-language-server
1111
shell: bash
1212
- run: scripts/lint-lua-ls.sh
1313
shell: bash

.gitignore

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,19 @@
1-
out
2-
dist
3-
testOut
41
node_modules
5-
.vscode-test/
6-
*.vsix
7-
/package-lock.json
2+
.vscode-test
3+
packages/*/out
4+
packages/*/dist
5+
packages/*/build
6+
packages/*/.docusaurus
7+
88
.DS_Store
9-
meta.json
9+
tsconfig.tsbuildinfo
10+
*.vsix
1011
.luacheckcache
1112

12-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
13-
14-
# dependencies
15-
.pnp
16-
.pnp.js
17-
18-
# testing
19-
coverage
20-
21-
# next.js
22-
.next/
23-
24-
# production
25-
build
26-
27-
# misc
28-
*.pem
29-
30-
# debug
31-
npm-debug.log*
32-
yarn-debug.log*
33-
yarn-error.log*
34-
.pnpm-debug.log*
35-
36-
# local env files
37-
.env*.local
38-
39-
# vercel
40-
.vercel
41-
42-
# typescript
43-
*.tsbuildinfo
44-
next-env.d.ts
45-
4613
# test subset config
4714
packages/test-harness/testSubsetGrep.properties
4815
packages/test-harness/failedTests.properties
4916

50-
5117
# cursorless-neovim
5218
cursorless.nvim/node/cursorless-neovim
5319
cursorless.nvim/node/test-harness
54-
55-
# nix
56-
.direnv/

.luarc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"runtime.version": "Lua 5.1",
33
"diagnostics.ignoredFiles": "Disable",
44
"diagnostics.globals": ["vim", "talon", "it", "describe"],
5-
"workspace.ignoreDir": ["data/playground/lua/", ".luarocks", ".lua"]
5+
"workspace.ignoreDir": ["data/playground/lua/", ".luarocks", ".lua", "dist"]
66
}

.prettierignore

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
**/vendor
2-
**/generated
3-
**/.docusaurus
1+
.git
2+
node_modules
3+
.vscode-test
4+
packages/*/out
5+
packages/*/dist
6+
packages/*/build
7+
packages/*/.docusaurus
8+
packages/cursorless-vscode/src/keyboard/grammar/generated
9+
packages/cursorless-engine/src/customCommandGrammar/generated
10+
packages/cursorless-engine/src/snippets/vendor
411

512
# We use our own format for our recorded yaml tests to keep them compact
613
/data/fixtures/recorded/**/*.yml

.stylelintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.git
2+
node_modules
3+
.vscode-test
4+
packages/*/out
5+
packages/*/dist
6+
packages/*/build
7+
packages/*/.docusaurus

cursorless-talon/src/spoken_forms.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import json
22
from pathlib import Path
3-
from typing import Callable, Concatenate, Sequence
3+
from typing import Callable, Concatenate, ParamSpec, Sequence, TypeVar
44

55
from talon import app, cron, fs, registry
66

@@ -24,7 +24,11 @@
2424
disposables: list[Callable] = []
2525

2626

27-
def auto_construct_defaults[**P, R](
27+
P = ParamSpec("P")
28+
R = TypeVar("R")
29+
30+
31+
def auto_construct_defaults(
2832
spoken_forms: dict[str, ListToSpokenForms],
2933
handle_new_values: Callable[[str, Sequence[SpokenFormEntry]], None],
3034
f: Callable[

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
"fix:meta": "pnpm run meta-updater && pnpm -r exec prettier --write tsconfig.json package.json",
1717
"fix:syncpack": "syncpack fix",
1818
"fix:eslint": "pnpm lint:ts --fix",
19+
"fix:style": "stylelint '**/*.{css,scss}' --fix",
1920
"fix:prettier": "prettier --write --list-different .",
2021
"lint:meta": "pnpm run meta-updater --test",
2122
"lint:syncpack": "syncpack lint",
2223
"lint:ts": "eslint packages",
2324
"lint:prettier": "prettier --check .",
24-
"lint": "pnpm run lint:meta && pnpm run lint:syncpack && pnpm run lint:ts",
25+
"lint:style": "stylelint '**/*.{css,scss}'",
26+
"lint": "pnpm run lint:meta && pnpm run lint:syncpack && pnpm run lint:ts && pnpm run lint:style",
2527
"init-vscode-sandbox": "pnpm -F @cursorless/cursorless-vscode init-launch-sandbox",
2628
"meta-updater": "env NODE_OPTIONS='--import=tsx --conditions=cursorless:bundler' meta-updater",
2729
"preinstall": "npx only-allow pnpm",
@@ -51,6 +53,9 @@
5153
"eslint-plugin-unicorn": "^63.0.0",
5254
"eslint-plugin-unused-imports": "^4.4.1",
5355
"prettier": "^3.8.1",
56+
"stylelint": "^17.4.0",
57+
"stylelint-config-standard": "^40.0.0",
58+
"stylelint-config-standard-scss": "^17.0.0",
5459
"syncpack": "^14.2.0",
5560
"tsx": "^4.21.0",
5661
"typescript": "^5.9.3",

packages/cheatsheet-local/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@
3636
"typescript": "^5.9.3",
3737
"vite": "^8.0.0",
3838
"vite-plugin-purgecss": "^0.2.13",
39-
"vite-plugin-singlefile": "^2.3.0"
39+
"vite-plugin-singlefile": "^2.3.2"
4040
}
4141
}

packages/cheatsheet/src/lib/cheatsheet.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
--table-th-bg: #c4b4ff;
1010
--capture-bg: #cecbda;
1111
}
12+
1213
.cheatsheet #legend .table {
1314
--bs-table-striped-bg: #ddd6ff;
1415
--bs-table-bg: #ede9fe;
@@ -19,23 +20,28 @@
1920
--bs-body-bg: #292524;
2021
--bs-border-color: #79716b;
2122
}
23+
2224
.cheatsheet {
2325
--table-th-bg: #79716b;
2426
--capture-bg: #696662;
2527
}
28+
2629
.cheatsheet .table {
2730
--bs-table-striped-bg: #57534d;
2831
--bs-table-bg: #44403b;
2932
}
33+
3034
.cheatsheet .card {
3135
--bs-card-cap-bg: #44403b;
3236
}
37+
3338
.cheatsheet #legend {
3439
--bs-border-color: #4d179a;
3540
--bs-card-cap-bg: #4d179a;
3641
--table-th-bg: #8e51ff;
3742
--capture-bg: #984efe;
3843
}
44+
3945
.cheatsheet #legend .table {
4046
--bs-table-striped-bg: #7f22fe;
4147
--bs-table-bg: #5d0ec0;
@@ -136,15 +142,15 @@
136142
}
137143

138144
@layer utilities {
139-
@media (min-width: 48rem) {
145+
@media (width >= 48rem) {
140146
.cheatsheet-sections {
141147
columns: 2 !important;
142148
}
143149
}
144150
}
145151

146152
@layer utilities {
147-
@media (min-width: 80rem) {
153+
@media (width >= 80rem) {
148154
.cheatsheet-sections {
149155
columns: 3 !important;
150156
}

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939
"fast-check": "^4.6.0",
4040
"js-yaml": "^4.1.1",
4141
"mocha": "^11.7.5",
42-
"web-tree-sitter": "^0.26.6"
42+
"web-tree-sitter": "^0.26.7"
4343
}
4444
}

0 commit comments

Comments
 (0)