Correct prettier calls for YML/JSON (#21832)
* Fix fomat-check writing files * Fix unformatted YML/JSON * Add format-check call to prevent regressions
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/ISSUE_TEMPLATE/1.bug_report.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/ISSUE_TEMPLATE/1.bug_report.yml
									
									
									
									
										vendored
									
									
								
							@@ -50,7 +50,7 @@ body:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        Google Chrome 106.0.5249.119
 | 
					        Google Chrome 106.0.5249.119
 | 
				
			||||||
        Firefox 105.0.3
 | 
					        Firefox 105.0.3
 | 
				
			||||||
        
 | 
					
 | 
				
			||||||
        etc...
 | 
					        etc...
 | 
				
			||||||
    validations:
 | 
					    validations:
 | 
				
			||||||
      required: true
 | 
					      required: true
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
								
							@@ -2,4 +2,4 @@ blank_issues_enabled: false
 | 
				
			|||||||
contact_links:
 | 
					contact_links:
 | 
				
			||||||
  - name: GitHub Discussions
 | 
					  - name: GitHub Discussions
 | 
				
			||||||
    url: https://github.com/mastodon/mastodon/discussions
 | 
					    url: https://github.com/mastodon/mastodon/discussions
 | 
				
			||||||
    about: Please ask and answer questions here.
 | 
					    about: Please ask and answer questions here.
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								.github/workflows/linter.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/linter.yml
									
									
									
									
										vendored
									
									
								
							@@ -57,12 +57,14 @@ jobs:
 | 
				
			|||||||
          cache: yarn
 | 
					          cache: yarn
 | 
				
			||||||
      - name: Install dependencies
 | 
					      - name: Install dependencies
 | 
				
			||||||
        run: yarn install --frozen-lockfile
 | 
					        run: yarn install --frozen-lockfile
 | 
				
			||||||
 | 
					      - name: Check prettier formatting
 | 
				
			||||||
 | 
					        run: yarn format-check
 | 
				
			||||||
      - name: Set-up RuboCop Problem Mathcher
 | 
					      - name: Set-up RuboCop Problem Mathcher
 | 
				
			||||||
        uses: r7kamura/rubocop-problem-matchers-action@v1
 | 
					        uses: r7kamura/rubocop-problem-matchers-action@v1
 | 
				
			||||||
      - name: Set-up Stylelint Problem Matcher
 | 
					      - name: Set-up Stylelint Problem Matcher
 | 
				
			||||||
        uses: xt0rted/stylelint-problem-matcher@v1
 | 
					        uses: xt0rted/stylelint-problem-matcher@v1
 | 
				
			||||||
      # https://github.com/xt0rted/stylelint-problem-matcher/issues/360
 | 
					      # 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 #
 | 
					      # Run Linter against code base #
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										16
									
								
								.github/workflows/test-chart.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/test-chart.yml
									
									
									
									
										vendored
									
									
								
							@@ -6,16 +6,16 @@ name: Test chart
 | 
				
			|||||||
on:
 | 
					on:
 | 
				
			||||||
  pull_request:
 | 
					  pull_request:
 | 
				
			||||||
    paths:
 | 
					    paths:
 | 
				
			||||||
      - "chart/**"
 | 
					      - 'chart/**'
 | 
				
			||||||
      - "!**.md"
 | 
					      - '!**.md'
 | 
				
			||||||
      - ".github/workflows/test-chart.yml"
 | 
					      - '.github/workflows/test-chart.yml'
 | 
				
			||||||
  push:
 | 
					  push:
 | 
				
			||||||
    paths:
 | 
					    paths:
 | 
				
			||||||
      - "chart/**"
 | 
					      - 'chart/**'
 | 
				
			||||||
      - "!**.md"
 | 
					      - '!**.md'
 | 
				
			||||||
      - ".github/workflows/test-chart.yml"
 | 
					      - '.github/workflows/test-chart.yml'
 | 
				
			||||||
    branches-ignore:
 | 
					    branches-ignore:
 | 
				
			||||||
      - "dependabot/**"
 | 
					      - 'dependabot/**'
 | 
				
			||||||
  workflow_dispatch:
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
permissions:
 | 
					permissions:
 | 
				
			||||||
@@ -33,7 +33,7 @@ jobs:
 | 
				
			|||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
      - uses: actions/setup-python@v4
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          python-version: "3.x"
 | 
					          python-version: '3.x'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install dependencies (yamllint)
 | 
					      - name: Install dependencies (yamllint)
 | 
				
			||||||
        run: pip install yamllint
 | 
					        run: pip install yamllint
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,10 +13,5 @@
 | 
				
			|||||||
    "strict": false,
 | 
					    "strict": false,
 | 
				
			||||||
    "target": "ES2022"
 | 
					    "target": "ES2022"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "exclude": [
 | 
					  "exclude": ["**/build/*", "**/node_modules/*", "**/public/*", "**/vendor/*"]
 | 
				
			||||||
    "**/build/*",
 | 
					 | 
				
			||||||
    "**/node_modules/*",
 | 
					 | 
				
			||||||
    "**/public/*",
 | 
					 | 
				
			||||||
    "**/vendor/*"
 | 
					 | 
				
			||||||
  ]
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,8 +15,8 @@
 | 
				
			|||||||
    "test:lint:js": "eslint --ext=js . --cache",
 | 
					    "test:lint:js": "eslint --ext=js . --cache",
 | 
				
			||||||
    "test:lint:sass": "stylelint '**/*.scss'",
 | 
					    "test:lint:sass": "stylelint '**/*.scss'",
 | 
				
			||||||
    "test:jest": "cross-env NODE_ENV=test jest",
 | 
					    "test:jest": "cross-env NODE_ENV=test jest",
 | 
				
			||||||
    "format": "prettier --write '**/*.{json,yml}'",
 | 
					    "format": "prettier --write \"**/*.{json,yml}\"",
 | 
				
			||||||
    "format-check": "prettier --write '**/*.{json,yml}'"
 | 
					    "format-check": "prettier --check \"**/*.{json,yml}\""
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "repository": {
 | 
					  "repository": {
 | 
				
			||||||
    "type": "git",
 | 
					    "type": "git",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user