0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Added eslint override for index.js false positives

- Unquestionably, at some point we need to rework the API code so that we have less stuff everywhere
- However, the max-lines index.js rule exists as a proxy to find index.js files which are not exposing Public API, but rather contain logic
- These 6 cases are all valid index.js files as the expose the Public API of the module
- Therefore, I've added an override and an override notice explaining.
This commit is contained in:
Hannah Wolfe 2021-08-13 12:46:27 +01:00
parent e208b1a8f3
commit 59a3a67683
No known key found for this signature in database
GPG key ID: 9F8C7532D0A6BA55
6 changed files with 36 additions and 0 deletions

View file

@ -1,6 +1,12 @@
const shared = require('../shared');
const localUtils = require('./utils');
// ESLint Override Notice
// This is a valid index.js file - it just exports a lot of stuff!
// Long term we would like to change the API architecture to reduce this file,
// but that's not the problem the index.js max - line eslint "proxy" rule is there to solve.
/* eslint-disable max-lines */
module.exports = {
get http() {
return shared.http;

View file

@ -1,3 +1,9 @@
// ESLint Override Notice
// This is a valid index.js file - it just exports a lot of stuff!
// Long term we would like to change the API architecture to reduce this file,
// but that's not the problem the index.js max - line eslint "proxy" rule is there to solve.
/* eslint-disable max-lines */
module.exports = {
get all() {
return require('./all');

View file

@ -1,6 +1,12 @@
const shared = require('../shared');
const localUtils = require('./utils');
// ESLint Override Notice
// This is a valid index.js file - it just exports a lot of stuff!
// Long term we would like to change the API architecture to reduce this file,
// but that's not the problem the index.js max - line eslint "proxy" rule is there to solve.
/* eslint-disable max-lines */
module.exports = {
get http() {
return shared.http;

View file

@ -1,3 +1,9 @@
// ESLint Override Notice
// This is a valid index.js file - it just exports a lot of stuff!
// Long term we would like to change the API architecture to reduce this file,
// but that's not the problem the index.js max - line eslint "proxy" rule is there to solve.
/* eslint-disable max-lines */
module.exports = {
get all() {
return require('./all');

View file

@ -1,6 +1,12 @@
const shared = require('../shared');
const localUtils = require('./utils');
// ESLint Override Notice
// This is a valid index.js file - it just exports a lot of stuff!
// Long term we would like to change the API architecture to reduce this file,
// but that's not the problem the index.js max - line eslint "proxy" rule is there to solve.
/* eslint-disable max-lines */
module.exports = {
get http() {
return shared.http;

View file

@ -1,3 +1,9 @@
// ESLint Override Notice
// This is a valid index.js file - it just exports a lot of stuff!
// Long term we would like to change the API architecture to reduce this file,
// but that's not the problem the index.js max - line eslint "proxy" rule is there to solve.
/* eslint-disable max-lines */
module.exports = {
get all() {
return require('./all');