mirror of
				https://github.com/theoludwig/advent_of_code.git
				synced 2025-09-11 23:11:18 +02:00 
			
		
		
		
	chore: simplify external tools dependency management
This commit is contained in:
		| @@ -10,5 +10,5 @@ charset = utf-8 | ||||
| trim_trailing_whitespace = true | ||||
| insert_final_newline = true | ||||
|  | ||||
| [*.{yml,yaml,md}] | ||||
| [*.{yml,yaml,json,md}] | ||||
| indent_size = 2 | ||||
|   | ||||
							
								
								
									
										31
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -29,26 +29,6 @@ jobs: | ||||
|       - run: "cargo clippy --verbose -- -D warnings" | ||||
|       - run: "cargo fmt -- --check" | ||||
|  | ||||
|   lint-markdown: | ||||
|     runs-on: "ubuntu-latest" | ||||
|     steps: | ||||
|       - uses: "actions/checkout@v4.1.1" | ||||
|  | ||||
|       - uses: "DavidAnson/markdownlint-cli2-action@v15.0.0" | ||||
|         with: | ||||
|           config: ".markdownlint-cli2.jsonc" | ||||
|           globs: "**/*.md" | ||||
|  | ||||
|   lint-commit: | ||||
|     runs-on: "ubuntu-latest" | ||||
|     steps: | ||||
|       - uses: "actions/checkout@v4.1.1" | ||||
|  | ||||
|       - uses: "wagoid/commitlint-github-action@v5.4.5" | ||||
|         with: | ||||
|           configFile: ".commitlintrc.json" | ||||
|           failOnWarnings: true | ||||
|  | ||||
|   lint-general: | ||||
|     runs-on: "ubuntu-latest" | ||||
|     steps: | ||||
| @@ -57,10 +37,11 @@ jobs: | ||||
|       - name: "Setup Node.js" | ||||
|         uses: "actions/setup-node@v4.0.1" | ||||
|         with: | ||||
|           node-version: "20.11.0" | ||||
|           node-version: "20.x" | ||||
|  | ||||
|       - run: "npm install --global editorconfig-checker@5.1.2" | ||||
|       - run: "npm install --global prettier@3.2.4" | ||||
|       - run: "npm clean-install" | ||||
|  | ||||
|       - run: "editorconfig-checker" | ||||
|       - run: "prettier . --check" | ||||
|       - run: 'npm run lint:commit -- --to "${{ github.sha }}"' | ||||
|       - run: "npm run lint:editorconfig" | ||||
|       - run: "npm run lint:markdown" | ||||
|       - run: "npm run lint:prettier" | ||||
|   | ||||
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1 +1,2 @@ | ||||
| /target | ||||
| target | ||||
| node_modules | ||||
|   | ||||
| @@ -1,33 +1,12 @@ | ||||
| { | ||||
|     "config": { | ||||
|         "extends": "markdownlint/style/prettier", | ||||
|         "default": true, | ||||
|         "no-inline-html": false, | ||||
|         "relative-links": true, | ||||
|         "no-duplicate-heading": false, | ||||
|  | ||||
|         /* Disables rules that may conflict with Prettier */ | ||||
|         /* Reference: https://github.com/DavidAnson/markdownlint/blob/main/style/prettier.json */ | ||||
|         "blanks-around-fences": false, | ||||
|         "blanks-around-headings": false, | ||||
|         "blanks-around-lists": false, | ||||
|         "code-fence-style": false, | ||||
|         "emphasis-style": false, | ||||
|         "heading-start-left": false, | ||||
|         "hr-style": false, | ||||
|         "line-length": false, | ||||
|         "list-indent": false, | ||||
|         "list-marker-space": false, | ||||
|         "no-blanks-blockquote": false, | ||||
|         "no-hard-tabs": false, | ||||
|         "no-missing-space-atx": false, | ||||
|         "no-missing-space-closed-atx": false, | ||||
|         "no-multiple-blanks": false, | ||||
|         "no-multiple-space-atx": false, | ||||
|         "no-multiple-space-blockquote": false, | ||||
|         "no-multiple-space-closed-atx": false, | ||||
|         "no-trailing-spaces": false, | ||||
|         "ol-prefix": false, | ||||
|         "strong-style": false, | ||||
|         "ul-indent": false, | ||||
|         "no-inline-html": false, | ||||
|     }, | ||||
|     "globs": ["**/*.md"], | ||||
|     "ignores": ["**/node_modules", "**/target"], | ||||
|     "customRules": ["markdownlint-rule-relative-links"], | ||||
| } | ||||
|   | ||||
| @@ -1,3 +1,3 @@ | ||||
| { | ||||
|     "semi": false | ||||
|   "semi": false | ||||
| } | ||||
|   | ||||
							
								
								
									
										14
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
								
							| @@ -1,9 +1,9 @@ | ||||
