Skip to content

Commit 9169645

Browse files
authored
Add shared linting configuration for QA acceptance tests (#16)
# Description Add shared configuration for our WDIO acceptance tests. Add fixtures to the test overrides list where certain rules are disabled. ## Changes - `qa.js` configuration added. - Release version `6.0.0-alpha.4`.
1 parent 17954df commit 9169645

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

es6.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module.exports = {
9595
},
9696
overrides: [
9797
{
98-
files: ['*.stories.*', '*test*', '**/test/**', '**/*mock*/**', '*mock*', '**/setupTests.*'],
98+
files: ['*.stories.*', '*test*', '**/test/**', '**/*mock*/**', '*mock*', '**/setupTests.*', '**/fixtures/**'],
9999
extends: ['@fs/eslint-config-frontier-react/jest'],
100100
rules: {
101101
'no-alert': 'off',

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ['@fs/eslint-config-frontier-react/react', './es6'],
2+
extends: ['@fs/eslint-config-frontier-react/react', './es6', './qa'],
33
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fs/eslint-config-tree",
3-
"version": "6.0.0-alpha.3",
3+
"version": "6.0.0-alpha.4",
44
"description": "Shared Tree configuration that contains overrides and enhancements on top of the base frontier configuration.",
55
"main": "index.js",
66
"repository": {

qa.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
overrides: [
3+
{
4+
files: ['test/**/*.js'],
5+
globals: {
6+
'browser': 'readonly',
7+
'$': 'readonly',
8+
'$$': 'readonly',
9+
'element': 'readonly',
10+
'by': 'readonly',
11+
'after': 'readonly'
12+
},
13+
rules: {
14+
'jest/expect-expect': 'off',
15+
'global-require': 'off',
16+
'no-console': 'off',
17+
'object-shorthand': 'off',
18+
'import/no-extraneous-dependencies': ['error', { 'devDependencies': true }],
19+
'testing-library/no-await-sync-query': 'off', // All @testing-library/webdriverio queries are async (https://testing-library.com/docs/webdriverio-testing-library/intro/)
20+
'testing-library/prefer-screen-queries': 'off', // We use browser instead of screen for @testing-library/webdriverio
21+
'@babel/no-unused-expressions': 'off' // to allow expressions like this: tree.expect(await (await $(tree.MBTpageObjects.getBCButton())).isDisplayed()).to.be.true
22+
}
23+
}
24+
]
25+
}

0 commit comments

Comments
 (0)