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