Skip to content

Commit

Permalink
Updated libraries and linters
Browse files Browse the repository at this point in the history
Linters conform to ShakaCode internal project standards.
  • Loading branch information
justin808 committed Nov 21, 2015
1 parent 7d40122 commit 8d42b14
Show file tree
Hide file tree
Showing 5 changed files with 342 additions and 318 deletions.
39 changes: 36 additions & 3 deletions client/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,46 @@ extends: eslint-config-airbnb
plugins:
- react

globals:
__DEBUG_SERVER_ERRORS__: true
__SERVER_ERRORS__: true
google: true
amenitiesList: true
File: 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

0 comments on commit 8d42b14

Please sign in to comment.