mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
add mocha eslint plugin to warn about exclusive tests (it.only)
This commit is contained in:
committed by
Aaro Koivukangas
parent
d321a7a55e
commit
bfbb019e51
+19
-10
@@ -1,21 +1,30 @@
|
||||
import globals from 'globals'
|
||||
import pluginJs from '@eslint/js'
|
||||
import pluginCypress from 'eslint-plugin-cypress/flat'
|
||||
import pluginPrettier from 'eslint-plugin-prettier/recommended'
|
||||
import jsPlugin from '@eslint/js'
|
||||
import cypressPlugin from 'eslint-plugin-cypress/flat'
|
||||
import prettierPlugin from 'eslint-plugin-prettier/recommended'
|
||||
import mochaPlugin from 'eslint-plugin-mocha'
|
||||
|
||||
// NOTE: This config is only used for running ESLint on the Cypress tests. Frontend and backend use their own configs.
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
{
|
||||
languageOptions: { globals: globals.browser },
|
||||
},
|
||||
mochaPlugin.configs.flat.recommended,
|
||||
cypressPlugin.configs.recommended,
|
||||
|
||||
{
|
||||
files: ['cypress/*.js'],
|
||||
rules: pluginJs.configs.recommended.rules,
|
||||
rules: {
|
||||
...jsPlugin.configs.recommended.rules,
|
||||
'mocha/no-mocha-arrows': 'off',
|
||||
'mocha/no-skipped-tests': 'off',
|
||||
'mocha/max-top-level-suites': 'off',
|
||||
'mocha/no-top-level-hooks': 'off',
|
||||
'mocha/no-sibling-hooks': 'off',
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
globals: globals.browser,
|
||||
},
|
||||
},
|
||||
|
||||
pluginCypress.configs.recommended,
|
||||
pluginPrettier,
|
||||
prettierPlugin,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user