Skip to content

Commit

Permalink
Merge branch 'main' into renovate/org.owasp.encoder-encoder-1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Aug 25, 2024
2 parents 2536ec2 + 0f2a4b6 commit 6875d1f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2023 DiffPlug
* Copyright 2016-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@

import java.io.IOException;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import com.diffplug.spotless.npm.EslintFormatterStep;
Expand Down Expand Up @@ -169,6 +170,7 @@ void useEslint() throws IOException {
}

@Test
@Disabled
void useEslintXoStandardRules() throws IOException {
setFile(".eslintrc.js").toResource("npm/eslint/typescript/styleguide/xo/.eslintrc.js");
setFile("tsconfig.json").toResource("npm/eslint/typescript/styleguide/xo/tsconfig.json");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2023 DiffPlug
* Copyright 2016-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,6 +19,7 @@

import java.io.IOException;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import com.diffplug.spotless.ProcessRunner;
Expand Down Expand Up @@ -210,6 +211,7 @@ void eslintStyleguideStandardWithTypescript() throws Exception {
}

@Test
@Disabled
void eslintStyleguideXo() throws Exception {
writePomWithTypescriptSteps(
TEST_FILE_PATH,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ class EslintJavascriptFormattingStepTest extends NpmFormatterStepCommonTests {
"custom_rules", EslintFormatterStep.defaultDevDependenciesForTypescript(),
"styleguide/airbnb", EslintStyleGuide.JS_AIRBNB.mergedWith(EslintFormatterStep.defaultDevDependencies()),
"styleguide/google", EslintStyleGuide.JS_GOOGLE.mergedWith(EslintFormatterStep.defaultDevDependencies()),
"styleguide/standard", EslintStyleGuide.JS_STANDARD.mergedWith(EslintFormatterStep.defaultDevDependencies()),
"styleguide/xo", EslintStyleGuide.JS_XO.mergedWith(EslintFormatterStep.defaultDevDependencies()));
"styleguide/standard", EslintStyleGuide.JS_STANDARD.mergedWith(EslintFormatterStep.defaultDevDependencies()));

@ParameterizedTest(name = "{index}: eslint can be applied using ruleset {0}")
@ValueSource(strings = {"custom_rules", "styleguide/airbnb", "styleguide/google", "styleguide/standard", "styleguide/xo"})
@ValueSource(strings = {"custom_rules", "styleguide/airbnb", "styleguide/google", "styleguide/standard"})
void formattingUsingRulesetsFile(String ruleSetName) throws Exception {
String filedir = "npm/eslint/javascript/" + ruleSetName + "/";

Expand Down Expand Up @@ -79,11 +78,10 @@ class EslintTypescriptFormattingStepTest extends NpmFormatterStepCommonTests {

private final Map<String, Map<String, String>> devDependenciesForRuleset = ImmutableMap.of(
"custom_rules", EslintFormatterStep.defaultDevDependenciesForTypescript(),
"styleguide/standard_with_typescript", EslintStyleGuide.TS_STANDARD_WITH_TYPESCRIPT.mergedWith(EslintFormatterStep.defaultDevDependenciesForTypescript()),
"styleguide/xo", EslintStyleGuide.TS_XO_TYPESCRIPT.mergedWith(EslintFormatterStep.defaultDevDependenciesForTypescript()));
"styleguide/standard_with_typescript", EslintStyleGuide.TS_STANDARD_WITH_TYPESCRIPT.mergedWith(EslintFormatterStep.defaultDevDependenciesForTypescript()));

@ParameterizedTest(name = "{index}: eslint can be applied using ruleset {0}")
@ValueSource(strings = {"custom_rules", "styleguide/standard_with_typescript", "styleguide/xo"})
@ValueSource(strings = {"custom_rules", "styleguide/standard_with_typescript"})
void formattingUsingRulesetsFile(String ruleSetName) throws Exception {
String filedir = "npm/eslint/typescript/" + ruleSetName + "/";

Expand Down

0 comments on commit 6875d1f

Please sign in to comment.