You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+48-39Lines changed: 48 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,18 +77,18 @@ The baseline of work is as follows:
77
77
1. We'll assign the issue to you, so you get to work on this exercise
78
78
1. Create a new folder in `/exercises`
79
79
1. You'll need to sync this folder with the matching config files.
80
-
You can use `scripts/sync` to do this: `ASSIGNMENT=slug npx babel-node scripts/sync`.
80
+
You can use `scripts/sync` to do this.
81
81
1. Create a `<slug>.js` stub file.
82
82
1. Create a `<slug>.spec.js` test file. Here add the tests, per canonical data if possible (more on canonical data below).
83
83
1. Create an `example.js` file. Place a working implementation, assuming it's renamed to `<slug>.js`
84
84
1. Create `.meta/tests.toml`.
85
85
If the exercise that is being implemented has test data in the [problem specifications repository][problem-specifications], the contents of this file **must** be a list of UUIDs of the tests that are implemented or not implemented.
86
86
Scroll down to [tools](#tools) to find configlet which aids in generating this file _interactively_.
87
-
1. Run the tests locally, using `scripts/test`: `ASSIGNMENT=slug npx babel-node scripts/test`.
88
-
1. Run the linter locally, using `scripts/lint`: `ASSIGNMENT=slug npx babel-node scripts/lint`.
87
+
1. Run the tests locally, using `scripts/test`.
88
+
1. Run the linter locally, using `scripts/lint`.
89
89
1. Create an entry in `config.json`: a unique _new_ UUID (you can use the `configlet uuid` tool to generate one, scroll down to [tools](#tools) to see how you can get it), give it a difficulty (should be similar to similar exercises), and make sure the _order_ of the file is sane.
90
90
Currently, the file is ordered first on concept exercise, then on "original core", finally everything else, on difficulty low to high, and ultimately lexicographically.
91
-
1. Format the files, using `scripts/format`: `npx babel-node scripts/format`.
91
+
1. Format the files, using `scripts/format`.
92
92
93
93
The final step is opening a Pull Request, with these items all checked off.
94
94
Make sure the tests run and the linter is happy. It will run automatically on your PR.
@@ -210,27 +210,6 @@ It then interactively gives the maintainer the option to include or exclude test
210
210
211
211
We have various `scripts` to aid with maintaining and contributing to this repository.
212
212
213
-
> [!IMPORTANT]
214
-
> If you encounter the following error:
215
-
>
216
-
> ```text
217
-
> SyntaxError: Unexpected token 'export'
218
-
> ```
219
-
>
220
-
> It's because your local Node.js version does **not** support es6
221
-
> `import` and `export` statements in regular `.js` files, or
222
-
> files without extension. This is one of the reasons why these
223
-
> scripts are meant to be run through Node.js:
224
-
>
225
-
> ```shell
226
-
> npx babel-node scripts/the-script
227
-
> ```
228
-
>
229
-
> Additionally, this ensures that the code written in the scripts
230
-
> and their dependencies can be executed by your current Node.js
231
-
> version, which may be different from the version used by the
232
-
> maintainer or contributor who contributed to the script.
233
-
234
213
#### `format`
235
214
236
215
```js
@@ -250,7 +229,7 @@ The correct version will be extracted when running `.github/workflows/verify-cod
250
229
251
230
```js
252
231
/*
253
-
* Run this script (from root directory): npx babel-node scripts/lint
232
+
* Run this script (from root directory): corepack pnpm node scripts/lint.mjs
254
233
*
255
234
* This runs `eslint` on all sample solutions (and test) files
'The card has disappeared, but the stack has not changed in size. This magic trick has turned into actual magic. Perhaps a different method of removing the card will result in a stack that Elyse can work with...',
121
-
),
117
+
thrownewError(
118
+
'The card has disappeared, but the stack has not changed in size. This magic trick has turned into actual magic. Perhaps a different method of removing the card will result in a stack that Elyse can work with...',
0 commit comments