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
Excerpt of an erb-lint yml file:
glob: "**/*{.html,*}[!.atom,!.text,!.js,!.svg].erb" linters: FinalNewline: enabled: false SpaceAroundErbTag: enabled: false RightTrim: enabled: false AllowedScriptType: enabled: true allowed_types: - 'application/ld+json' - 'application/json' - 'text/javascript' - 'text/html'....
Now if I remove one of the hyphens in allowed_types:
allowed_types
glob: "**/*{.html,*}[!.atom,!.text,!.js,!.svg].erb" linters: FinalNewline: enabled: false SpaceAroundErbTag: enabled: false RightTrim: enabled: false AllowedScriptType: enabled: true allowed_types: 'application/ld+json' - 'application/json' - 'text/javascript' - 'text/html'....
And then run autocorrect on a file, it raises a NoMethodError:
NoMethodError
@dmabuada ➜ /workspaces/github $ bin/erblint --enable-linters rubocop --autocorrect app/views/index.erb NoMethodError: undefined method `merge!' for nil:NilClass /workspaces/github/vendor/gems/3.2.0/ruby/3.2.0/gems/erb_lint-0.3.0/lib/erb_lint/cli.rb:224:in `ensure in load_config' /workspaces/github/vendor/gems/3.2.0/ruby/3.2.0/gems/erb_lint-0.3.0/lib/erb_lint/cli.rb:224:in `load_config' /workspaces/github/vendor/gems/3.2.0/ruby/3.2.0/gems/erb_lint-0.3.0/lib/erb_lint/cli.rb:40:in `run' /workspaces/github/vendor/gems/3.2.0/ruby/3.2.0/gems/erb_lint-0.3.0/exe/erblint:9:in `<main>' /workspaces/github/vendor/gems/3.2.0/ruby/3.2.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load' /workspaces/github/vendor/gems/3.2.0/ruby/3.2.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load' bin/erblint:8:in `<main>'
It should probably be raising a SyntaxError instead.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Excerpt of an erb-lint yml file:
Now if I remove one of the hyphens in
allowed_types
:And then run autocorrect on a file, it raises a
NoMethodError
:It should probably be raising a SyntaxError instead.
The text was updated successfully, but these errors were encountered: