Skip to content

Commit

Permalink
feat: Implement Chapter 4 (scanner) (#3)
Browse files Browse the repository at this point in the history
<!-- 👋 Hi, thanks for sending a PR to gravlax! 💖.
Please fill out all fields below and make sure each item is true and [x]
checked.
Otherwise we may not be able to review your PR. -->

## PR Checklist

- [ ] Addresses an existing open issue: fixes #000
- [ ] That issue was marked as [`status: accepting
prs`](https://github.com/danvk/gravlax/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [ ] Steps in
[CONTRIBUTING.md](https://github.com/danvk/gravlax/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

<!-- Description of what is changed and how the code change does that.
-->
  • Loading branch information
danvk authored Jan 9, 2024
1 parent 14498fe commit e2493bc
Show file tree
Hide file tree
Showing 18 changed files with 572 additions and 74 deletions.
6 changes: 2 additions & 4 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module.exports = {
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param": "off",
"jsdoc/require-property": "off",

"jsdoc/require-returns": "off",
},
},
Expand Down Expand Up @@ -135,10 +136,7 @@ module.exports = {
"no-mixed-spaces-and-tabs": "off",

// Stylistic concerns that don't interfere with Prettier
"@typescript-eslint/padding-line-between-statements": [
"error",
{ blankLine: "always", next: "*", prev: "block-like" },
],
"@typescript-eslint/padding-line-between-statements": "off",
"no-useless-rename": "error",
"object-shorthand": "error",
"perfectionist/sort-objects": [
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ jobs:
- uses: mtfoley/pr-compliance-action@main
with:
body-auto-close: false
body-regex: PLEASE_NEVER_MATCH_I_DONT_USE_ISSUES
ignore-authors: |-
allcontributors
allcontributors[bot]
Expand Down
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"tasks": [
{
"detail": "knip",
"label": "npm: lint:knip",
"problemMatcher": {
"fileLocation": ["relative", "${workspaceFolder}"],
"owner": "tsc",
"pattern": [
{
"message": 1,
"regexp": "^([^\\s].*) \\(\\d+\\)$"
},
{
"column": 5,
"file": 3,
"line": 4,
"loop": true,
"regexp": "([^ ]+) +([^ ]+) +([^:]+):(\\d+):(\\d+)"
}
]
},
"script": "lint:knip",
"type": "npm"
},
{
"detail": "cspell \"**\" \".github/**/*\"",
"label": "npm: lint:spelling",
"problemMatcher": ["$markdownlint"],
"script": "lint:spelling",
"type": "npm"
},
{
"detail": "eslint . .*js --max-warnings 0",
"label": "npm: lint",
"problemMatcher": ["$eslint-stylish"],
"script": "lint",
"type": "npm"
}
],
"version": "2.0.0"
}
4 changes: 3 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"packagejson",
"quickstart",
"tsup",
"wontfix"
"wontfix",
"gravlax",
"Vanderkam"
]
}
1 change: 1 addition & 0 deletions examples/hello.lox
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print "Hello World";
2 changes: 1 addition & 1 deletion knip.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://unpkg.com/knip@latest/schema.json",
"entry": ["src/index.ts!"],
"ignoreExportsUsedInFile": { "interface": true, "type": true },
"ignoreExportsUsedInFile": true,
"project": ["src/**/*.ts!"]
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"license": "MIT",
"author": {
"name": "Dan Vanderkam",
"email": "danvdk@gmail.com"
},
"type": "module",
Expand All @@ -28,6 +29,7 @@
"lint:packages": "pnpm dedupe --check",
"lint:spelling": "cspell \"**\" \".github/**/*\"",
"prepare": "husky install",
"repl": "node --loader ts-node/esm --no-warnings src/index.ts",
"should-semantic-release": "should-semantic-release --verbose",
"test": "vitest",
"tsc": "tsc"
Expand All @@ -38,6 +40,7 @@
"devDependencies": {
"@release-it/conventional-changelog": "^8.0.1",
"@types/eslint": "^8.56.1",
"@types/node": "^20.10.7",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"@vitest/coverage-v8": "^1.1.3",
Expand Down Expand Up @@ -69,6 +72,7 @@
"release-it": "^17.0.1",
"sentences-per-line": "^0.2.1",
"should-semantic-release": "^0.2.1",
"ts-node": "^10.9.2",
"tsup": "^8.0.1",
"typescript": "^5.3.3",
"vitest": "^1.1.3",
Expand Down
102 changes: 98 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 0 additions & 44 deletions src/greet.test.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/greet.ts

This file was deleted.

Loading

0 comments on commit e2493bc

Please sign in to comment.