mirror of
https://github.com/IT4Change/boilerplate-e2e-cypress-cucumber.git
synced 2025-12-13 04:55:50 +00:00
add linting
This commit is contained in:
parent
b4c161fd82
commit
e27dce45d4
@ -35,6 +35,13 @@ module.exports = {
|
||||
// Optional eslint-comments rule
|
||||
'@eslint-community/eslint-comments/no-unused-disable': 'error',
|
||||
'@eslint-community/eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
|
||||
// cypress
|
||||
'cypress/no-assigning-return-values': 'error',
|
||||
'cypress/no-unnecessary-waiting': 'error',
|
||||
'cypress/assertion-before-screenshot': 'warn',
|
||||
'cypress/no-force': 'warn',
|
||||
'cypress/no-async-tests': 'error',
|
||||
'cypress/no-pause': 'error',
|
||||
// import
|
||||
'import/export': 'error',
|
||||
'import/no-deprecated': 'error',
|
||||
@ -78,7 +85,7 @@ module.exports = {
|
||||
'import/group-exports': 'off',
|
||||
'import/newline-after-import': 'error',
|
||||
'import/no-anonymous-default-export': 'off', // todo - consider to enable again
|
||||
'import/no-default-export': 'off', // incompatible with vite & vike
|
||||
'import/no-default-export': 'off',
|
||||
'import/no-duplicates': 'error',
|
||||
'import/no-named-default': 'error',
|
||||
'import/no-namespace': 'error',
|
||||
@ -123,6 +130,8 @@ module.exports = {
|
||||
parser: '@typescript-eslint/parser',
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: ['cypress'],
|
||||
extends: ['plugin:cypress/recommended'],
|
||||
plugins: ['@typescript-eslint'],
|
||||
extends: [
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
@ -143,6 +152,14 @@ module.exports = {
|
||||
'prettier/prettier': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['!*.json'],
|
||||
plugins: ['prettier'],
|
||||
extends: ['plugin:prettier/recommended'],
|
||||
rules: {
|
||||
'prettier/prettier': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.json'],
|
||||
plugins: ['json'],
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@ -23,6 +23,7 @@
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-json": "^3.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-security": "^2.1.1",
|
||||
"eslint-plugin-yml": "^1.12.2",
|
||||
"multiple-cucumber-html-reporter": "^3.6.2",
|
||||
@ -6982,7 +6983,6 @@
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz",
|
||||
"integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-json": "^3.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-security": "^2.1.1",
|
||||
"eslint-plugin-yml": "^1.12.2",
|
||||
"multiple-cucumber-html-reporter": "^3.6.2",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user