Skip to content

Commit

Permalink
fix: dev lint errors due to eslint@v8 in project
Browse files Browse the repository at this point in the history
  • Loading branch information
codejedi365 committed Oct 25, 2021
1 parent 5360ab1 commit 7840c91
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 51 deletions.
29 changes: 0 additions & 29 deletions example/.eslintrc.json

This file was deleted.

45 changes: 39 additions & 6 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,46 @@
# Example Package

This folder is a barebones webpage that has TestCafe journey tests for
validation. This package represents the ESLint configuration
[.eslintrc.json](./.eslintrc.json) needed to import the
`eslint-plugin-testcafe-community` plugin and evaluate a file.
validation. An example configuration for importing the
`eslint-plugin-testcafe-community` plugin is provided below.

The journey test is expected to have at least one example of all invalid
configurations to exemplify how the `testcafe-community` plugin will identify
the poor programming patterns in TestCafe test suites.
```js
// .eslintrc.js
module.exports = {
root: true,
env: {
browser: true,
es2021: true
},
extends: ["eslint:recommended"],
overrides: [
{
// for Typescript projects
files: ["*.ts"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 12,
sourceType: "module",
project: "tsconfig.eslint.json"
},
extends: "plugin:@typescript-eslint/recommended",
plugins: ["@typescript-eslint"]
},
{
files: ["*.test.{ts,js}"],
extends: ["plugin:testcafe-community/recommended"],
plugins: ["testcafe-community"]
}
],
rules: {}
};
```

The journey test [`example.test.ts`](./example.test.ts) is expected to have at
least one example of all invalid configurations according to the
`testcafe-community` ruleset. This is designed to exemplify how the
`testcafe-community` plugin will identify the poor programming patterns in
TestCafe test suites.

## Integration

Expand Down
32 changes: 16 additions & 16 deletions tests/example.serial-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ describe("testcafe-community", () => {
fixableErrorCount: 0,
fixableWarningCount: 0,
usedDeprecatedRules: []
})
])
}) as ESLint.LintResult
]) as ESLint.LintResult[]
);
});
});
Expand Down Expand Up @@ -232,8 +232,8 @@ describe("testcafe-community", () => {
fixableErrorCount: 0,
fixableWarningCount: 0,
usedDeprecatedRules: []
})
])
}) as ESLint.LintResult
]) as ESLint.LintResult[]
);
});

Expand All @@ -258,8 +258,8 @@ describe("testcafe-community", () => {
endColumn: 3
}) as Linter.LintMessage
]) as Linter.LintMessage[]
})
])
}) as ESLint.LintResult
]) as ESLint.LintResult[]
);
});

Expand All @@ -283,8 +283,8 @@ describe("testcafe-community", () => {
endColumn: 12
}) as Linter.LintMessage
]) as Linter.LintMessage[]
})
])
}) as ESLint.LintResult
]) as ESLint.LintResult[]
);
});

Expand Down Expand Up @@ -323,8 +323,8 @@ describe("testcafe-community", () => {
endColumn: 48
}) as Linter.LintMessage
]) as Linter.LintMessage[]
})
])
}) as ESLint.LintResult
]) as ESLint.LintResult[]
);
});

Expand All @@ -348,8 +348,8 @@ describe("testcafe-community", () => {
endColumn: 10
}) as Linter.LintMessage
]) as Linter.LintMessage[]
})
])
}) as ESLint.LintResult
]) as ESLint.LintResult[]
);
});

Expand All @@ -373,8 +373,8 @@ describe("testcafe-community", () => {
endColumn: 10
}) as Linter.LintMessage
]) as Linter.LintMessage[]
})
])
}) as ESLint.LintResult
]) as ESLint.LintResult[]
);
});

Expand Down Expand Up @@ -410,8 +410,8 @@ describe("testcafe-community", () => {
warningCount: 1,
fixableErrorCount: 0,
fixableWarningCount: 0
})
])
}) as ESLint.LintResult
]) as ESLint.LintResult[]
);
});
});
Expand Down

0 comments on commit 7840c91

Please sign in to comment.