Format fixes
This commit is contained in:
		
							parent
							
								
									8e04912201
								
							
						
					
					
						commit
						b3534aecda
					
				
					 2 changed files with 7 additions and 7 deletions
				
			
		
							
								
								
									
										12
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -39,8 +39,8 @@ help: | ||||||
| 	@echo "  make web-deps                   - Install web app dependencies (npm install the universe)" | 	@echo "  make web-deps                   - Install web app dependencies (npm install the universe)" | ||||||
| 	@echo "  make web-build                  - Actually build the web app" | 	@echo "  make web-build                  - Actually build the web app" | ||||||
| 	@echo "  make web-lint                   - Run eslint on the web app" | 	@echo "  make web-lint                   - Run eslint on the web app" | ||||||
| 	@echo "  make web-format                 - Run prettier on the web app" | 	@echo "  make web-fmt                    - Run prettier on the web app" | ||||||
| 	@echo "  make web-format-check           - Run prettier on the web app, but don't change anything" | 	@echo "  make web-fmt-check              - Run prettier on the web app, but don't change anything" | ||||||
| 	@echo | 	@echo | ||||||
| 	@echo "Build documentation:" | 	@echo "Build documentation:" | ||||||
| 	@echo "  make docs                       - Build the documentation" | 	@echo "  make docs                       - Build the documentation" | ||||||
|  | @ -151,10 +151,10 @@ web-deps: | ||||||
| web-deps-update: | web-deps-update: | ||||||
| 	cd web && npm update | 	cd web && npm update | ||||||
| 
 | 
 | ||||||
| web-format: | web-fmt: | ||||||
| 	cd web && npm run format | 	cd web && npm run format | ||||||
| 
 | 
 | ||||||
| web-format-check: | web-fmt-check: | ||||||
| 	cd web && npm run format:check | 	cd web && npm run format:check | ||||||
| 
 | 
 | ||||||
| web-lint: | web-lint: | ||||||
|  | @ -248,7 +248,7 @@ cli-build-results: | ||||||
| 
 | 
 | ||||||
| # Test/check targets
 | # Test/check targets
 | ||||||
| 
 | 
 | ||||||
| check: test web-format-check fmt-check vet web-lint lint staticcheck | check: test web-fmt-check fmt-check vet web-lint lint staticcheck | ||||||
| 
 | 
 | ||||||
| test: .PHONY | test: .PHONY | ||||||
| 	go test $(shell go list ./... | grep -vE 'ntfy/(test|examples|tools)') | 	go test $(shell go list ./... | grep -vE 'ntfy/(test|examples|tools)') | ||||||
|  | @ -275,7 +275,7 @@ coverage-upload: | ||||||
| 
 | 
 | ||||||
| # Lint/formatting targets
 | # Lint/formatting targets
 | ||||||
| 
 | 
 | ||||||
| fmt: | fmt: web-fmt | ||||||
| 	gofmt -s -w . | 	gofmt -s -w . | ||||||
| 
 | 
 | ||||||
| fmt-check: | fmt-check: | ||||||
|  |  | ||||||
|  | @ -134,7 +134,7 @@ export const hashCode = (s) => { | ||||||
|  * convert `i18n.language` style str (e.g.: `en_US`) to kebab-case (e.g.: `en-US`), |  * convert `i18n.language` style str (e.g.: `en_US`) to kebab-case (e.g.: `en-US`), | ||||||
|  * which is expected by `<html lang>` and `Intl.DateTimeFormat` |  * which is expected by `<html lang>` and `Intl.DateTimeFormat` | ||||||
|  */ |  */ | ||||||
| export const getKebabCaseLangStr = (language) => language.replace(/_/g, '-'); | export const getKebabCaseLangStr = (language) => language.replace(/_/g, "-"); | ||||||
| 
 | 
 | ||||||
| export const formatShortDateTime = (timestamp, language) => | export const formatShortDateTime = (timestamp, language) => | ||||||
|   new Intl.DateTimeFormat(getKebabCaseLangStr(language), { |   new Intl.DateTimeFormat(getKebabCaseLangStr(language), { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue