Closes #31.
Relates to #23. ESLint should tell us if we try to use features from ES7+.
Relates to #39.
Changes
Adds a package.json file to support npm dependencies
Adds ESLint as a dev dependency from npm
Adds an ESLint configuration file with just the basic recommended rules for now. It applies to all JavaScript files in static/js except for minified ones like html.min.js.
Adds an npm script so we can run the linter with npm run lint
Adds a GitHub Action to run ESLint for pull requests to the main branch
Adds linting instructions to README.md
Fixes a few bad practices ESLint already caught (missing variable declarations)
Notes
For now I'm just informing ESLint about global variables like lucide and queryStructure at the top of the files that use them.
Closes #31. Relates to #23. ESLint should tell us if we try to use features from ES7+. Relates to #39.
Changes
static/js
except for minified ones likehtml.min.js
.npm run lint
Notes
For now I'm just informing ESLint about global variables like
lucide
andqueryStructure
at the top of the files that use them.