Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Lusito committed Apr 2, 2020
1 parent 8212189 commit ee6d97b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ module.exports = {
},
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.ts$",
moduleFileExtensions: ["ts", "js"],
collectCoverage: true
collectCoverage: true,
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dist"
],
"scripts": {
"build": "rimraf dist && tsc",
"build": "rimraf dist && tsc -p tsconfig-build.json",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"doc": "rimraf docs && typedoc --out docs --excludeNotExported --exclude src/*.spec.ts src && copyfiles -a -f doc-assets/* docs",
"lint": "npm run lint:style && npm run lint:es && npm run lint:package",
Expand Down
11 changes: 2 additions & 9 deletions src/Signal.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
/* eslint-disable no-undef */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable no-undef */
// CC0 Public Domain: http://creativecommons.org/publicdomain/zero/1.0/

import {
Signal,
SignalConnections,
CollectorLast,
CollectorUntil0,
CollectorWhile0,
CollectorArray,
} from "./Signal";
import { Signal, SignalConnections, CollectorLast, CollectorUntil0, CollectorWhile0, CollectorArray } from "./Signal";

class Dummy {}

Expand Down
3 changes: 2 additions & 1 deletion src/Signal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ class SignalConnectionImpl<THandler extends (...args: any[]) => any> implements
}

public get enabled(): boolean {
return !!this.link?.isEnabled();
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
return this.link !== null && this.link.isEnabled();
}
}

Expand Down
4 changes: 4 additions & 0 deletions tsconfig-build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["src/**/*.spec.ts", "dist"]
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node"
},
"exclude": ["src/**/*.spec.ts", "dist"]
"exclude": ["dist"]
}

0 comments on commit ee6d97b

Please sign in to comment.