-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate dprint-plugin-exec to use rubocop as a simple formatter (#317)
* `dprint config add exec` and prefer rather than prettier * dprint hook rubocop with dprint-plugin-exec integration * Split dprint config for vscode and ci * `dprint --config dprint-ci.json fmt`
- Loading branch information
Showing
6 changed files
with
47 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dprint/[email protected] | ||
- name: Install dprint | ||
run: | | ||
curl -fsSL https://dprint.dev/install.sh | sh -s 0.34.1 > /dev/null 2>&1 | ||
echo "/home/runner/.dprint/bin" >> $GITHUB_PATH | ||
- name: Check formatting | ||
run: ~/.dprint/bin/dprint --config dprint-ci.json check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
"soutaro.steep-vscode", | ||
"soutaro.rbs-syntax", | ||
"dprint.dprint", | ||
"pucelle.run-on-save", | ||
"jnoortheen.nix-ide" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"json": { | ||
}, | ||
"markdown": { | ||
}, | ||
"exec": { | ||
}, | ||
"prettier": { | ||
"printWidth": 120, | ||
"singleQuote": true | ||
}, | ||
"includes": ["**/*.{json,md,yml,html,css}"], | ||
"excludes": [ | ||
".git", | ||
"**/*lock.json", | ||
"docs", | ||
"doc", | ||
"steep_expectations.yml" | ||
], | ||
"plugins": [ | ||
"https://plugins.dprint.dev/json-0.17.0.wasm", | ||
"https://plugins.dprint.dev/markdown-0.15.2.wasm", | ||
"https://plugins.dprint.dev/exec-0.3.5.json@d687dda57be0fe9a0088ccdaefa5147649ff24127d8b3ea227536c68ee7abeab", | ||
"https://plugins.dprint.dev/prettier-0.19.0.json@f2ca8ddf0a5d7eca344681f54a9280250727324d09475f201fa2584faa2300c5" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
{ | ||
"json": { | ||
"extends": "dprint-ci.json", | ||
"exec": { | ||
"associations": ["**/*.{rb,gemspec,rake}", "Rakefile", "Gemfile", "Steepfile"], | ||
"rubocop": "bundle exec rubocop --autocorrect --stdin {{file_path}} --stderr", | ||
"rubocop.associations": "**/**" | ||
}, | ||
"markdown": { | ||
}, | ||
"prettier": { | ||
"printWidth": 120, | ||
"singleQuote": true | ||
}, | ||
"includes": ["**/*.{json,md,yml,html,css}"], | ||
"includes": ["**/*.{json,md,yml,html,css,rb,gemspec,rake}", "{Rakefile,Gemfile,Steepfile}"], | ||
"excludes": [ | ||
".git", | ||
"**/*lock.json", | ||
"docs", | ||
"doc", | ||
"steep_expectations.yml" | ||
], | ||
"plugins": [ | ||
"https://plugins.dprint.dev/json-0.17.0.wasm", | ||
"https://plugins.dprint.dev/markdown-0.15.2.wasm", | ||
"https://plugins.dprint.dev/prettier-0.19.0.json@f2ca8ddf0a5d7eca344681f54a9280250727324d09475f201fa2584faa2300c5" | ||
] | ||
} |