* Upgrade svglint from 1.3.0 to 2.0.0
* Update minimum required NodeJS version for local testing
In accordance with the new minimum required NodeJS version for SVGLint:
2d242fe57a/package.json (L52)
* Update CONTRIBUTING.md
Co-authored-by: LitoMore <LitoMore@users.noreply.github.com>
* switch from jest to uvu
* remove jest config
* convert index.test.js to uvu
* use assert.type
* Get rid of jest-diff
* Remove uneeded splits
* remove out.txt
* switch to fake-diff
* make building async and minify with esbuild
* switch from fs/promises to fs.promises
* cleanup fs.promises
* fix conflicts
* fix conflicts
* revert test file changes
* refactor: reorganize tests, reduce repetition
* fix conflicts
* fix conflicts
* remove unnecessary type checks and use toStrictEqual
* move index tests to separate file
* test svg values in testIcon
* Add prettier as a dependency
* Add format command and configure prettier
I opted for single quotes to be in line with other simple-icons projects
I ignore the data file because changing its formatting is quite a bit of
trouble for all open PRs.
* Run prettier
* Replace all functions by arrow functions
* Move prettier configuration to config file
Move it to a file so editors (and other software) can pick up on the
configuration. I went with .js because (a) it allows for comments and
(2) it seems most of the config files are in JavaScript already.
* Add prettier --check when running npm run lint (This adds it to the CI as well)
* Add husky and format changes before committing
* Use object destructuring for imports consistently
* Add shebang and fileoverview to jsonlint.js
* Update all dependencies
* Update SVGO configuration
SVGO v2.4.0 deprecated the old approach of extending default
plugins (using `extendDefaultPlugins`) and introduced a new
approach using the 'preset-default' plugin.
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com>
* Restructure scripts/ directory
And update references to this scripts everywhere.
* Update names of file-level constants in bump-version.js
* Normalize quotes between all scripts
* Move "create-release.yml" scripts to scripts/release
* Move slugs table script to scripts/release
* Update relative path logic in update-slugs-table.js
* Implement better linter error handling; fix error in 'collinear-segments' lint rule
* Revert changes
* Fix error with resolution tips
* Fix lint error
* Fix minor errors
* Increase performance bumping svg-path-segments version
* Minor change in function name and bump svg-path-segments to 0.1.5
* Update function doc
* Remove 'segmentsSVGPath' function and update functions documentation
* Fix error in index number
* Fix automatic collinear segment
* Upgrade SVGO to version 2
* Sketch neither supports space after arc flags
* Bump svgo to version 2.0.3 and enable 'reusePaths'
* Improve comment
* Simplify additional plugins list; update svgo script in package.json
* Apply suggestions from review
* Add "license" object to the data file JSON schema
* Add license to GNU and GNU social
As an example, based on the discussion in:
https://github.com/simple-icons/simple-icons/issues/1167
* Use `"additionalProperties": false` in JSON schema
... to detect properties in the data file that shouldn't be there.
For more info, see:
https://json-schema.org/understanding-json-schema/reference/object.html
* Update JSON scheme descriptions
* Switch from jsonlint2 to jsonschema
This gives is better support for advanced features of JSON schema.
A couple of clarifications:
- There does exist a jsonschema-cli package, but it is rather limited
and crucially doens't exit with a non-zero exit code if there is an
error. (it is also pretty old and not maintained), hence the custom
script.
- I renamed .jsonlintschema 1) for clarity (lint is no longer accurate)
and 2) the .json extension allows easy imorting in the script and 3)
it adds syntax highlighting.
- The script outputs the number of errors in the end because the output
gets pretty big pretty quickly, this way you can see it easily from
your CLI.
- We could customize how the errors are logged, but I feel that is
beyond this PR.
* Two minor changes
* Use `oneOf` to require URL for custom licenses
The updated configuration allows the `"license"` field to be either
1) a SPDX license, optional with a URL
2) a "custom" license with a required URL
Read more about the "oneOf" feature of jsonschema at:
https://json-schema.org/understanding-json-schema/reference/combining.html#oneof
* Include license field in Contributing Guidelines
* 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
* Add test for check JSON data file prettification
* Move prettification test to out linting script
* Add other newline in error message to improve readability
* Invert the diff to show the solution to the user
* Add 'jest-diff' as direct dependency
* Remove annotations and colors
* Replace CRLF newlines with LFs in JSON prettification lint
* Restore colors in JSON prettification lint
* Check outlying precision while running linter
* Prevent reduce error on empty array
* Rebase on branch develop
* Add svgpath dep
* Improve decimal precision verification
* Check outlying precision while running linter
* Prevent reduce error on empty array
* Fix ignored file
* Fix reverted dep version
* Check decimal according to review proposal
* Pin svgpath version
* Use te maximum precision only
* Run linter again
* Fix uglify-js version
* Add supported engines to package.json
* Improve message
* Revert engines and use version check in linter
* Move function
* Update node version to 12 in Travis
* Add skip ignored