- Notifications
You must be signed in to change notification settings - Fork631
Exercism exercises in JavaScript.
License
exercism/javascript
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Important
We 💙 our community butthis repository does not accept community contributions at this time.
There are no active maintainers to review PRs.
Please read thiscommunity blog post for details.
Exercism exercises in JavaScript
This is the JavaScript track, one of the many tracks onExercism.It holds all theexercises that are currently implemented and available for students to complete.The track consists of variousconcept exercises that teach theJavaScript syllabus, and various practice exercises, which are unlocked by progressing in the syllabus and can be used to practice concepts learned.You can find this in theconfig.json
.
SeeCONTRIBUTING.md for a list of requirements to contribute to this track.It also has a list of tools you can use, of which thetest
tool is one of them.
This runeslint
for all files thatrequire linting.
corepack pnpm node scripts/lint.mjs --fix
These are also the files that are linted using the lint script, mentioned inCONTRIBUTING.md.The lint rules imposed on contributors and maintainers are stricter than those for the student.The idea is that we donot impose style rules on the students, but we guard for (potential) errors.
Files with strict rules:
<slug>.spec.js
.meta/proof.ci.js
.meta/exemplar.js
Files with loose rules:
custom.spec.js
<slug>.js
This runsjest
tests for all sample solutions.Thisdoes not use the regular way to runjest
, because the example solution files must be renamed to be imported correctly into the test files.
corepack pnpm node scripts/test.mjs
If theASSIGNMENT
environment variable is set, onlythat exercise is tested.For example, if you only want to test theexample.js
for the practice exercisetwo-fer
, you may, depending on your environment, use:
ASSIGNMENT=practice/two-fer corepack pnpm node scripts/test.mjs
Running on Windows? Depending on your shell, environment variables are set differently.You can use
cross-env
to normalize this. The following should work across environments:# if installed globallycross-env ASSIGNMENT=practice/two-fer corepack pnpm node scripts/test.mjs# otherwisecorepack pnpm dlx cross-env ASSIGNMENT=practice/two-fer node scripts/test.mjs
- Website Copy (Mentor Notes)
- The JavaScript Analyzer (Automated Code Analysis)
- The JavaScript Representer
- The JavaScript Test Runner
- Static Analysis Shared Library
A lot of the improvements made to this track and tooling are also made to the TypeScript track and tooling and vice-versa.
About
Exercism exercises in JavaScript.