module.exports = {
- '**/*.{ts,tsx}': [
+ '**/*.{ts,tsx,js,jsx,mjs,cjs}': [
'prettier --write',
'ts-standard --fix',
'eslint --cache --fix'
],
- '**/*.{js,jsx,mjs,cjs}': ['prettier --write', 'eslint --cache --fix'],
'**/*.{json,md,yml,yaml}': ['prettier --write']
}
Take tasks from todo list, develop a new feature or fix a bug and do a pull request.
Another thing that you can do to contribute is to build something on top of ring-election and link ring-election to your project
-Please ask your PR to be merged on **master** branch.
+Please do your PR on **master** branch.
**How to run unit tests and coverage**
"test:debug": "npm run build && mocha --no-parallel --inspect 'tests/**/*.test.js'",
"coverage": "c8 report --reporter=lcov",
"coverage:html": "c8 report --reporter=html",
+ "format": "prettier . --write; ts-standard . --fix",
"lint": "eslint . --cache",
"lint:fix": "eslint . --cache --fix",
"lint:report": "eslint . --cache --format json --output-file reports/eslint.json",
"prepublishOnly": "npm run build:prod"
},
"ts-standard": {
- "ignore": [
- "tests/**/*.js"
+ "globals": [
+ "describe",
+ "it",
+ "before",
+ "after",
+ "beforeEach",
+ "afterEach"
]
},
"engines": {
*/
private checkFunctionInput (fn: (data: Data) => Response): void {
if (fn == null) throw new Error('fn parameter is mandatory')
- if (typeof fn !== 'function') { throw new TypeError('fn parameter is not a function') }
+ if (typeof fn !== 'function') {
+ throw new TypeError('fn parameter is not a function')
+ }
}
/**