Browse Source

Correct prettier calls for YML/JSON (#21832)

* Fix fomat-check writing files

* Fix unformatted YML/JSON

* Add format-check call to prevent regressions
closed-social-glitch-2
Nick Schonning 1 year ago
committed by GitHub
parent
commit
f77ed3a6b2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 19 deletions
  1. +1
    -1
      .github/ISSUE_TEMPLATE/1.bug_report.yml
  2. +1
    -1
      .github/ISSUE_TEMPLATE/config.yml
  3. +3
    -1
      .github/workflows/linter.yml
  4. +8
    -8
      .github/workflows/test-chart.yml
  5. +1
    -6
      jsconfig.json
  6. +2
    -2
      package.json

+ 1
- 1
.github/ISSUE_TEMPLATE/1.bug_report.yml View File

@ -50,7 +50,7 @@ body:
Google Chrome 106.0.5249.119
Firefox 105.0.3
etc...
validations:
required: true

+ 1
- 1
.github/ISSUE_TEMPLATE/config.yml View File

@ -2,4 +2,4 @@ blank_issues_enabled: false
contact_links:
- name: GitHub Discussions
url: https://github.com/mastodon/mastodon/discussions
about: Please ask and answer questions here.
about: Please ask and answer questions here.

+ 3
- 1
.github/workflows/linter.yml View File

@ -57,12 +57,14 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Check prettier formatting
run: yarn format-check
- name: Set-up RuboCop Problem Mathcher
uses: r7kamura/rubocop-problem-matchers-action@v1
- name: Set-up Stylelint Problem Matcher
uses: xt0rted/stylelint-problem-matcher@v1
# https://github.com/xt0rted/stylelint-problem-matcher/issues/360
- run: echo "::add-matcher::.github/stylelint-matcher.json"
- run: echo "::add-matcher::.github/stylelint-matcher.json"
################################
# Run Linter against code base #

+ 8
- 8
.github/workflows/test-chart.yml View File

@ -6,16 +6,16 @@ name: Test chart
on:
pull_request:
paths:
- "chart/**";
- "!**.md";
- ".github/workflows/test-chart.yml";
- 'chart/**';
- '!**.md';
- '.github/workflows/test-chart.yml';
push:
paths:
- "chart/**";
- "!**.md";
- ".github/workflows/test-chart.yml";
- 'chart/**';
- '!**.md';
- '.github/workflows/test-chart.yml';
branches-ignore:
- "dependabot/**";
- 'dependabot/**';
workflow_dispatch:
permissions:
@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x";
python-version: '3.x';
- name: Install dependencies (yamllint)
run: pip install yamllint

+ 1
- 6
jsconfig.json View File

@ -13,10 +13,5 @@
"strict": false,
"target": "ES2022"
},
"exclude": [
"**/build/*",
"**/node_modules/*",
"**/public/*",
"**/vendor/*"
]
"exclude": ["**/build/*", "**/node_modules/*", "**/public/*", "**/vendor/*"]
}

+ 2
- 2
package.json View File

@ -15,8 +15,8 @@
"test:lint:js": "eslint --ext=js . --cache",
"test:lint:sass": "stylelint '**/*.scss'",
"test:jest": "cross-env NODE_ENV=test jest",
"format": "prettier --write '**/*.{json,yml}';",
"format-check": "prettier --write '**/*.{json,yml}';"
"format": "prettier --write \"**/*.{json,yml}\";",
"format-check": "prettier --check \"**/*.{json,yml}\";"
},
"repository": {
"type": "git",

Loading…
Cancel
Save