mirror of
				https://github.com/Mibew/simple-icons.git
				synced 2025-10-31 10:31:06 +03:00 
			
		
		
		
	Minor improvements (#4708)
* Remove .travis.yml reference from .gitattributes * Minor refactoring of .svglintrc.js - Remove unused variables - Fix missing semi-colons - Remove unneeded indentation * Prevent error in clean command due to missing files * Fix indentations * Further improvements to Editorconfig and indentation * Format YAML files - Update indentation for array notation - Normalize use of newlines
This commit is contained in:
		
							parent
							
								
									8fc59f0507
								
							
						
					
					
						commit
						a4ca74602f
					
				| @ -2,15 +2,13 @@ root=true | |||||||
| 
 | 
 | ||||||
| [*] | [*] | ||||||
| charset=utf-8 | charset=utf-8 | ||||||
| insert_final_newline=true |  | ||||||
| 
 |  | ||||||
| [LICENSE.md] |  | ||||||
| indent_size=unset |  | ||||||
| indent_style=space |  | ||||||
| 
 |  | ||||||
| [*.{json,yml}] |  | ||||||
| indent_size=2 | indent_size=2 | ||||||
| indent_style=space | indent_style=space | ||||||
|  | insert_final_newline=true | ||||||
|  | trim_trailing_whitespace=true | ||||||
|  | 
 | ||||||
|  | [*.md] | ||||||
|  | indent_size=unset | ||||||
| 
 | 
 | ||||||
| [*.svg] | [*.svg] | ||||||
| insert_final_newline=false | insert_final_newline=false | ||||||
| @ -20,4 +18,6 @@ trim_trailing_whitespace=false # Templates with trailing whitespace are more usa | |||||||
| 
 | 
 | ||||||
| [_data/simple-icons.json] | [_data/simple-icons.json] | ||||||
| indent_size=4 | indent_size=4 | ||||||
| trim_trailing_whitespace=true | 
 | ||||||
|  | [index.html] | ||||||
|  | indent_size=4 | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							| @ -14,5 +14,4 @@ Gemfile.lock       -diff | |||||||
| # Don't export/archive these files | # Don't export/archive these files | ||||||
| .github            export-ignore | .github            export-ignore | ||||||
| .gitpod.yml        export-ignore | .gitpod.yml        export-ignore | ||||||
| .travis.yml        export-ignore |  | ||||||
| CNAME              export-ignore | CNAME              export-ignore | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								.github/labeler.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/labeler.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,6 +1,6 @@ | |||||||
| new icon: | new icon: | ||||||
| - any: [icons/*.svg] |   - any: [icons/*.svg] | ||||||
|   status: 'added' |     status: added | ||||||
| icon outdated: | icon outdated: | ||||||
| - any: [icons/*.svg] |   - any: [icons/*.svg] | ||||||
|   status: 'modified' |     status: modified | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								.github/workflows/remove-labels.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/remove-labels.yml
									
									
									
									
										vendored
									
									
								
							| @ -25,7 +25,6 @@ jobs: | |||||||
|             out of scope |             out of scope | ||||||
|             pending |             pending | ||||||
|             won't add |             won't add | ||||||
| 
 |  | ||||||
|   remove-closed-pr-labels: |   remove-closed-pr-labels: | ||||||
|     name: Remove closed pull request labels |     name: Remove closed pull request labels | ||||||
|     if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged) |     if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged) | ||||||
| @ -37,7 +36,6 @@ jobs: | |||||||
|           labels: | |           labels: | | ||||||
|             in discussion |             in discussion | ||||||
|             pending |             pending | ||||||
| 
 |  | ||||||
|   remove-closed-issue-labels: |   remove-closed-issue-labels: | ||||||
|     name: Remove closed issue labels |     name: Remove closed issue labels | ||||||
|     if: github.event.issue.state == 'closed' |     if: github.event.issue.state == 'closed' | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ const iconMaxFloatPrecision = 5; | |||||||
| const iconTolerance = 0.001; | const iconTolerance = 0.001; | ||||||
| 
 | 
 | ||||||
| // set env SI_UPDATE_IGNORE to recreate the ignore file
 | // set env SI_UPDATE_IGNORE to recreate the ignore file
 | ||||||
| const updateIgnoreFile = process.env.SI_UPDATE_IGNORE === 'true' | const updateIgnoreFile = process.env.SI_UPDATE_IGNORE === 'true'; | ||||||
| const ignoreFile = "./.svglint-ignored.json"; | const ignoreFile = "./.svglint-ignored.json"; | ||||||
| const iconIgnored = !updateIgnoreFile ? require(ignoreFile) : {}; | const iconIgnored = !updateIgnoreFile ? require(ignoreFile) : {}; | ||||||
| 
 | 
 | ||||||
| @ -224,14 +224,14 @@ module.exports = { | |||||||
|                   } |                   } | ||||||
|                 } |                 } | ||||||
|                 if (index > 0) { |                 if (index > 0) { | ||||||
|                   let [yPrevCoord, xPrevCoord, ...prevRest] = [...absSegments[index - 1]].reverse(); |                   let [yPrevCoord, xPrevCoord] = [...absSegments[index - 1]].reverse(); | ||||||
|                   // If the previous command was a direction one, we need to iterate back until we find the missing coordinates
 |                   // If the previous command was a direction one, we need to iterate back until we find the missing coordinates
 | ||||||
|                   if (upperDirectionCommands.includes(xPrevCoord)) { |                   if (upperDirectionCommands.includes(xPrevCoord)) { | ||||||
|                     xPrevCoord = undefined; |                     xPrevCoord = undefined; | ||||||
|                     yPrevCoord = undefined; |                     yPrevCoord = undefined; | ||||||
|                     let idx = index; |                     let idx = index; | ||||||
|                     while (--idx > 0 && (xPrevCoord === undefined || yPrevCoord === undefined)) { |                     while (--idx > 0 && (xPrevCoord === undefined || yPrevCoord === undefined)) { | ||||||
|                       let [yPrevCoordDeep, xPrevCoordDeep, ...rest] = [...absSegments[idx]].reverse(); |                       let [yPrevCoordDeep, xPrevCoordDeep] = [...absSegments[idx]].reverse(); | ||||||
|                       // If the previous command was a horizontal movement, we need to consider the single coordinate as x
 |                       // If the previous command was a horizontal movement, we need to consider the single coordinate as x
 | ||||||
|                       if (upperHorDirectionCommand === xPrevCoordDeep) { |                       if (upperHorDirectionCommand === xPrevCoordDeep) { | ||||||
|                         xPrevCoordDeep = yPrevCoordDeep; |                         xPrevCoordDeep = yPrevCoordDeep; | ||||||
| @ -368,7 +368,7 @@ module.exports = { | |||||||
|                   currAbsCoord = [startPoint[0], startPoint[1]]; |                   currAbsCoord = [startPoint[0], startPoint[1]]; | ||||||
|                   _resetStartPoint = true; |                   _resetStartPoint = true; | ||||||
|                 } else { |                 } else { | ||||||
|                   throw new Error(`"${cmd}" command not handled`) |                   throw new Error(`"${cmd}" command not handled`); | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 if (startPoint === undefined) { |                 if (startPoint === undefined) { | ||||||
| @ -396,7 +396,7 @@ module.exports = { | |||||||
|                                                       currLine[p][0], |                                                       currLine[p][0], | ||||||
|                                                       currLine[p][1], |                                                       currLine[p][1], | ||||||
|                                                       currLine[p + 1][0], |                                                       currLine[p + 1][0], | ||||||
|                                                       currLine[p + 1][1]) |                                                       currLine[p + 1][1]); | ||||||
|                       if (_collinearCoord) { |                       if (_collinearCoord) { | ||||||
|                         collinearSegments.push(segments[s - currLine.length + p + 1]); |                         collinearSegments.push(segments[s - currLine.length + p + 1]); | ||||||
|                       } |                       } | ||||||
|  | |||||||
							
								
								
									
										18
									
								
								_config.yml
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								_config.yml
									
									
									
									
									
								
							| @ -1,10 +1,10 @@ | |||||||
| exclude: | exclude: | ||||||
| - tests |   - tests | ||||||
| - scripts |   - scripts | ||||||
| - composer.json |   - composer.json | ||||||
| - CONTRIBUTING.md |   - CONTRIBUTING.md | ||||||
| - Dockerfile |   - Dockerfile | ||||||
| - index.js |   - index.js | ||||||
| - package-lock.json |   - package-lock.json | ||||||
| - package.json |   - package.json | ||||||
| - README.md |   - README.md | ||||||
|  | |||||||
| @ -31,7 +31,7 @@ | |||||||
|   }, |   }, | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "build": "node scripts/build-package.js", |     "build": "node scripts/build-package.js", | ||||||
|     "clean": "rm icons/*.js index.js", |     "clean": "rm -f icons/*.js index.js", | ||||||
|     "lint": "run-s our-lint jsonlint svglint wslint", |     "lint": "run-s our-lint jsonlint svglint wslint", | ||||||
|     "our-lint": "node scripts/lint.js", |     "our-lint": "node scripts/lint.js", | ||||||
|     "jsonlint": "jsonlint _data/simple-icons.json -q -V .jsonlintschema", |     "jsonlint": "jsonlint _data/simple-icons.json -q -V .jsonlintschema", | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user