| { | ||||
|     "recommendations": [ | ||||
|         "editorconfig.editorconfig", | ||||
|         "esbenp.prettier-vscode", | ||||
|         "davidanson.vscode-markdownlint", | ||||
|         "rust-lang.rust-analyzer", | ||||
|         "tamasfe.even-better-toml" | ||||
|     ] | ||||
|   "recommendations": [ | ||||
|     "editorconfig.editorconfig", | ||||
|     "esbenp.prettier-vscode", | ||||
|     "davidanson.vscode-markdownlint", | ||||
|     "rust-lang.rust-analyzer", | ||||
|     "tamasfe.even-better-toml" | ||||
|   ] | ||||
| } | ||||
|   | ||||
							
								
								
									
										32
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										32
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							| @@ -1,18 +1,18 @@ | ||||
| { | ||||
|     "rust-analyzer.check.command": "clippy", | ||||
|     "[rust]": { | ||||
|         "editor.defaultFormatter": "rust-lang.rust-analyzer", | ||||
|         "editor.tabSize": 4, | ||||
|         "editor.formatOnSave": true | ||||
|     }, | ||||
|     "[toml]": { | ||||
|         "editor.defaultFormatter": "tamasfe.even-better-toml", | ||||
|         "editor.formatOnSave": true | ||||
|     }, | ||||
|     "editor.defaultFormatter": "esbenp.prettier-vscode", | ||||
|     "prettier.configPath": ".prettierrc.json", | ||||
|     "editor.formatOnSave": true, | ||||
|     "editor.codeActionsOnSave": { | ||||
|         "source.fixAll": "explicit" | ||||
|     } | ||||
|   "rust-analyzer.check.command": "clippy", | ||||
|   "[rust]": { | ||||
|     "editor.defaultFormatter": "rust-lang.rust-analyzer", | ||||
|     "editor.tabSize": 4, | ||||
|     "editor.formatOnSave": true | ||||
|   }, | ||||
|   "[toml]": { | ||||
|     "editor.defaultFormatter": "tamasfe.even-better-toml", | ||||
|     "editor.formatOnSave": true | ||||
|   }, | ||||
|   "editor.defaultFormatter": "esbenp.prettier-vscode", | ||||
|   "prettier.configPath": ".prettierrc.json", | ||||
|   "editor.formatOnSave": true, | ||||
|   "editor.codeActionsOnSave": { | ||||
|     "source.fixAll": "explicit" | ||||
|   } | ||||
| } | ||||
|   | ||||
							
								
								
									
										15
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								README.md
									
									
									
									
									
								
							| @@ -33,10 +33,9 @@ The project is **tested** against the following Rust versions: | ||||
|  | ||||
| They have to be installed using [Node.js](https://nodejs.org/) >= v20.0.0 and [npm](https://www.npmjs.com/) >= v10.0.0. | ||||
|  | ||||
| - [editorconfig-checker](https://editorconfig-checker.github.io/) (`npm install --global editorconfig-checker@5.1.2`) | ||||
| - [Prettier](https://prettier.io/) v3.2.4 (`npm install --global prettier@3.2.4`) | ||||
| - [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) v0.12.1 (`npm install --global markdownlint-cli2@0.12.1`) | ||||
| - [commitlint](https://commitlint.js.org/#/) v18.6.0 (`npm install --global @commitlint/cli@18.6.0 @commitlint/config-conventional@18.6.0`) | ||||
| ```sh | ||||
| npm clean-install | ||||
| ``` | ||||
|  | ||||
| ### Usage | ||||
|  | ||||
| @@ -51,10 +50,10 @@ cargo clippy --verbose -- -D warnings | ||||
| cargo fmt -- --check | ||||
|  | ||||
| # External Linting Tools Usage (optional) | ||||
| editorconfig-checker | ||||
| prettier . --check | ||||
| markdownlint-cli2 | ||||
| echo 'chore: try commitlint' | commitlint | ||||
| echo 'chore: try commitlint' | npm run lint:commit | ||||
| npm run lint:editorconfig | ||||
| npm run lint:markdown | ||||
| npm run lint:prettier | ||||
| ``` | ||||
|  | ||||
| ## 💡 Contributing | ||||
|   | ||||
| @@ -6,4 +6,4 @@ CCC = (ZZZ, GGG) | ||||
| DDD = (DDD, DDD) | ||||
| EEE = (EEE, EEE) | ||||
| GGG = (GGG, GGG) | ||||
| ZZZ = (ZZZ, ZZZ) | ||||
| ZZZ = (ZZZ, ZZZ) | ||||
|   | ||||
							
								
								
									
										2570
									
								
								package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										2570
									
								
								package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										24
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| { | ||||
|   "name": "advent_of_code_2023", | ||||
|   "private": true, | ||||
|   "type": "module", | ||||
|   "engines": { | ||||
|     "node": ">=20.0.0", | ||||
|     "npm": ">=10.0.0" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "lint:commit": "commitlint", | ||||
|     "lint:editorconfig": "editorconfig-checker", | ||||
|     "lint:markdown": "markdownlint-cli2", | ||||
|     "lint:prettier": "prettier . --check" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@commitlint/cli": "18.6.0", | ||||
|     "@commitlint/config-conventional": "18.6.0", | ||||
|     "editorconfig-checker": "5.1.3", | ||||
|     "markdownlint": "0.33.0", | ||||
|     "markdownlint-cli2": "0.12.1", | ||||
|     "markdownlint-rule-relative-links": "2.3.1", | ||||
|     "prettier": "3.2.5" | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user