geraintluff / uri-templates

JavaScript utility for RFC 6570: URI Templates
138 stars 21 forks source link

chore: drop grunt, jshint -> eslint, ESM in tests #30

Open brettz9 opened 8 months ago

brettz9 commented 8 months ago

Closes #2 .

This PR moves away from Grunt to package.json scripts as per most current projects' practices.

It also switches jshint to the more widely used eslint.

The switch to ESM in tests necessitated redefining __dirname which is not present by default in modules (and where importing of JSON is only supported by the latest Node versions). There were also a couple unused variables I removed to handle linting errors.

The tests are still passing if you run npm run mocha, but npm test is currently failing as it depends on eslint passing, and there are some linting errors in the main src file which still need to be fixed (ESLint's recommended config is more strict about certain things). I plan to do this in a separate PR, allowing this PR to have less noise and focus more on the chores.

Please let me know your preferences for PRs (e.g., if you don't care about having PRs for minor chores).