Remove @typescript-eslint/camelcase rule exception
[MAILPOET-3201]
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/await-thenable": "off",
|
||||
"@typescript-eslint/camelcase": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
// PropTypes
|
||||
@@ -39,6 +38,7 @@
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
// Exceptions
|
||||
"@typescript-eslint/camelcase": ["error", { "properties": "never" }], // we need this to interact with the server
|
||||
"react/jsx-filename-extension": 0,
|
||||
"arrow-parens": ["error", "always"],
|
||||
"comma-dangle": ["error", "always-multiline"],
|
||||
|
@@ -26,9 +26,10 @@ export const withFeatureAnnouncement = <P extends object>(
|
||||
}
|
||||
|
||||
function updateLastAnnouncementSeenValue() {
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
const data = { last_announcement_seen: Math.floor(Date.now() / 1000) };
|
||||
MailPoet.Ajax.post({
|
||||
api_version: (window as any).mailpoet_api_version,
|
||||
api_version: MailPoet.apiVersion,
|
||||
endpoint: 'user_flags',
|
||||
action: 'set',
|
||||
data,
|
||||
@@ -36,7 +37,9 @@ export const withFeatureAnnouncement = <P extends object>(
|
||||
}
|
||||
|
||||
function loadBeamer() {
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
(window as any).beamer_config = {
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
product_id: 'VvHbhYWy7118',
|
||||
selector: '#beamer-empty-element',
|
||||
language: (window as any).mailpoet_user_locale,
|
||||
@@ -46,6 +49,7 @@ export const withFeatureAnnouncement = <P extends object>(
|
||||
(window as any).beamer_config.filter = 'woocommerce';
|
||||
}
|
||||
MailPoet.Modal.loading(true);
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
(window as any).mailpoet_feature_announcement_has_news = false;
|
||||
const s = document.createElement('script');
|
||||
s.type = 'text/javascript';
|
||||
|
@@ -6,7 +6,7 @@ import Modal from 'common/modal/modal';
|
||||
import { GlobalContext } from 'context';
|
||||
import { noop } from 'lodash';
|
||||
|
||||
const mailPoetApiVersion = (window as any).mailpoet_api_version as string;
|
||||
const mailPoetApiVersion = MailPoet.apiVersion as string;
|
||||
|
||||
/**
|
||||
* @param {string|null} address
|
||||
|
@@ -17,6 +17,7 @@ var MailPoet = {
|
||||
hasValidApiKey: window.mailpoet_has_valid_api_key,
|
||||
listingPerPage: window.mailpoet_listing_per_page,
|
||||
libs3rdPartyEnabled: window.mailpoet_3rd_party_libs_enabled,
|
||||
apiVersion: window.mailpoet_api_version,
|
||||
getShortcodeLinks: () => (window.mailpoet_shortcode_links ? window.mailpoet_shortcode_links : []),
|
||||
};
|
||||
|
||||
|
@@ -40,7 +40,7 @@ const CampaignStatsPage = ({ match, history, location }: Props) => {
|
||||
MailPoet.Modal.loading(true);
|
||||
|
||||
MailPoet.Ajax.post({
|
||||
api_version: (window as any).mailpoet_api_version,
|
||||
api_version: MailPoet.apiVersion,
|
||||
endpoint: (window as any).mailpoet_display_detailed_stats ? 'stats' : 'newsletters',
|
||||
action: (window as any).mailpoet_display_detailed_stats ? 'get' : 'getWithStats',
|
||||
data: {
|
||||
|
@@ -36,7 +36,7 @@ export const SubscriberStats = () => {
|
||||
|
||||
useEffect(() => {
|
||||
MailPoet.Ajax.post({
|
||||
api_version: (window as any).mailpoet_api_version,
|
||||
api_version: MailPoet.apiVersion,
|
||||
endpoint: 'subscriberStats',
|
||||
action: 'get',
|
||||
data: {
|
||||
|
Reference in New Issue
Block a user