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 subdirectoriespull/1/head
parent
23586be6b0
commit
2988da0981
@ -1,43 +1,46 @@
|
||||
### All components: emoji, links, newline
|
||||
|
||||
```jsx
|
||||
<MessageBody text="Fire 🔥 http://somewhere.com\nSecond Line" />
|
||||
<MessageBody
|
||||
text="Fire 🔥 http://somewhere.com\nSecond Line"
|
||||
i18n={util.i18n}
|
||||
/>
|
||||
```
|
||||
|
||||
### Jumbo emoji
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥" />
|
||||
<MessageBody text="🔥" i18n={util.i18n} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥🔥" />
|
||||
<MessageBody text="🔥🔥" i18n={util.i18n} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥🔥🔥🔥" />
|
||||
<MessageBody text="🔥🔥🔥🔥" i18n={util.i18n} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥🔥🔥🔥🔥🔥🔥🔥" />
|
||||
<MessageBody text="🔥🔥🔥🔥🔥🔥🔥🔥" i18n={util.i18n} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥" />
|
||||
<MessageBody text="🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥" i18n={util.i18n} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥 text disables jumbomoji" />
|
||||
<MessageBody text="🔥 text disables jumbomoji" i18n={util.i18n} />
|
||||
```
|
||||
|
||||
### Jumbomoji disabled
|
||||
|
||||
```jsx
|
||||
<MessageBody text="🔥" disableJumbomoji />
|
||||
<MessageBody text="🔥" disableJumbomoji i18n={util.i18n} />
|
||||
```
|
||||
|
||||
### Links disabled
|
||||
|
||||
```jsx
|
||||
<MessageBody text="http://somewhere.com" disableLinks />
|
||||
<MessageBody text="http://somewhere.com" disableLinks i18n={util.i18n} />
|
||||
```
|
||||
|
@ -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,5 +1,3 @@
|
||||
import 'mocha';
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { shuffle } from 'lodash';
|
||||
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue