Skip to content

Commit ada1050

Browse files
committed
trailing commas all the way
1 parent f41dbfd commit ada1050

37 files changed

+673
-646
lines changed

.github/workflows/deploy-site.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
33
on:
44
# Run after the test workflow completes on main branch
55
workflow_run:
6-
workflows: ["CI"]
6+
workflows: ['CI']
77
branches: [main]
88
types: [completed]
99

@@ -17,7 +17,7 @@ permissions:
1717
actions: read
1818

1919
concurrency:
20-
group: "pages"
20+
group: 'pages'
2121
cancel-in-progress: false
2222

2323
jobs:
@@ -32,13 +32,13 @@ jobs:
3232
- name: Setup Ruby
3333
uses: ruby/setup-ruby@v1
3434
with:
35-
ruby-version: ".ruby-version"
35+
ruby-version: '.ruby-version'
3636
bundler-cache: true
3737

3838
- name: Setup Node
3939
uses: actions/setup-node@v4
4040
with:
41-
node-version: "20"
41+
node-version: '20'
4242
cache: npm
4343
cache-dependency-path: site/package-lock.json
4444

.github/workflows/test.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
- name: Setup Ruby
1818
uses: ruby/setup-ruby@v1
1919
with:
20-
ruby-version: ".ruby-version"
20+
ruby-version: '.ruby-version'
2121
# Install all gems (both test and development)
2222
bundler-cache: true
2323

2424
- name: Setup Node.js
2525
uses: actions/setup-node@v4
2626
with:
2727
node-version: 20
28-
cache: "npm"
28+
cache: 'npm'
2929
cache-dependency-path: |
3030
package-lock.json
3131
site/package-lock.json
@@ -80,23 +80,23 @@ jobs:
8080
run: bin/typecheck
8181

8282
site:
83-
name: "Next.js Site Tests"
83+
name: 'Next.js Site Tests'
8484
runs-on: ubuntu-22.04
8585
steps:
8686
- uses: actions/checkout@v4
8787

8888
- name: Setup Ruby
8989
uses: ruby/setup-ruby@v1
9090
with:
91-
ruby-version: ".ruby-version"
91+
ruby-version: '.ruby-version'
9292
bundler-cache: true
9393

9494
- name: Setup Node.js (site)
9595
uses: actions/setup-node@v4
9696
with:
9797
node-version: 20
98-
cache: "npm"
99-
cache-dependency-path: "site/package-lock.json"
98+
cache: 'npm'
99+
cache-dependency-path: 'site/package-lock.json'
100100

101101
- name: Install site dependencies
102102
run: cd site && npm ci
@@ -114,13 +114,13 @@ jobs:
114114
cd site && npm test
115115
116116
pilot:
117-
name: "Pilot Test: Ruby 3.4 / Rails 8.0"
117+
name: 'Pilot Test: Ruby 3.4 / Rails 8.0'
118118
runs-on: ubuntu-22.04
119119
env:
120-
RAILS_VERSION: "8.0"
121-
RUBY_VERSION: "3.4"
122-
CI: "true"
123-
BUNDLE_WITHOUT: "development"
120+
RAILS_VERSION: '8.0'
121+
RUBY_VERSION: '3.4'
122+
CI: 'true'
123+
BUNDLE_WITHOUT: 'development'
124124
steps:
125125
- uses: actions/checkout@v4
126126

@@ -131,7 +131,7 @@ jobs:
131131
- name: Setup Ruby 3.4
132132
uses: ruby/setup-ruby@v1
133133
with:
134-
ruby-version: "3.4"
134+
ruby-version: '3.4'
135135
bundler-cache: true
136136

137137
- name: Run tests
@@ -147,26 +147,26 @@ jobs:
147147
retention-days: 5
148148

149149
matrix:
150-
name: "Tests: ${{ matrix.name }}"
150+
name: 'Tests: ${{ matrix.name }}'
151151
needs: [lint, pilot]
152152
runs-on: ubuntu-22.04
153153
strategy:
154154
fail-fast: false
155155
matrix:
156156
include:
157-
- name: "Ruby 3.2 / Rails 7.0"
158-
ruby: "3.2"
159-
rails: "7.0"
157+
- name: 'Ruby 3.2 / Rails 7.0'
158+
ruby: '3.2'
159+
rails: '7.0'
160160

161-
- name: "Ruby 3.3 / Rails 7.1"
162-
ruby: "3.3"
163-
rails: "7.1"
161+
- name: 'Ruby 3.3 / Rails 7.1'
162+
ruby: '3.3'
163+
rails: '7.1'
164164

165165
env:
166166
RAILS_VERSION: ${{ matrix.rails }}
167167
RUBY_VERSION: ${{ matrix.ruby }}
168-
CI: "true"
169-
BUNDLE_WITHOUT: "development"
168+
CI: 'true'
169+
BUNDLE_WITHOUT: 'development'
170170

171171
steps:
172172
- uses: actions/checkout@v4

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "all",
3+
"semi": true,
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"tabWidth": 2
7+
}

.rubocop.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ Style/SingleLineMethods:
5454
Exclude:
5555
- sorbet/**/*
5656
- lib/log_struct/log/interfaces/**/*
57-
- "**/*_interface.rb"
57+
- '**/*_interface.rb'
5858

5959
Style/EmptyMethod:
6060
Exclude:
6161
- sorbet/**/*
6262
- lib/log_struct/log/interfaces/**/*
63-
- "**/*_interface.rb"
63+
- '**/*_interface.rb'
6464

6565
# Ban typed: false everywhere
6666
Sorbet/FalseSigil:
@@ -70,22 +70,22 @@ Sorbet/FalseSigil:
7070
Sorbet/StrictSigil:
7171
Enabled: true
7272
Exclude:
73-
- "test/**/*"
74-
- "sorbet/**/*"
75-
- "rails_test_app/**/*.rb"
73+
- 'test/**/*'
74+
- 'sorbet/**/*'
75+
- 'rails_test_app/**/*.rb'
7676
SuggestedStrictness: strict
7777

7878
# Require typed: true for test files
7979
Sorbet/TrueSigil:
8080
Enabled: true
8181
Include:
82-
- "test/**/*.rb"
83-
- "rails_test_app/**/*.rb"
82+
- 'test/**/*.rb'
83+
- 'rails_test_app/**/*.rb'
8484
SuggestedStrictness: true
8585

8686
# Don't try to validate typing on generated Sorbet RBI files
8787
Sorbet:
8888
Enabled: true
8989
Exclude:
90-
- "sorbet/**/*.rbi"
91-
- "rails_test_app/templates/**/*.rb"
90+
- 'sorbet/**/*.rbi'
91+
- 'rails_test_app/templates/**/*.rb'

CLAUDE.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,37 @@
22

33
## Commands
44

5+
### Core Commands
6+
57
- Setup: `bin/setup`
6-
- Run all tests: `bin/test`
8+
- Run all checks: `bin/all` (runs typecheck, export, lint, test, etc.)
9+
- Interactive console: `bin/console`
10+
11+
### Testing Commands
12+
13+
- Run all Ruby tests: `bin/test`
714
- Run single test file: `bin/test test/path_to_test.rb`
815
- Run test at specific line: `bin/test test/path_to_test.rb:LINE_NUMBER`
916
- Run test by name: `bin/test -n=test_method_name`
1017
- Debug a specific test: Add `debugger` statements (developer only)
11-
- Typecheck: `bin/typecheck`
12-
- Format code: `bin/format`
13-
- Lint: `bin/rubocop`
18+
- Run Rails integration tests: `bin/test_with_rails`
19+
- Run Next.js TypeScript tests: `cd site && npm test`
20+
21+
### Quality Commands
22+
23+
- Ruby typecheck: `bin/typecheck`
24+
- Next.js typecheck: `cd site && npx tsc --noEmit`
25+
- Lint Ruby: `bin/rubocop`
26+
- Format Ruby: `bin/rubocop -A`
27+
- Format JS/TS/JSON: `bin/prettier --write`
28+
- Lint JS/TS/JSON: `bin/prettier --check`
1429
- Spellcheck: `bin/spellcheck`
1530

31+
### Development Commands
32+
33+
- Generate Sorbet RBI files: `bin/tapioca`
34+
- Generate spellcheck dictionary: `bin/generate_lockfile_words`
35+
1636
## Code Style
1737

1838
- Use strict Sorbet typing with `# typed: strict` annotations

