mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
Added complexity rule for api query methods [warn]
- We want to keep behaviour in services and libraries, not in API endpoints - This rule runs complexity _only_ on the query methods, and has it set super low - just 3 - Methods that have higher complexity are a great indicator of places where we've left behaviour in the API, however! - It's indicative, not definitive. At least with an eslint rule we can if needs be disable it where we decide the code is OK
This commit is contained in:
parent
2e5977a137
commit
ba6f51850e
@ -16,6 +16,12 @@ module.exports = {
|
|||||||
'one-var': [2, 'never']
|
'one-var': [2, 'never']
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
|
{
|
||||||
|
files: 'core/server/api/canary/*',
|
||||||
|
rules: {
|
||||||
|
'ghost/ghost-custom/max-api-complexity': 'warn'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
files: 'core/shared/**',
|
files: 'core/shared/**',
|
||||||
rules: {
|
rules: {
|
||||||
|
Loading…
Reference in New Issue
Block a user