Skip to content

Commit 254aa8f

Browse files
fixed tests
1 parent c970c13 commit 254aa8f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

cmd/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func createToolFileConfigurations(tool tools.Tool, patternConfiguration []domain
342342
if err != nil {
343343
return fmt.Errorf("failed to write eslint config: %v", err)
344344
}
345-
fmt.Println("ESLint configuration created based on Codacy settings. Ignoring plugin rules.")
345+
fmt.Println("ESLint configuration created based on Codacy settings. Ignoring plugin rules. ESLint plugins are not supported yet.")
346346
} else {
347347
err := createDefaultEslintConfigFile(toolsConfigDir)
348348
if err != nil {

tools/eslintConfigCreator_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func TestCreateEslintConfigNamedParam(t *testing.T) {
7070
[]domain.PatternConfiguration{
7171
{
7272
PatternDefinition: domain.PatternDefinition{
73-
Id: "consistent-return",
73+
Id: "ESLint8_consistent-return",
7474
},
7575
Parameters: []domain.ParameterConfiguration{
7676
{
@@ -94,7 +94,7 @@ func TestCreateEslintConfigUnnamedAndNamedParam(t *testing.T) {
9494
[]domain.PatternConfiguration{
9595
{
9696
PatternDefinition: domain.PatternDefinition{
97-
Id: "consistent-return",
97+
Id: "ESLint8_consistent-return",
9898
},
9999
Parameters: []domain.ParameterConfiguration{
100100
{
@@ -117,19 +117,18 @@ func TestCreateEslintConfigUnnamedAndNamedParam(t *testing.T) {
117117
];`)
118118
}
119119

120-
func TestCreateEslintConfigSupportPlugins(t *testing.T) {
120+
func TestCreateEslintConfigDoNotSupportPlugins(t *testing.T) {
121121
testConfig(t,
122122
[]domain.PatternConfiguration{
123123
{
124124
PatternDefinition: domain.PatternDefinition{
125-
Id: "plugin/consistent-return",
125+
Id: "ESLint8_plugin_consistent-return",
126126
},
127127
},
128128
},
129129
`export default [
130130
{
131131
rules: {
132-
"plugin/consistent-return": "error",
133132
}
134133
}
135134
];`)

0 commit comments

Comments
 (0)