-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
63 lines (59 loc) · 1.43 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const fs = require('fs');
const path = require('path');
module.exports = {
"extends": [
"eslint-config-synacor",
"plugin:prettier/recommended"
],
"plugins": [
"prettier",
"preact-i18n"
],
"rules": {
"brace-style": ["error", "1tbs"],
"eqeqeq": ["error", "smart"],
"react/jsx-wrap-multilines": "warn",
"no-shadow": "error",
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true
}
],
"prefer-const": ["error", {
"destructuring": "all"
}],
"preact-i18n/no-missing-template-field": "error",
"preact-i18n/no-text-as-attribute": "error",
// Ignore some characters, possibly surrounded by whitespace
"preact-i18n/no-text-as-children": ["error", { "ignoreTextRegex": "^(?:\\s*[()🚩.\":<>\\-/]\\s*)*$" }],
"preact-i18n/no-unknown-key": "error",
"prettier/prettier": ["error", {
"singleQuote": true,
"printWidth": 100
}]
},
"settings": {
"react": {
"pragma": "createElement",
"version": "15.0"
},
"preact-i18n": {
"languageFiles": [
{
"name": "en_US",
"path": "src/intl/en_US.json"
}
],
"textComponents": [
{ "nameRegex": "^Text$" },
{ "nameRegex": "^TextInput$", "id": "placeholderId" },
{ "nameRegex": "^AlignedLabel$", "id": "textId" },
{ "nameRegex": "^(?:Inline)?Modal(?:Dialog|Drawer)", "id": "title" },
{ "nameRegex": "^ContactSuggestion$", "id": "previouslySelectedLabel"}
],
}
}
}