Skip to content

Commit

Permalink
Prettier (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbaldry authored Dec 20, 2024
1 parent ecb63f2 commit 408394b
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/add-to-docs-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
main:
if: ${{ github.repository == 'grafana/writers-toolkit' }}
if: ${{ github.repository == 'grafana/writers-toolkit' }}
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
main:
if: ${{ github.repository == 'grafana/writers-toolkit' }}
if: ${{ github.repository == 'grafana/writers-toolkit' }}
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dictionaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
type: boolean
jobs:
main:
if: ${{ github.repository == 'grafana/writers-toolkit' }}
if: ${{ github.repository == 'grafana/writers-toolkit' }}
container:
image: bitnami/jsonnet@sha256:3d8b084da1b74f5d38bc35e1ebf02f4a57c0410ec59d4edbc25dd2fec5f5541c
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:

jobs:
build:
if: ${{ github.repository == 'grafana/writers-toolkit' }}
if: ${{ github.repository == 'grafana/writers-toolkit' }}
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
type: boolean
jobs:
prettier:
if: ${{ github.repository == 'grafana/writers-toolkit' }}
if: ${{ github.repository == 'grafana/writers-toolkit' }}
runs-on: ubuntu-latest
steps:
- uses: grafana/writers-toolkit/prettier@main
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/validate-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
doc-validator:
if: ${{ github.repository == 'grafana/writers-toolkit' }}
if: ${{ github.repository == 'grafana/writers-toolkit' }}
runs-on: ubuntu-latest
container:
image: grafana/doc-validator:v4.0.0
Expand All @@ -27,7 +27,7 @@ jobs:
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
prettier:
if: ${{ github.repository == 'grafana/writers-toolkit' }}
if: ${{ github.repository == 'grafana/writers-toolkit' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
if: ${{ github.repository == 'grafana/writers-toolkit' }}
if: ${{ github.repository == 'grafana/writers-toolkit' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -83,7 +83,7 @@ jobs:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

report-readability:
if: ${{ github.repository == 'grafana/writers-toolkit' }}
if: ${{ github.repository == 'grafana/writers-toolkit' }}
name: Report readability
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 4 additions & 4 deletions add-to-docs-project/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PROJECT_ID = "PVT_kwDOAG3Mbc027w";
const ISSUES_QUERY = fs.readFileSync("issues.graphql", "utf8");
const ADD_TO_PROJECT_MUTATION = fs.readFileSync(
"add-to-project.graphql",
"utf8"
"utf8",
);

async function addIssuesToProject(): Promise<Array<string>> {
Expand All @@ -26,14 +26,14 @@ async function addIssuesToProject(): Promise<Array<string>> {

for (const issue of issues) {
console.log(
`Adding issue ${issue.title} (${issue.url}) to the Docs project.`
`Adding issue ${issue.title} (${issue.url}) to the Docs project.`,
);
added.push(
// https://api.slack.com/reference/surfaces/formatting#escaping
`${issue.url}|${issue.title}`
.replaceAll("&", "&amp;")
.replaceAll("<", "&lt;")
.replaceAll(">", "&gt;")
.replaceAll(">", "&gt;"),
);

await octokit.graphql(ADD_TO_PROJECT_MUTATION, {
Expand All @@ -52,5 +52,5 @@ async function addIssuesToProject(): Promise<Array<string>> {
const added = await addIssuesToProject();
core.setOutput(
"added",
added.map((issue) => `- <${issue}>`.replaceAll('"', '\\"')).join("\\n")
added.map((issue) => `- <${issue}>`.replaceAll('"', '\\"')).join("\\n"),
);
14 changes: 7 additions & 7 deletions add-to-docs-project/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

/* Language and Environment */
"target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"target": "es2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
Expand All @@ -25,9 +25,9 @@
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */

/* Modules */
"module": "nodenext", /* Specify what module code is generated. */
"module": "nodenext" /* Specify what module code is generated. */,
// "rootDir": "./", /* Specify the root folder within your source files. */
"moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */
"moduleResolution": "nodenext" /* Specify how TypeScript looks up a file from a given module specifier. */,
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
Expand Down Expand Up @@ -76,12 +76,12 @@
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
// "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,

/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
"strict": true /* Enable all strict type-checking options. */,
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
Expand All @@ -103,6 +103,6 @@

/* Completeness */
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
}

0 comments on commit 408394b

Please sign in to comment.