StringLiteralsQuotesCheck implements EslintBasedCheck { @Override public List<Object> configurations() { return Arrays.asList(singleQuotes ? "single" : "double", new Config()); }  @Override List<Object> configurations(); @Override String eslintKey(); @RuleProperty(
    key = "singleQuotes",
    description = "Set to true to require single quotes, false for double quotes.",
    defaultValue = "" + DEFAULT)
  public boolean singleQuotes; }
@Test public void configurations() { StringLiteralsQuotesCheck check = new StringLiteralsQuotesCheck(); String defaultConfigAsString = new Gson().toJson(check.configurations()); assertThat(defaultConfigAsString).isEqualTo("[\"single\",{\"avoidEscape\":true,\"allowTemplateLiterals\":true}]"); check.singleQuotes = false; String customConfigAsString = new Gson().toJson(check.configurations()); assertThat(customConfigAsString).isEqualTo("[\"double\",{\"avoidEscape\":true,\"allowTemplateLiterals\":true}]"); }