mirror of
https://github.com/theoludwig/advent_of_code_2023.git
synced 2024-12-08 00:45:53 +01:00
chore: simplify external tools dependency management
This commit is contained in:
parent
51f9ac4bfc
commit
68078034e6
@ -10,5 +10,5 @@ charset = utf-8
|
|||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
[*.{yml,yaml,md}]
|
[*.{yml,yaml,json,md}]
|
||||||
indent_size = 2
|
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 clippy --verbose -- -D warnings"
|
||||||
- run: "cargo fmt -- --check"
|
- 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:
|
lint-general:
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
@ -57,10 +37,11 @@ jobs:
|
|||||||
- name: "Setup Node.js"
|
- name: "Setup Node.js"
|
||||||
uses: "actions/setup-node@v4.0.1"
|
uses: "actions/setup-node@v4.0.1"
|
||||||
with:
|
with:
|
||||||
node-version: "20.11.0"
|
node-version: "20.x"
|
||||||
|
|
||||||
- run: "npm install --global editorconfig-checker@5.1.2"
|
- run: "npm clean-install"
|
||||||
- run: "npm install --global prettier@3.2.4"
|
|
||||||
|
|
||||||
- run: "editorconfig-checker"
|
- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
|
||||||
- run: "prettier . --check"
|
- 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": {
|
"config": {
|
||||||
|
"extends": "markdownlint/style/prettier",
|
||||||
"default": true,
|
"default": true,
|
||||||
"no-inline-html": false,
|
"relative-links": true,
|
||||||
"no-duplicate-heading": false,
|
"no-duplicate-heading": false,
|
||||||
|
"no-inline-html": 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,
|
|
||||||
},
|
},
|
||||||
"globs": ["**/*.md"],
|
"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": [
|
"recommendations": [
|
||||||
"editorconfig.editorconfig",
|
"editorconfig.editorconfig",
|
||||||
"esbenp.prettier-vscode",
|
"esbenp.prettier-vscode",
|
||||||
"davidanson.vscode-markdownlint",
|
"davidanson.vscode-markdownlint",
|
||||||
"rust-lang.rust-analyzer",
|
"rust-lang.rust-analyzer",
|
||||||
"tamasfe.even-better-toml"
|
"tamasfe.even-better-toml"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
32
.vscode/settings.json
vendored
32
.vscode/settings.json
vendored
@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"rust-analyzer.check.command": "clippy",
|
"rust-analyzer.check.command": "clippy",
|
||||||
"[rust]": {
|
"[rust]": {
|
||||||
"editor.defaultFormatter": "rust-lang.rust-analyzer",
|
"editor.defaultFormatter": "rust-lang.rust-analyzer",
|
||||||
"editor.tabSize": 4,
|
"editor.tabSize": 4,
|
||||||
"editor.formatOnSave": true
|
"editor.formatOnSave": true
|
||||||
},
|
},
|
||||||
"[toml]": {
|
"[toml]": {
|
||||||
"editor.defaultFormatter": "tamasfe.even-better-toml",
|
"editor.defaultFormatter": "tamasfe.even-better-toml",
|
||||||
"editor.formatOnSave": true
|
"editor.formatOnSave": true
|
||||||
},
|
},
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
"prettier.configPath": ".prettierrc.json",
|
"prettier.configPath": ".prettierrc.json",
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll": "explicit"
|
"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.
|
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`)
|
```sh
|
||||||
- [Prettier](https://prettier.io/) v3.2.4 (`npm install --global prettier@3.2.4`)
|
npm clean-install
|
||||||
- [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`)
|
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
@ -51,10 +50,10 @@ cargo clippy --verbose -- -D warnings
|
|||||||
cargo fmt -- --check
|
cargo fmt -- --check
|
||||||
|
|
||||||
# External Linting Tools Usage (optional)
|
# External Linting Tools Usage (optional)
|
||||||
editorconfig-checker
|
echo 'chore: try commitlint' | npm run lint:commit
|
||||||
prettier . --check
|
npm run lint:editorconfig
|
||||||
markdownlint-cli2
|
npm run lint:markdown
|
||||||
echo 'chore: try commitlint' | commitlint
|
npm run lint:prettier
|
||||||
```
|
```
|
||||||
|
|
||||||
## 💡 Contributing
|
## 💡 Contributing
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user