Skip to content

Commit

Permalink
chore: centralize prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
benfdking committed Sep 14, 2024
1 parent 25a22a4 commit afe66a9
Show file tree
Hide file tree
Showing 19 changed files with 191 additions and 208 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ jobs:
- run: cd editors/code && pnpm run build:wasm_lsp
- run: cd editors/code && pnpm run check-types
- run: cd editors/code && pnpm run lint
- run: cd editors/code && pnpm run format:check
test:
name: Test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -126,14 +125,19 @@ jobs:
run: cargo clippy --all --all-features -- -D warnings
- name: Check unused dependencies
run: cargo machete
check-github-actions-formatting:
name: Check GitHub Actions formatting
prettier-formatting:
name: Check Prettier formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version-file: .nvmrc
- name: Install make
run: sudo apt-get install make
- run: make prettier_lint
version: 9
- name: Install Nodejs
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run fmt:check
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
playground/src/pkg
File renamed without changes.
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
.PHONY: prettier_fmt
prettier_fmt: ## Formats gh yaml files
npx prettier --write .github/**/*.{yaml,yml}

.PHONY: prettier_lint
prettier_lint: ## Lints gh yaml files
npx prettier --check .github/**/*.{yaml,yml}

.PHONY: help
help: ## Display this help screen
@grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SQRUFF is an innovative SQL linter and formatter for modern development environm
- **Formatting:** Automated, configurable formatting for SQL code consistency.
- **Portability:** Designed to be easily integrated into various development workflows.

## Dialects Supported
## Dialects Supported

Sqruff currently supports the following SQL dialects:

Expand All @@ -47,7 +47,7 @@ Open our Quary template [template](https://github.dev/quarylabs/template/blob/ma

#### macOS

You can use [brew](https://brew.sh/) to install sqruff easily on macOS.
You can use [brew](https://brew.sh/) to install sqruff easily on macOS.

```bash
brew install quarylabs/quary/sqruff
Expand Down Expand Up @@ -135,7 +135,7 @@ For all the details on the CLI commands and options, see the [CLI documentation]

## Docs

For more details about, see the documents in the [docs](./docs/) folder which contains:
For more details about, see the documents in the [docs](./docs/) folder which contains:

- [Details on the rules](./docs/rules.md)
- [Details on the CLI](./docs/cli.md)
Expand All @@ -145,7 +145,7 @@ For more details about, see the documents in the [docs](./docs/) folder which co

Join the Quary community on [Slack](https://join.slack.com/t/quarylabs/shared_invite/zt-2dlbfnztw-dMLXJVL38NcbhqRuM5gUcw) to ask questions, suggest features, or share your projects. Also feel free to raise any issues in the repository.

## Contributing
## Contributing

Contributions are welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to run things locally and on how to contribute.

Expand Down
4 changes: 2 additions & 2 deletions editors/code/.vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from '@vscode/test-cli';
import { defineConfig } from "@vscode/test-cli";

export default defineConfig({
files: 'out/test/**/*.test.js',
files: "out/test/**/*.test.js",
});
6 changes: 5 additions & 1 deletion editors/code/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "connor4312.esbuild-problem-matchers", "ms-vscode.extension-test-runner"]
"recommendations": [
"dbaeumer.vscode-eslint",
"connor4312.esbuild-problem-matchers",
"ms-vscode.extension-test-runner"
]
}
26 changes: 11 additions & 15 deletions editors/code/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
22 changes: 11 additions & 11 deletions editors/code/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// 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
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
"files.exclude": {
"out": false, // set this to true to hide the "out" folder with the compiled JS files
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
114 changes: 54 additions & 60 deletions editors/code/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,58 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"label": "watch",
"dependsOn": [
"npm: watch:tsc",
"npm: watch:esbuild"
],
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch:esbuild",
"group": "build",
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"label": "npm: watch:esbuild",
"presentation": {
"group": "watch",
"reveal": "never"
}
},
{
"type": "npm",
"script": "watch:tsc",
"group": "build",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"label": "npm: watch:tsc",
"presentation": {
"group": "watch",
"reveal": "never"
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": [
"npm: watch",
"npm: watch-tests"
],
"problemMatcher": []
}
]
"version": "2.0.0",
"tasks": [
{
"label": "watch",
"dependsOn": ["npm: watch:tsc", "npm: watch:esbuild"],
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch:esbuild",
"group": "build",
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"label": "npm: watch:esbuild",
"presentation": {
"group": "watch",
"reveal": "never"
}
},
{
"type": "npm",
"script": "watch:tsc",
"group": "build",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"label": "npm: watch:tsc",
"presentation": {
"group": "watch",
"reveal": "never"
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": ["npm: watch", "npm: watch-tests"],
"problemMatcher": []
}
]
}
8 changes: 4 additions & 4 deletions editors/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SQRUFF is an innovative SQL linter and formatter for modern development environm
- **Formatting:** Automated, configurable formatting for SQL code consistency.
- **Portability:** Designed to be easily integrated into various development workflows.

## Dialects Supported
## Dialects Supported

Sqruff currently supports the following SQL dialects:

Expand All @@ -47,7 +47,7 @@ Open our Quary template [template](https://github.dev/quarylabs/template/blob/ma

#### macOS

You can use [brew](https://brew.sh/) to install sqruff easily on macOS.
You can use [brew](https://brew.sh/) to install sqruff easily on macOS.

```bash
brew install quarylabs/quary/sqruff
Expand Down Expand Up @@ -135,7 +135,7 @@ For all the details on the CLI commands and options, see the [CLI documentation]

## Docs

For more details about, see the documents in the [docs](./docs/) folder which contains:
For more details about, see the documents in the [docs](./docs/) folder which contains:

- [Details on the rules](./docs/rules.md)
- [Details on the CLI](./docs/cli.md)
Expand All @@ -145,7 +145,7 @@ For more details about, see the documents in the [docs](./docs/) folder which co

Join the Quary community on [Slack](https://join.slack.com/t/quarylabs/shared_invite/zt-2dlbfnztw-dMLXJVL38NcbhqRuM5gUcw) to ask questions, suggest features, or share your projects. Also feel free to raise any issues in the repository.

## Contributing
## Contributing

Contributions are welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to run things locally and on how to contribute.

Expand Down
Loading

0 comments on commit afe66a9

Please sign in to comment.