Skip to content

Commit

Permalink
Merge develop into master
Browse files Browse the repository at this point in the history
  • Loading branch information
elementorbot committed Jul 3, 2022
2 parents f106513 + 0c8aad2 commit e8e42dc
Show file tree
Hide file tree
Showing 452 changed files with 7,707 additions and 11,839 deletions.
102 changes: 26 additions & 76 deletions .eslintrc.js
@@ -1,26 +1,24 @@
module.exports = {
extends: [
'wordpress',
'plugin:wordpress/esnext',
'plugin:@elementor/editor/recommended',
'plugin:react/recommended',
'plugin:no-jquery/deprecated',
'plugin:@wordpress/eslint-plugin/recommended-with-formatting',
'plugin:@elementor/editor/recommended',
],
plugins: [
'wordpress',
'babel',
'react',
'@elementor/editor',
'no-jquery',
],
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
globals: {
wp: true,
window: true,
document: true,
'_': false,
'jQuery': false,
'JSON': false,
_: false,
jQuery: false,
JSON: false,
elementorFrontend: true,
require: true,
elementor: true,
Expand All @@ -30,65 +28,44 @@ module.exports = {
PropTypes: true,
__: true,
},
'parserOptions': {
'ecmaVersion': 2017,
'sourceType': 'module',
'ecmaFeatures': {
'jsx': true,
parserOptions: {
ecmaVersion: 2017,
requireConfigFile: false,
sourceType: 'module',
babelOptions: {
parserOpts: {
plugins: [ 'jsx' ],
},
},
},
rules: {
// custom canceled rules
'no-var': 'off',
'vars-on-top': 'off',
'wrap-iife': 'off',
'computed-property-spacing': [ 'error', 'always' ],
'comma-dangle': [ 'error', 'always-multiline' ],
'no-undef': 'off',
'no-unused-vars': [ 'warn', { 'ignoreRestSiblings': true } ],
'no-unused-vars': [ 'warn', { ignoreRestSiblings: true } ],
'dot-notation': 'error',
'no-shadow': 'error',
'no-lonely-if': 'error',
'no-mixed-operators': 'error',
'no-nested-ternary': 'error',
'no-cond-assign': 'error',
'space-in-parens': [ 'error', 'always', { 'exceptions': [ 'empty' ] } ],
'no-multi-spaces': 'error',
'semi-spacing': 'error',
'quote-props': [ 'error', 'as-needed' ],
indent: [ 'off', 'tab', { SwitchCase: 1 } ],
'no-mixed-spaces-and-tabs': 'error',
'padded-blocks': [ 'error', 'never' ],
'one-var-declaration-per-line': 'error',
'no-extra-semi': 'error',
'key-spacing': 'error',
'array-bracket-spacing': [ 'error', 'always' ],
'no-else-return': 'error',
'no-console': 'warn',
//end of custom canceled rules
'arrow-parens': [ 'error', 'always' ],
'arrow-spacing': 'error',
'brace-style': [ 'error', '1tbs' ],
camelcase: [ 'error', { properties: 'never' } ],
'comma-spacing': 'error',
'comma-style': 'error',
'eol-last': 'error',
eqeqeq: 'error',
'func-call-spacing': 'error',
'jsx-quotes': 'error',
'keyword-spacing': 'error',
'lines-around-comment': 'off',
'no-bitwise': [ 'error', { 'allow': [ '^' ] } ],
'no-bitwise': [ 'error', { allow: [ '^' ] } ],
'no-caller': 'error',
'no-debugger': 'warn',
'no-dupe-args': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-eval': 'error',
'no-multiple-empty-lines': [ 'error', { max: 1 } ],
'no-multi-str': 'off',
'no-negated-in-lhs': 'error',
'no-redeclare': 'error',
'no-restricted-syntax': [
'error',
{
Expand All @@ -104,47 +81,20 @@ module.exports = {
message: 'Translate function arguments must be string literals.',
},
],
'no-trailing-spaces': 'error',
'no-undef-init': 'error',
'no-unreachable': 'error',
'no-unsafe-negation': 'error',
'no-unused-expressions': 'error',
'no-useless-return': 'error',
'no-whitespace-before-property': 'error',
'object-curly-spacing': [ 'error', 'always' ],
'prefer-const': 'warn',
quotes: [ 'error', 'single', { allowTemplateLiterals: true, avoidEscape: true } ],
semi: 'error',
'space-before-blocks': [ 'error', 'always' ],
'space-before-function-paren': [ 'error', {
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
} ],
'space-infix-ops': [ 'error', { int32Hint: false } ],
'space-unary-ops': [ 'error', {
overrides: {
'!': true,
yield: true,
},
} ],
'valid-typeof': 'error',
yoda: [ 'error', 'always', {
'onlyEquality': true,
onlyEquality: true,
} ],
'react/react-in-jsx-scope': 'off',
'babel/semi': 1,
// 'react/display-name': 'off',
// 'react/jsx-curly-spacing': [ 'error', {
// when: 'always',
// children: true,
// } ],
// 'react/jsx-equals-spacing': 'error',
// 'react/jsx-indent': [ 'error', 'tab' ],
// 'react/jsx-indent-props': [ 'error', 'tab' ],
// 'react/jsx-key': 'error',
// 'react/jsx-tag-spacing': 'error',
// 'react/no-children-prop': 'off',
// 'react/prop-types': 'off',
'jsdoc/check-tag-names': [ 'error', { definedTags: [ 'jest-environment' ] } ],
'import/no-unresolved': [ 2, { ignore: [ 'elementor', 'modules', '@wordpress/i18n', 'e-utils', 'e-styles' ] } ],
'import/no-extraneous-dependencies': 'off',
'@wordpress/i18n-translator-comments': 'off',
},
settings: {
jsdoc: {
mode: 'typescript',
},
},
};
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -30,3 +30,4 @@ coverage/
# playwright
test-results/
tests/playwright/config/storageState.json
tests/playwright/config/local.config.js
10 changes: 6 additions & 4 deletions .grunt-config/sass.js
@@ -1,9 +1,11 @@
const sassImplementation = require('sass');

const sass = {
options: {
implementation: sassImplementation,
sourceMap: true,
},
dist: {
options: {
sourcemap: true,
sourceMap: true
},
files: [
{
expand: true,
Expand Down
19 changes: 9 additions & 10 deletions assets/dev/js/admin/admin-feedback.js
@@ -1,18 +1,17 @@
/* global jQuery */
( function( $ ) {
'use strict';

var ElementorAdminDialogApp = {

cacheElements: function() {
cacheElements() {
this.cache = {
$deactivateLink: $( '#the-list' ).find( '[data-slug="elementor"] span.deactivate a' ),
$dialogHeader: $( '#elementor-deactivate-feedback-dialog-header' ),
$dialogForm: $( '#elementor-deactivate-feedback-dialog-form' ),
};
},

bindEvents: function() {
bindEvents() {
var self = this;

self.cache.$deactivateLink.on( 'click', function( event ) {
Expand All @@ -22,11 +21,11 @@
} );
},

deactivate: function() {
deactivate() {
location.href = this.cache.$deactivateLink.attr( 'href' );
},

initModal: function() {
initModal() {
var self = this,
modal;

Expand All @@ -43,7 +42,7 @@
my: 'center',
at: 'center',
},
onReady: function() {
onReady() {
DialogsManager.getWidgetType( 'lightbox' ).prototype.onReady.apply( this, arguments );

this.addButton( {
Expand All @@ -55,13 +54,13 @@
this.addButton( {
name: 'skip',
text: __( 'Skip & Deactivate', 'elementor' ),
callback: function() {
callback() {
self.deactivate();
},
} );
},

onShow: function() {
onShow() {
var $dialogModal = $( '#elementor-deactivate-feedback-modal' ),
radioSelector = '.elementor-deactivate-feedback-dialog-input';

Expand All @@ -78,7 +77,7 @@
};
},

sendFeedback: function() {
sendFeedback() {
var self = this,
formData = self.cache.$dialogForm.serialize();

Expand All @@ -87,7 +86,7 @@
$.post( ajaxurl, formData, this.deactivate.bind( this ) );
},

init: function() {
init() {
this.initModal();
this.cacheElements();
this.bindEvents();
Expand Down

0 comments on commit e8e42dc

Please sign in to comment.