Skip to content

Conversation

@vbravest
Copy link

No description provided.

###############################################################################################

"no-param-reassign": [2, {"props": true}], # Disallow reassignment of parameters
"no-param-reassign": [2, { # Disallow reassignment of parameters
Copy link

Choose a reason for hiding this comment

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

I think this line (and a few others in this document) is mixing tabs and spaces for indenting the comments.

# CLASSES <http://github.com/thenerdery/javascript-standards#classes>
###############################################################################################

"no-dupe-class-members": 2, # Disallow duplicate class member names
Copy link

Choose a reason for hiding this comment

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

Propose that we remove all inline and section comments . You can easily read about the rules from the eslint site itself. In some editors when there's an eslint warning it will even provide a direct link to the rule.

These comments can also be tricky to maintain when lines are changed.


"no-dupe-class-members": 2, # Disallow duplicate class member names
"no-class-assign": 2, # Disallow reassigning classes
"no-useless-constructor": 2, # Disallow unnecessary constructor
Copy link

Choose a reason for hiding this comment

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

I liked this rule. If my constructor isn't doing anything why keep it around?

ES2015 provides a default class constructor if one is not specified. As such, it is unnecessary to provide an empty constructor or one that simply delegates into its parent class

@ccheney
Copy link

ccheney commented May 8, 2017

Consider turning this into a sharable config http://eslint.org/docs/developer-guide/shareable-configs.html

@vbravest vbravest merged commit 8449a33 into master May 11, 2017
@ccheney
Copy link

ccheney commented May 12, 2017

Just adding some notes here. A sharable config would allow us to maintain inheritance of airbnb's linting rules but still allowing us to override them with our own rules.

Assuming our sharable config is published in the npm ecosystem we could do something like:

.eslintrc

{
  "extends": [
    "airbnb",
    "./node_modules/@nerdery/linters/eslint.js"
  ]
}

Perhaps something a bit fancier:

.eslintrc

{
  "plugins": [
    "jsx-a11y",
    "react"
  ],
  "extends": [
    "airbnb",
    "plugin:react/recommended",
    "plugin:jsx-a11y/recommended",
    "./node_modules/@nerdery/linters/eslint.js"
  ]
}

@ccheney ccheney mentioned this pull request Sep 13, 2018
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.

4 participants