Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded eslint & eslint-config-airbnb #2058

Merged
merged 14 commits into from
Dec 12, 2016
Merged

Upgraded eslint & eslint-config-airbnb #2058

merged 14 commits into from
Dec 12, 2016

Conversation

fbarl
Copy link
Contributor

@fbarl fbarl commented Dec 5, 2016

There is a bunch of new lint rules that I temporarily switched off, because they either require changes across multiple files or I wasn't sure whether we wanted to override them in some way.

@davkal, @foot: I will be working on resolving some of the items from the list on my own now, but I'm sure there will be at least a couple of them which we'll need to discuss. As I expect we'll soon be upgrading eslint on service-ui as well, maybe @jpellizzari & @bowenli would also like to contribute if they feel we should disable/override some of these rules:

Note: I will be removing the items from this list as I resolve them

@fbarl fbarl self-assigned this Dec 5, 2016
@jpellizzari
Copy link
Contributor

Here is the .eslintrc file I have been using with version 13.0.0 of eslint-config-airbnb.

{
  "extends": "airbnb",
  "parser": "babel-eslint",
  "env": {
    "browser": true,
    "jest": true,
    "node": true
  },
  "rules": {
    "one-var" : 0,
    "one-var-declaration-per-line": 0,
    "func-names": 0,
    "class-methods-use-this": 0,
    "import/prefer-default-export": 0,
    "import/no-named-as-default" : 0,
    "import/no-webpack-loader-syntax": 0,
    "import/no-extraneous-dependencies": [
      "error",
      {
        "devDependencies": true,
        "optionalDependencies": true,
        "peerDependencies": true
      }
    ],
    "react/jsx-filename-extension": [
      2,
      {
        "extensions": [
          ".js",
          ".jsx"
        ]
      }
    ],
    "comma-dangle": 0,
    "no-param-reassign": 0,
    "object-curly-spacing": 0,
    "react/jsx-closing-bracket-location": 0,
    "react/prefer-stateless-function": 0,
    "react/sort-comp": 0,
    "react/prop-types": 0,
    "jsx-a11y/no-static-element-interactions" : 0
  }
}

@fbarl fbarl changed the title [WIP] Upgraded eslint, airbnb linting rules, and made trivial fixes [WIP] Upgraded eslint & eslint-config-airbnb Dec 5, 2016
@fbarl fbarl changed the title [WIP] Upgraded eslint & eslint-config-airbnb [WIP] Upgraded eslint & eslint-config-airbnb Dec 5, 2016
@fbarl fbarl requested review from foot and davkal December 8, 2016 12:48
@fbarl fbarl changed the title [WIP] Upgraded eslint & eslint-config-airbnb Upgraded eslint & eslint-config-airbnb Dec 8, 2016
@fbarl fbarl requested a review from jpellizzari December 8, 2016 17:16
DETAILS_PANEL_WIDTH as WIDTH,
DETAILS_PANEL_OFFSET as OFFSET,
DETAILS_PANEL_MARGINS as MARGINS
} from '../constants/styles';

This comment was marked as abuse.

Copy link
Contributor

@jpellizzari jpellizzari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly just questions for you @fbarl . Nice work!

@@ -13,6 +13,22 @@ const navbarHeight = 194;
const marginTop = 0;


function renderEmptyTopologyError(show) {

This comment was marked as abuse.

This comment was marked as abuse.

value={value} onChange={this.handleChange}
onFocus={this.handleFocus} onBlur={this.handleBlur}
disabled={disabled} ref="queryInput" />
disabled={disabled} ref={this.saveQueryInputRef} />

This comment was marked as abuse.

This comment was marked as abuse.


require('font-awesome-webpack');
require('../styles/main.less');
require('../images/favicon.ico');

This comment was marked as abuse.

This comment was marked as abuse.

"eslint-config-airbnb": "13.0.0",
"eslint-loader": "1.6.1",
"eslint-plugin-import": "2.2.0",
"eslint-plugin-jasmine": "2.2.0",

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@@ -4,6 +4,21 @@ import classNames from 'classnames';

import { toggleGridMode } from '../actions/app-actions';


function renderItem(icons, label, isSelected, onClick) {

This comment was marked as abuse.

This comment was marked as abuse.

Copy link
Contributor

@davkal davkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Massive changeset, and a good step forward. A quick functional test of the UI did not reveal any errors.

I think renaming those JSX functions would add additional clarity.

Otherwise LGTM

@jpellizzari
Copy link
Contributor

LGTM

@fbarl fbarl force-pushed the update-eslint branch 2 times, most recently from eba7013 to 27ace10 Compare December 12, 2016 10:14
@fbarl fbarl removed the request for review from foot December 12, 2016 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants