简体   繁体   中英

Rails configure rubocop

I am using pre-commit and rubocop gem in a rails 4 application. I would like to escape quote checks which result in errors like Prefer single-quoted strings when you don't need string interpolation or special symbols.

This is what i have already tried in .rubocop.yml but it doesn't have the effect that I want.

Style/StringLiterals:
 Enabled: false
Style/UnneededPercentQ:
 Enabled: false

you could try:

Style/StringLiterals:
  EnforcedStyle: double_quotes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM