Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into pr/arnonm/853
Browse files Browse the repository at this point in the history
  • Loading branch information
baruchiro committed Jul 11, 2024
2 parents 0b203c5 + de0e614 commit 29bdb4e
Show file tree
Hide file tree
Showing 53 changed files with 7,081 additions and 21,482 deletions.
99 changes: 58 additions & 41 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,47 @@
module.exports = {
root: true,
"rules": {
"import/prefer-default-export": 0,
"no-nested-ternary": 0,
"class-methods-use-this": 0,
"arrow-body-style": 0,
"no-shadow": 0,
"no-await-in-loop": 0,
"no-restricted-syntax": [
"error",
"ForInStatement",
"LabeledStatement",
"WithStatement"
rules: {
'import/prefer-default-export': 0,
'no-multiple-empty-lines': 0,
'no-nested-ternary': 0,
'class-methods-use-this': 0,
'arrow-body-style': 0,
'no-shadow': 0,
'no-await-in-loop': 0,
'no-restricted-syntax': [
'error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
"operator-linebreak": ["error", "after"],
"max-len": ["error", 120, 2, {
"ignoreUrls": true,
"ignoreComments": true,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignorePattern": "^(async )?function "
'operator-linebreak': ['error', 'after'],
'max-len': ['error', 120, 2, {
ignoreUrls: true,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignorePattern: '^(async )?function ',
}],
"linebreak-style": process.platform === "win32"? 0: 2,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/member-delimiter-style": [ "error", {
'linebreak-style': process.platform === 'win32' ? 0 : 2,
'quote-props': ['error', 'consistent-as-needed'],
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/restrict-template-expressions': ['error', {
allowNever: true,
}],
'@typescript-eslint/consistent-type-imports': ['error', {
fixStyle: 'inline-type-imports',
}],
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'semi',
requireLast: true,
Expand All @@ -36,24 +50,27 @@ module.exports = {
delimiter: 'comma',
requireLast: false,
},
}]
}],
},
"globals": {
"document": true,
"window": true,
"fetch": true,
"Headers": true
globals: {
document: true,
window: true,
fetch: true,
Headers: true,
},
"env": {
"jest": true
env: {
jest: true,
},
parserOptions: {
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
extends: ['airbnb-typescript/base',
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"]
}
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/errors',
],

};
3 changes: 3 additions & 0 deletions .github/workflows/nodeCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: browser-actions/setup-chrome@v1
- name: npm install and test
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ runner.os == 'macOS-latest' && 'true' || 'false' }}
run: |
npm ci
npm run test:ci
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.19.0
v18.19.0
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Israeli Bank Scrapers - Get closer to your own data
Israeli Bank Scrapers - Get closer to your own data!
========
<img src="./logo.png" width="100" height="100" alt="Logo" align="left" />

Expand Down Expand Up @@ -79,7 +79,7 @@ import { CompanyTypes, createScraper } from 'israeli-bank-scrapers';
})();
```

Check the options declaration [here](./src/scrapers/base-scraper.ts) for available options.
Check the options declaration [here](./src/scrapers/interface.ts#L29) for available options.

Regarding credentials, you should provide the relevant credentials for the chosen company. See [this file](./src/definitions.ts) with list of credentials per company.

Expand Down
17 changes: 8 additions & 9 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html

module.exports = {
/** @type {import('jest').Config} */
const config = {
preset: 'ts-jest/presets/js-with-babel',
clearMocks: true,
coverageDirectory: 'coverage',
rootDir: './src',
transform: {
'^.+\\.ts$': 'ts-jest'
'^.+\\.ts$': ['ts-jest', {
babelConfig: true,
}],
},
setupFiles: [
setupFilesAfterEnv: [
'./tests/jest-setup.ts',
],
testEnvironment: 'node',
globals: {
'ts-jest': {
babelConfig: true,
}
},
};

module.exports = config;
Loading

0 comments on commit 29bdb4e

Please sign in to comment.