We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, this passes linting:
// passes new Class({ prop: true, }) .run();
However, the use of a builder function does not pass linting:
// fails with "Call expression should be on a new line and indented eslint(@silvermine/silvermine/fluent-chaining)" makeInstance({ prop: true, }) .run();
The case with new Class should also likely fail.
new Class
Failing test case:
diff --git a/tests/lib/rules/fluent-chaining.test.js b/tests/lib/rules/fluent-chaining.test.js index 7639a0b..5900a29 100644 --- a/tests/lib/rules/fluent-chaining.test.js +++ b/tests/lib/rules/fluent-chaining.test.js @@ -221,6 +221,20 @@ function checkChainingIndentationError1() { }; } +function checkChainingIndentationWithConstructorError() { + return { + code: formatCode( + 'new Class({', + ' prop: true', + '})', + ' .run();' + ), + errors: [ + chainingIndentationMatchErrorMessage(), + ], + }; +} + // wrong indentation function checkChainingIndentationError2() { return { @@ -299,6 +313,11 @@ ruleTester.run('fluent-chaining - checkChainingIndentationError1', fluentChainin invalid: [ checkChainingIndentationError1() ], }); +ruleTester.run('fluent-chaining - checkChainingIndentationWithConstructorError', fluentChaining, { + valid: [], + invalid: [ checkChainingIndentationWithConstructorError() ], +}); + ruleTester.run('fluent-chaining - checkChainingIndentationError2', fluentChaining, { valid: [], invalid: [ checkChainingIndentationError2() ],
The text was updated successfully, but these errors were encountered:
fix: lint chained expressions after class or awaited expression (#62)
772c690
7f69d18
Merge pull request #66 from silvermine/esmith/fluent-chaining-tail
7eef6b7
MrMarCode
No branches or pull requests
Currently, this passes linting:
However, the use of a builder function does not pass linting:
The case with
new Class
should also likely fail.Failing test case:
The text was updated successfully, but these errors were encountered: