config: add specific tslint file for tests, adjust eslint/tslint to fail on broken rule (error severity)
This commit is contained in:
parent
dd3fd42fea
commit
d2c40cee18
|
@ -10,10 +10,10 @@
|
|||
"ecmaVersion": 2018
|
||||
},
|
||||
"rules": {
|
||||
"no-shadow": "warn",
|
||||
"no-magic-numbers": ["warn", { "ignore": [0, 1, -1] }],
|
||||
"no-param-reassign": "warn",
|
||||
"prefer-template": "warn"
|
||||
"no-shadow": "error",
|
||||
"no-magic-numbers": ["error", { "ignore": [0, 1, -1] }],
|
||||
"no-param-reassign": "error",
|
||||
"prefer-template": "error"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"eslint-check": "eslint --print-config gulpfile.js | eslint-config-prettier-check",
|
||||
"eslint": "eslint .",
|
||||
"tslint-check": "tslint-config-prettier-check ./tslint.json",
|
||||
"tslint": "tslint -t stylish -c tslint.json -p tsconfig.json",
|
||||
"tslint": "tslint -t stylish -p tsconfig.json",
|
||||
"prettier": "prettier --ignore-path .gitignore -c **/*.{html,json,{c,sc,sa,le}ss,yml,svelte,md,ts,js}",
|
||||
"prettier:write": "prettier --ignore-path .gitignore --write **/*.{html,json,{c,sc,sa,le}ss,yml,svelte,md,ts,js}",
|
||||
"forge:start": "electron-forge start",
|
||||
|
|
|
@ -5,7 +5,7 @@ import { Application } from 'spectron';
|
|||
import packageJson from '../../package.json';
|
||||
|
||||
describe('Application', function(): void {
|
||||
this.timeout('10s');
|
||||
this.timeout(10000);
|
||||
|
||||
beforeEach(function(): any {
|
||||
this.app = new Application({
|
||||
|
|
|
@ -6,7 +6,7 @@ import sinon from 'sinon';
|
|||
import { fetch } from '../../../src/main/services/web-crawler';
|
||||
|
||||
describe('Web Crawler', function(): void {
|
||||
this.timeout('2s');
|
||||
this.timeout(2000);
|
||||
|
||||
beforeEach(() => {
|
||||
if (!nock.isActive()) {
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"extends": ["../tslint.json"],
|
||||
"rules": {
|
||||
"no-magic-numbers": false
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"defaultSeverity": "warn",
|
||||
"defaultSeverity": "error",
|
||||
"rules": {
|
||||
"typedef": [
|
||||
true,
|
||||
|
|
Loading…
Reference in New Issue