Turn on all of Microsoft's recommend lint rules
Biggest changes forced by this: alt tags for all images, resulting in new strings added to messages.json, and a new i18n paramter/prop added in a plot of places. Another change of note is that there are two new tslint.json files under ts/test and ts/styleguide to relax our rules a bit there. This required a change to our package.json script, as manually specifying the config file there made it ignore our tslint.json files in subdirectories
This commit is contained in:
parent
23586be6b0
commit
2988da0981
49 changed files with 311 additions and 123 deletions
|
@ -1,5 +1,3 @@
|
|||
import 'mocha';
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { shuffle } from 'lodash';
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
import 'mocha';
|
||||
import { assert } from 'chai';
|
||||
|
||||
import * as HTML from '../../html';
|
||||
|
@ -52,6 +51,7 @@ describe('HTML', () => {
|
|||
{
|
||||
name: 'URLs without protocols',
|
||||
input: 'github.com',
|
||||
// tslint:disable-next-line:no-http-string
|
||||
outputHref: 'http://github.com',
|
||||
outputLabel: 'github.com',
|
||||
},
|
||||
|
|
11
ts/test/tslint.json
Normal file
11
ts/test/tslint.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"defaultSeverity": "error",
|
||||
"extends": ["../../tslint.json"],
|
||||
"rules": {
|
||||
// To allow the use of devDependencies here
|
||||
"no-implicit-dependencies": false,
|
||||
|
||||
// All tests use arrow functions, and they can be long
|
||||
"max-func-body-length": false
|
||||
}
|
||||
}
|
|
@ -1,7 +1,3 @@
|
|||
/**
|
||||
* @prettier
|
||||
*/
|
||||
import 'mocha';
|
||||
import { assert } from 'chai';
|
||||
|
||||
import * as Attachment from '../../types/Attachment';
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import 'mocha';
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { getName } from '../../types/Contact';
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import 'mocha';
|
||||
import { assert } from 'chai';
|
||||
|
||||
import * as Conversation from '../../types/Conversation';
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import os from 'os';
|
||||
import sinon from 'sinon';
|
||||
import Sinon from 'sinon';
|
||||
import { assert } from 'chai';
|
||||
|
||||
import * as Settings from '../../../ts/types/Settings';
|
||||
|
||||
describe('Settings', () => {
|
||||
const sandbox = sinon.createSandbox();
|
||||
const sandbox = Sinon.createSandbox();
|
||||
|
||||
describe('isAudioNotificationSupported', () => {
|
||||
context('on macOS', () => {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import 'mocha';
|
||||
import { assert } from 'chai';
|
||||
|
||||
import * as Message from '../../../../ts/types/message/initializeAttachmentMetadata';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue