Skip to content

Commit ec32459

Browse files
committed
Updated libraries and linters
Linters conform to ShakaCode internal project standards.
1 parent 7d40122 commit ec32459

File tree

5 files changed

+339
-318
lines changed

5 files changed

+339
-318
lines changed

client/.eslintrc

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,43 @@ extends: eslint-config-airbnb
66
plugins:
77
- react
88

9+
globals:
10+
__DEBUG_SERVER_ERRORS__: true
11+
__SERVER_ERRORS__: true
12+
913
env:
1014
browser: true
1115
node: true
1216
mocha: true
1317

1418
rules:
19+
### Variables
20+
no-undef: 2
21+
no-unused-vars: [2, { vars: all, args: none }]
22+
23+
### Stylistic issues
1524
indent: [1, 2, { SwitchCase: 1, VariableDeclarator: 2 }]
16-
react/sort-comp: 0
17-
react/jsx-quotes: 1
18-
id-length: [2, {"exceptions": ["e", "i", "_"]}]
25+
id-length: [1, { min: 2, exceptions: [_, e, i, k, v] }]
26+
27+
### React
28+
jsx-quotes: [1, prefer-double]
29+
react/display-name: 0
30+
react/jsx-boolean-value: [1, always]
31+
react/jsx-curly-spacing: [1, never]
32+
react/jsx-no-duplicate-props: [2, { ignoreCase: true }]
33+
react/jsx-no-undef: 2
34+
react/jsx-sort-prop-types: 0
35+
react/jsx-sort-props: 0
36+
react/jsx-uses-react: 2
37+
react/jsx-uses-vars: 2
38+
react/no-danger: 0
39+
react/no-did-mount-set-state: 1
40+
react/no-did-update-set-state: 0
41+
react/no-multi-comp: 2
42+
react/no-unknown-property: 2
43+
react/prop-types: 1
44+
react/react-in-jsx-scope: 2
45+
react/require-extension: [1, { extensions: [.js, .jsx] }]
46+
react/self-closing-comp: 2
47+
react/sort-comp: 0 # Should be 1. `statics` should be on top.
48+
react/wrap-multilines: 2

client/.jscsrc

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
{
22
"preset": "airbnb",
3-
"fileExtensions": [".js", ".jsx"],
4-
"excludeFiles": ["build/**", "node_modules/**"],
5-
6-
"validateQuoteMarks": null // Issue with JSX quotemarks: https://github.com/jscs-dev/babel-jscs/issues/12
3+
"fileExtensions": [
4+
".js",
5+
".jsx"
6+
],
7+
"excludeFiles": [
8+
"assets/**",
9+
"build/**",
10+
"node_modules/**"
11+
],
12+
"esprima": "babel-jscs",
13+
"validateQuoteMarks": {
14+
"mark": "'",
15+
"escape": true,
16+
"ignoreJSX": true
17+
}
718
}

client/app/components/CommentBox.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CommentBox extends React.Component {
3939
return (
4040
<div className="commentBox container">
4141
<h2>
42-
Comments { this._isSendingAjax() && `SENDING AJAX REQUEST! Ajax Counter is ${this._ajaxCounter()}` }
42+
Comments {this._isSendingAjax() && `SENDING AJAX REQUEST! Ajax Counter is ${this._ajaxCounter()}`}
4343
</h2>
4444
<p>
4545
Text take Github Flavored Markdown. Comments older than 24 hours are deleted.

0 commit comments

Comments
 (0)