eslint-plugin-codebox
eslint-plugin-codebox copied to clipboard
ES5 Support
Do you have any plan in your roadmap to support ES5 using require
?
Thank you and look forward to checking your response ❤️
Well, actually I haven't (and tbbh the current architecture relies on assumption that imports are structured at the top), but if more people want this - I may add it Also, PRs are welcome for this one :)
Hi @asn007,
There are just a few cases using require:
-
const api = require('module');
-
const { get, post, patch } = require('module');
const {
BadUserInputError, schemas: {
unauthorizedError,
badRequestError,
internalError
}
} = require('errors');
const {
user: {
email: emailSchema
},
headers: {
authorizationHeaders: authHeadersSchema
}
} = require('schemas');
exports in ES5 is even easier 1.
module.exports = {
authId,
tokenId
};
module.exports = createServer;