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