Skip to content

Commit

Permalink
Refactor to Typescript (#1)
Browse files Browse the repository at this point in the history
* refactor: updated to now be a typescript package with js as well

* updated categories to pull correctly

* added ts maps and types

* checked currency code and country code fix

* cleaned up tests

* removed createExecutionItem as an export

* ci for later versions of node
  • Loading branch information
devinpearson committed Jan 23, 2024
1 parent cf8c940 commit 97f59cc
Show file tree
Hide file tree
Showing 36 changed files with 7,506 additions and 305 deletions.
59 changes: 59 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"prettier",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"prettier/prettier": ["error", {
"singleQuote": true,
"trailingComma": "all",

"endOfLine": "auto",
"arrowParens": "avoid",
"tabWidth": 2
}],

"arrow-body-style": "off",
"prefer-arrow-callback": "off",

"@typescript-eslint/array-type": 0,
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-unused-vars": "off",

"arrow-parens": "off",
"curly": "off",
"no-case-declarations": "off",

"quotes": "off",
"@typescript-eslint/quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
"prefer-rest-params": "off",
"no-bitwise": "off",
"no-console": "off",
"no-empty": ["error", { "allowEmptyCatch": true }],

"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",

"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "off",

"space-before-function-paren": "off"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x, 20.x, 21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

**/node_modules
*.json
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const transaction = emu.createTransaction(
"0000", // Merchant code (MCC)
"Test Merchant", // Merchant Name
"Test City", // City
"ZAF"
); // Country Code
"ZAF" // Country code
);
```

Run an emulation:
Expand Down
Loading

0 comments on commit 97f59cc

Please sign in to comment.