Skip to content

Commit 8d42b14

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

File tree

5 files changed

+342
-318
lines changed

5 files changed

+342
-318
lines changed

client/.eslintrc

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

9+
globals:
10+
__DEBUG_SERVER_ERRORS__: true
11+
__SERVER_ERRORS__: true
12+
google: true
13+
amenitiesList: true
14+
File: true
15+
916
env:
1017
browser: true
1118
node: true
1219
mocha: true
1320

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