Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions client/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,43 @@ extends: eslint-config-airbnb
plugins:
- react

globals:
__DEBUG_SERVER_ERRORS__: true
__SERVER_ERRORS__: true

env:
browser: true
node: true
mocha: true

rules:
### Variables
no-undef: 2
no-unused-vars: [2, { vars: all, args: none }]

### Stylistic issues
indent: [1, 2, { SwitchCase: 1, VariableDeclarator: 2 }]
react/sort-comp: 0
react/jsx-quotes: 1
id-length: [2, {"exceptions": ["e", "i", "_"]}]
id-length: [1, { min: 2, exceptions: [_, e, i, k, v] }]

### React
jsx-quotes: [1, prefer-double]
react/display-name: 0
react/jsx-boolean-value: [1, always]
react/jsx-curly-spacing: [1, never]
react/jsx-no-duplicate-props: [2, { ignoreCase: true }]
react/jsx-no-undef: 2
react/jsx-sort-prop-types: 0
react/jsx-sort-props: 0
react/jsx-uses-react: 2
react/jsx-uses-vars: 2
react/no-danger: 0
react/no-did-mount-set-state: 1
react/no-did-update-set-state: 0
react/no-multi-comp: 2
react/no-unknown-property: 2
react/prop-types: 1
react/react-in-jsx-scope: 2
react/require-extension: [1, { extensions: [.js, .jsx] }]
react/self-closing-comp: 2
react/sort-comp: 0 # Should be 1. `statics` should be on top.
react/wrap-multilines: 2
19 changes: 15 additions & 4 deletions client/.jscsrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{
"preset": "airbnb",
"fileExtensions": [".js", ".jsx"],
"excludeFiles": ["build/**", "node_modules/**"],

"validateQuoteMarks": null // Issue with JSX quotemarks: https://github.com/jscs-dev/babel-jscs/issues/12
"fileExtensions": [
".js",
".jsx"
],
"excludeFiles": [
"assets/**",
"build/**",
"node_modules/**"
],
"esprima": "babel-jscs",
"validateQuoteMarks": {
"mark": "'",
"escape": true,
"ignoreJSX": true
}
}
2 changes: 1 addition & 1 deletion client/app/components/CommentBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CommentBox extends React.Component {
return (
<div className="commentBox container">
<h2>
Comments { this._isSendingAjax() && `SENDING AJAX REQUEST! Ajax Counter is ${this._ajaxCounter()}` }
Comments {this._isSendingAjax() && `SENDING AJAX REQUEST! Ajax Counter is ${this._ajaxCounter()}`}
</h2>
<p>
Text take Github Flavored Markdown. Comments older than 24 hours are deleted.
Expand Down
Loading