`newline-per-chained-call` and PropTypes
See original GitHub issueHi 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:
- Created 8 years ago
- Comments:11 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This got fixed in 2.3.0, BTW.
https://github.com/eslint/eslint/commit/9b54ed3e767b9f718703ca030f02d6f96c1a4c84