-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies, add lint and unit-tests
- Loading branch information
1 parent
d0c1af8
commit 22206ca
Showing
14 changed files
with
8,080 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Unit Tests | ||
on: | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/[email protected] | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run lint | ||
run: npm run lint | ||
|
||
- name: Run tests | ||
run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# IDE | ||
.idea | ||
node_modules | ||
node_modules | ||
|
||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
const js = require("@eslint/js"); | ||
|
||
module.exports = [ | ||
{ | ||
// Global ignores | ||
ignores: ["dist/**"], | ||
}, | ||
{ | ||
// Base configuration | ||
files: ["**/*.{js}"], | ||
settings: { | ||
"import/resolver": { | ||
typescript: {}, | ||
}, | ||
}, | ||
rules: { | ||
...js.configs.recommended.rules, | ||
|
||
// Spacing and formatting rules | ||
"space-before-blocks": "error", | ||
"keyword-spacing": "error", | ||
"no-trailing-spaces": "error", | ||
curly: "error", | ||
quotes: ["error", "single"], | ||
"object-curly-spacing": ["error", "always"], | ||
"no-multi-spaces": "error", | ||
"semi-spacing": "error", | ||
|
||
// Code style rules | ||
"prefer-const": ["error", { destructuring: "all" }], | ||
"max-classes-per-file": ["error", 10], | ||
"max-len": ["error", 200], | ||
|
||
// Import rules | ||
"import/no-unresolved": [ | ||
"error", | ||
{ commonjs: true, caseSensitive: true }, | ||
], | ||
"import/extensions": ["error", "ignorePackages", { js: "never" }], | ||
}, | ||
}, | ||
{ | ||
// Test files override | ||
files: ["**/test/**"], | ||
rules: { | ||
"import/no-unresolved": "off", | ||
"import/extensions": "off", | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.