Giter VIP home page Giter VIP logo

eslint-config-netflix's Issues

Audit 2.0 rules for deprecation or inclusion in 3.0

2.0 formatting rules removed in 3.0 (deprecated by ESLint)

  • array-bracket-spacing
  • comma-style
  • eol-last
  • generator-star-spacing
  • indent
  • jsx-quotes
  • key-spacing
  • no-extra-parens
  • no-multi-spaces
  • no-multiple-empty-lines
  • object-curly-spacing
  • quote-props
  • semi-spacing
  • space-before-blocks
  • space-before-function-paren
  • template-curly-spacing
  • yield-star-spacing

2.0 rules now covered by eslint:recommended in 3.0

  • no-const-assign
  • no-debugger
  • no-empty-pattern
  • no-fallthrough (removed warning override, now error per eslint:recommended)
  • no-func-assign
  • no-irregular-whitespace
  • no-prototype-builtins (removed warning override, now error per eslint:recommended)
  • no-redeclare
  • no-self-assign
  • no-with
  • valid-typeof

2.0 rules carried forward to 3.0

  • array-callback-return
  • comma-dangle (deprecated, will remove in 4.0)
  • curly (deprecated, will remove in 4.0)
  • dot-notation
  • eqeqeq
  • guard-for-in
  • no-bitwise
  • no-caller
  • no-eval
  • no-extend-native
  • no-loop-func
  • no-proto
  • no-script-url
  • no-sequences
  • no-shadow
  • no-undef
  • no-unused-expressions
  • no-unused-vars
  • no-var
  • prefer-arrow-callback
  • prefer-const
  • quotes (deprecated, will remove in 4.0)
  • semi (deprecated, will remove in 4.0)

2.0 rules removed in 3.0 (rationale below)

  • camelcase
  • class-methods-use-this
  • new-cap
  • no-empty
  • no-empty-function
  • no-iterator
  • no-lone-blocks
  • no-multi-str
  • no-new
  • no-plusplus
  • no-template-curly-in-string
  • no-underscore-dangle
  • no-useless-constructor
  • no-useless-rename
  • prefer-rest-params
  • prefer-spread
  • prefer-template
  • strict

3.0 rules added

Publish latest to @Netflix/eslint-config-netflix

Title says it all — #11 describes install steps that currently do not work:

npm install --save-dev @Netflix/eslint-config-netflix

Older versions can still be installed via:

npm install --save-dev eslint-config-netflix

array-callback-return warnings

See: https://eslint.org/docs/latest/rules/array-callback-return

With the rule enabled, this causes a warning:

const index = list.findLastIndex(candidateId => {
  const candidate = input[candidateId];
  if (candidate.ok === true) {
    return true;
  }
});

Developers must instead rewrite like this:

const index = list.findLastIndex(candidateId => {
  const candidate = input[candidateId];
  if (candidate.ok === true) {
    return true;
  }
  return undefined;
});

Musings: Warning developers to add return undefined; to conclude some function calls and not others is inconsistent. Requiring developers to add return undefined; at all seems superfluous.

In #19 we said:

using these methods carry certain semantics. If you don’t want to actually create an object, different methods exist with the appropriate semantics.

Is the rule doing what we expect?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.