site/app/docs/configuration/page.tsx

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
2-
import { atomDark } from "react-syntax-highlighter/dist/esm/styles/prism";
3-
import { EditPageLink } from "@/components/edit-page-link";
1+
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
2+
import { atomDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
3+
import { EditPageLink } from '@/components/edit-page-link';
44

55
export default function ConfigurationPage() {
66
return (
@@ -15,10 +15,10 @@ export default function ConfigurationPage() {
1515
<h2 className="text-2xl font-bold mt-10 mb-4">Basic Configuration</h2>
1616
<p className="text-neutral-600 dark:text-neutral-400 mb-4">
1717
While LogStruct works out of the box with minimal configuration, you may
18-
want to customize it to suit your application's needs. Create a file at{" "}
18+
want to customize it to suit your application's needs. Create a file at{' '}
1919
<code className="px-1 py-0.5 bg-neutral-100 dark:bg-neutral-800 rounded">
2020
config/initializers/logstruct.rb
21-
</code>{" "}
21+
</code>{' '}
2222
with your desired configuration.
2323
</p>
2424

@@ -27,12 +27,12 @@ export default function ConfigurationPage() {
2727
language="ruby"
2828
style={atomDark}
2929
customStyle={{
30-
fontSize: "0.875rem",
30+
fontSize: '0.875rem',
3131
fontFamily:
32-
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
33-
backgroundColor: "transparent",
34-
padding: "0",
35-
borderRadius: "0px",
32+
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
33+
backgroundColor: 'transparent',
34+
padding: '0',
35+
borderRadius: '0px',
3636
}}
3737
>
3838
{`# Configure LogStruct
@@ -84,12 +84,12 @@ LogStruct.initialize`}
8484
language="ruby"
8585
style={atomDark}
8686
customStyle={{
87-
fontSize: "0.875rem",
87+
fontSize: '0.875rem',
8888
fontFamily:
89-
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
90-
backgroundColor: "transparent",
91-
padding: "0",
92-
borderRadius: "0px",
89+
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
90+
backgroundColor: 'transparent',
91+
padding: '0',
92+
borderRadius: '0px',
9393
}}
9494
>
9595
{`# Enable LogStruct in specific environments
@@ -114,12 +114,12 @@ config.local_environments = [:development, :test]`}
114114
language="ruby"
115115
style={atomDark}
116116
customStyle={{
117-
fontSize: "0.875rem",
117+
fontSize: '0.875rem',
118118
fontFamily:
119-
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
120-
backgroundColor: "transparent",
121-
padding: "0",
122-
borderRadius: "0px",
119+
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
120+
backgroundColor: 'transparent',
121+
padding: '0',
122+
borderRadius: '0px',
123123
}}
124124
>
125125
{`# Configure which integrations to enable
@@ -149,12 +149,12 @@ config.integrations.enable_sorbet_error_handler = true # Sorbet type checking er
149149
language="ruby"
150150
style={atomDark}
151151
customStyle={{
152-
fontSize: "0.875rem",
152+
fontSize: '0.875rem',
153153
fontFamily:
154-
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
155-
backgroundColor: "transparent",
156-
padding: "0",
157-
borderRadius: "0px",
154+
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
155+
backgroundColor: 'transparent',
156+
padding: '0',
157+
borderRadius: '0px',
158158
}}
159159
>
160160
{`# Configure sensitive data filtering
@@ -187,12 +187,12 @@ config.filters.hash_length = 12`}
187187
language="ruby"
188188
style={atomDark}
189189
customStyle={{
190-
fontSize: "0.875rem",
190+
fontSize: '0.875rem',
191191
fontFamily:
192-
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
193-
backgroundColor: "transparent",
194-
padding: "0",
195-
borderRadius: "0px",
192+
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
193+
backgroundColor: 'transparent',
194+
padding: '0',
195+
borderRadius: '0px',
196196
}}
197197
>
198198
{`# Configure error handling modes
@@ -219,12 +219,12 @@ config.error_handling_modes.standard_errors = LogStruct::ErrorHandlingMode::LogP
219219
language="ruby"
220220
style={atomDark}
221221
customStyle={{
222-
fontSize: "0.875rem",
222+
fontSize: '0.875rem',
223223
fontFamily:
224-
"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
225-
backgroundColor: "transparent",
226-
padding: "0",
227-
borderRadius: "0px",
224+
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
225+
backgroundColor: 'transparent',
226+
padding: '0',
227+
borderRadius: '0px',
228228
}}
229229
>
230230
{`# Provide a custom proc to extend Lograge options

0 commit comments

Comments
 (0)