The Wayback Machine - https://web.archive.org/web/20201203064817/https://github.com/topics/lint
Skip to content
#

lint

Here are 815 public repositories matching this topic...

stylelint
onrige
onrige commented Nov 21, 2019

Hey. Just a question. Can we add possibility to extend from single string not just from array? So it will work like other linting libraries (eslint, stylelint, etc.).

package.json

"babel":  {
  "extends": "shared-tools"
},
"commitlint": {
  "extends": [
    "shared-tools"
  ]
},
"eslintConfig": {
  "extends": "shared-tools"
}
NoraCodes
NoraCodes commented Dec 1, 2020

What it does

Suggest option.and_then(|value| value.inner_option) instead of option.and_then(|value| Some(value.inner_option?))

Categories (optional)

  • Kind: style or complexity

What is the advantage of the recommended code over the original code

There's no reason to take an option, wrap it in another option, and use ? to short-circuit. and_then will work fine without

azu
azu commented Nov 1, 2019

Current

export declare type TextlintRuleReportHandler = {
    [P in ASTNodeTypes]?: (node: TypeofTxtNode<P>) => void | Promise<any>;
} & {
    [index: string]: (node: any) => void | Promise<any>;
};
/**
 * Textlint rule reporter function
 */
export declare type TextlintRuleReporter<T extends object = {}> = (context: Readonly<TextlintRuleContext>, options?: TextlintRuleOptions<T>) 
lsimoneau
lsimoneau commented Mar 22, 2017

I really like enforcing one expectation per example. But with RSpec's exception matching, you need two expect calls if you want to assert something about an exception:

expect { my_code }.to raise_error(MyErrorType) do |error|
  expect(error.message).to match /something went wrong/
end

There's no way to match against the error message without first wrapping the call, and RSpec o

Improve this page

Add a description, image, and links to the lint topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the lint topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.