mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
bea04e437d
refs: 895bffec1f
- Allowing tests to be skipped masks issues where people temporarily skip tests to fix later and accidentally commit
- Converting this to an error allows us to see when this happens easily
- In future, when we're done with the dance of using ESLint rules to signpost codebase improvements, we may want to downgrade this back to a warning
- This would enable us to have deliberate, temporarily skipped tests in the codebase, if there's a usecase for that with pushing to main regularly
35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
es6: true,
|
|
node: true,
|
|
mocha: true
|
|
},
|
|
plugins: [
|
|
'ghost'
|
|
],
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:ghost/test'
|
|
],
|
|
rules: {
|
|
// TODO: remove this rule once it's turned into "error" in the base plugin
|
|
'no-shadow': 'error',
|
|
|
|
// these rules were were not previously enforced in our custom rules,
|
|
// they're turned off here because they _are_ enforced in our plugin.
|
|
// TODO: remove these custom rules and fix the problems in test files where appropriate
|
|
camelcase: 'off',
|
|
'no-prototype-builtins': 'off',
|
|
'no-unused-vars': 'off',
|
|
'no-useless-escape': 'off',
|
|
|
|
'ghost/mocha/no-skipped-tests': 'error',
|
|
|
|
// TODO: remove these custom rules and fix problems in test files
|
|
'ghost/mocha/max-top-level-suites': 'off',
|
|
'ghost/mocha/no-identical-title': 'off',
|
|
'ghost/mocha/no-setup-in-describe': 'off',
|
|
'ghost/mocha/no-sibling-hooks': 'off'
|
|
}
|
|
};
|