Browse Source

Enforce no spacing between brackets

David Cramer 9 years ago
parent
commit
da7cc9f1bf

+ 3 - 0
.eslintrc

@@ -110,6 +110,9 @@
     "no-with": 2,                    // http://eslint.org/docs/rules/no-with
     "no-with": 2,                    // http://eslint.org/docs/rules/no-with
     "quotes": [2, "single"],         // http://eslint.org/docs/rules/quotes.html
     "quotes": [2, "single"],         // http://eslint.org/docs/rules/quotes.html
     "radix": 2,                      // http://eslint.org/docs/rules/radix
     "radix": 2,                      // http://eslint.org/docs/rules/radix
+    "computed-property-spacing": [2, "never"], // http://eslint.org/docs/rules/space-in-brackets.html
+    "array-bracket-spacing": [2, "never"], // http://eslint.org/docs/rules/space-in-brackets.html
+    "object-curly-spacing": [2, "never"], // http://eslint.org/docs/rules/space-in-brackets.html
     "space-infix-ops": 2,            // http://eslint.org/docs/rules/space-infix-ops.html
     "space-infix-ops": 2,            // http://eslint.org/docs/rules/space-infix-ops.html
     "vars-on-top": 0,                // http://eslint.org/docs/rules/vars-on-top
     "vars-on-top": 0,                // http://eslint.org/docs/rules/vars-on-top
     "wrap-iife": [2, "any"],         // http://eslint.org/docs/rules/wrap-iife
     "wrap-iife": [2, "any"],         // http://eslint.org/docs/rules/wrap-iife

+ 3 - 3
src/sentry/static/sentry/app/components/barChart.jsx

@@ -1,6 +1,6 @@
 import moment from 'moment';
 import moment from 'moment';
 import React from 'react';
 import React from 'react';
-import { valueIsEqual } from '../utils';
+import {valueIsEqual} from '../utils';
 import TooltipMixin from '../mixins/tooltip';
 import TooltipMixin from '../mixins/tooltip';
 
 
 const BarChart = React.createClass({
 const BarChart = React.createClass({
@@ -192,9 +192,9 @@ const BarChart = React.createClass({
       <a key={point.x}
       <a key={point.x}
          className="chart-column tip"
          className="chart-column tip"
          data-point-index={pointIdx}
          data-point-index={pointIdx}
-         style={{ width: pointWidth }}
+         style={{width: pointWidth}}
        >
        >
-        <span style={{ height: pct }}>{point.y}</span>
+        <span style={{height: pct}}>{point.y}</span>
       </a>
       </a>
     );
     );
   },
   },

+ 1 - 1
src/sentry/static/sentry/app/components/flotChart.jsx

@@ -129,7 +129,7 @@ const FlotChart = React.createClass({
         noColumns: series.length,
         noColumns: series.length,
         position: 'nw'
         position: 'nw'
       },
       },
-      lines: { show: false }
+      lines: {show: false},
     };
     };
 
 
     let chart = ReactDOM.findDOMNode(this.refs.chartNode);
     let chart = ReactDOM.findDOMNode(this.refs.chartNode);

+ 1 - 1
src/sentry/static/sentry/app/components/projectHeader/projectSelector.jsx

@@ -45,7 +45,7 @@ const ProjectSelector = React.createClass({
   },
   },
 
 
   close() {
   close() {
-    this.setState({ filter: '' });
+    this.setState({filter: ''});
     // dropdownLink might not exist because we try to close within
     // dropdownLink might not exist because we try to close within
     // onFilterBlur above after a timeout. My hunch is that sometimes
     // onFilterBlur above after a timeout. My hunch is that sometimes
     // this DOM element is removed within the 200ms, so we error out.
     // this DOM element is removed within the 200ms, so we error out.

+ 3 - 3
src/sentry/static/sentry/app/components/searchBar.jsx

@@ -33,7 +33,7 @@ const SearchBar = React.createClass({
 
 
   clearSearch() {
   clearSearch() {
     this.setState(
     this.setState(
-      { query: this.props.defaultQuery },
+      {query: this.props.defaultQuery},
       () => this.props.onSearch(this.state.query)
       () => this.props.onSearch(this.state.query)
     );
     );
   },
   },
@@ -45,11 +45,11 @@ const SearchBar = React.createClass({
   },
   },
 
 
   onQueryBlur() {
   onQueryBlur() {
-    this.setState({ dropdownVisible: false });
+    this.setState({dropdownVisible: false});
   },
   },
 
 
   onQueryChange(evt) {
   onQueryChange(evt) {
-    this.setState({ query: evt.target.value });
+    this.setState({query: evt.target.value});
   },
   },
 
 
   render() {
   render() {

+ 1 - 1
src/sentry/static/sentry/app/locale.jsx

@@ -1,6 +1,6 @@
 import Jed from 'jed';
 import Jed from 'jed';
 import ConfigStore from './stores/configStore';
 import ConfigStore from './stores/configStore';
-import { getTranslations } from './translations';
+import {getTranslations} from './translations';
 
 
 export function getCurrentTranslations() {
 export function getCurrentTranslations() {
   let user = ConfigStore.get('user');
   let user = ConfigStore.get('user');

+ 1 - 1
src/sentry/static/sentry/app/views/projectReleases/index.jsx

@@ -14,7 +14,7 @@ const ProjectReleases = React.createClass({
     setProjectNavSection: React.PropTypes.func
     setProjectNavSection: React.PropTypes.func
   },
   },
 
 
-  mixins: [ History ],
+  mixins: [History],
 
 
   getDefaultProps() {
   getDefaultProps() {
     return {
     return {

+ 1 - 1
src/sentry/static/sentry/app/views/releaseArtifacts.jsx

@@ -12,7 +12,7 @@ const ReleaseArtifacts = React.createClass({
     release: React.PropTypes.object
     release: React.PropTypes.object
   },
   },
 
 
-  mixins: [ History ],
+  mixins: [History],
 
 
   getInitialState() {
   getInitialState() {
     return {
     return {

+ 1 - 1
src/sentry/static/sentry/app/views/ruleEditor/ruleNodeList.jsx

@@ -47,7 +47,7 @@ const RuleNodeList = React.createClass({
       <div className={this.props.className}>
       <div className={this.props.className}>
         <table className="node-list table" style={{marginBottom: '10px'}}>
         <table className="node-list table" style={{marginBottom: '10px'}}>
           <col />
           <col />
-          <col style={{ textAlign: 'right'}} />
+          <col style={{textAlign: 'right'}} />
           <tbody>
           <tbody>
             {this.state.items.map((item, idx) => {
             {this.state.items.map((item, idx) => {
               return (
               return (

+ 2 - 2
src/sentry/static/sentry/app/views/stream.jsx

@@ -138,9 +138,9 @@ const Stream = React.createClass({
 
 
     let filter = {};
     let filter = {};
     if (currentQuery.bookmarks) {
     if (currentQuery.bookmarks) {
-      filter = { bookmarks: '1' };
+      filter = {bookmarks: '1'};
     } else if (currentQuery.assigned) {
     } else if (currentQuery.assigned) {
-      filter = { assigned: '1' };
+      filter = {assigned: '1'};
     }
     }
 
 
     let query =
     let query =

Some files were not shown because too many files changed in this diff