question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`newline-per-chained-call` and PropTypes

See original GitHub issue

Hi everyone,

I’m facing a some trouble with one rule: how do you define PropTypes with the newline-per-chained-call rule activated?

/* @flow */

import React from 'react';

class Baz extends React.Component {
    static propTypes = {
        foo: React.PropTypes.oneOf(['nice', 'bad']),  // This trigger an error
        bar: React.PropTypes.instanceOf(Date).isRequired, // Here too
    };

    // ...
}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
taioncommented, May 3, 2016

This got fixed in 2.3.0, BTW.

Read more comments on GitHub >

github_iconTop Results From Across the Web

newline-per-chained-call - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
https://raw.githubusercontent.com/signavio/eslint-...
... of warning - [`react/prop-types`](https://github.com/yannickcr/eslint-plugin- ... `new-parens` - `newline-per-chained-call` - `no-mixed-spaces-and-tabs` ...
Read more >
node_modules/eslint-config-airbnb/CHANGELOG.md ... - EECS Gitlab
... #1751); [patch] set forbid-foreign-prop-types to "warn"; [patch] Add new methods ... [fix] disable newline-per-chained-call due to an eslint bug (#748) ...
Read more >
linting error in imports - javascript - Stack Overflow
I am getting various error regarding linting. All the errors are shown in first line of code. The importing way is not incorrect...
Read more >
eslint-config-imweb - npm
Start using eslint-config-imweb in your project by running `npm i ... Rule Name:newline-per-chained-call ... Rule Name:react/forbid-prop-types
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found