Skip to content

Commit

Permalink
Merge pull request #59 from DLXPlugins/development
Browse files Browse the repository at this point in the history
Merge 4.0 Changes into Master
  • Loading branch information
ronalfy authored Nov 26, 2022
2 parents e19ee76 + 7d4f77d commit 930faf6
Show file tree
Hide file tree
Showing 478 changed files with 641,332 additions and 16,054 deletions.
11 changes: 11 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**/*.min.js
**/*.build.js
**/node_modules/**
**/vendor/**
build
dist
coverage
cypress
node_modules
vendor
google-fonts.js
17 changes: 17 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": [ "plugin:@wordpress/eslint-plugin/recommended" ],
"parserOptions": {
"ecmaVersion": 2017
},

"globals": {
"$": true,
"wp":true,
"console":true,
"$uifm":true
},
"rules": {
"camelcase": "off",
"no-console": "off"
}
}
190 changes: 190 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
{
"parser": "@babel/eslint-parser",
"globals": {
"wp": true,
"wpApiSettings": true,
"window": true,
"document": true,
"hasSettingsAdmin": "readonly",
"hasAppearanceAdmin": "readonly",
"hasBlockEditorAdmin": "readonly",
"hasEmailsAdmin":"readonly",
"has_gutenberg": "readonly",
"highlight_and_share": "readonly",
"React": "readonly"
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
},
"requireConfigFile": false
},
"extends": ["plugin:@wordpress/eslint-plugin/recommended-with-formatting"],
"plugins": ["react", "jsx-a11y", "jest"],
"settings": {
"react": {
"pragma": "wp"
}
},
"rules": {
"array-bracket-spacing": ["error", "always"],
"brace-style": ["error", "1tbs"],
"camelcase": 0,
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": ["error", "always"],
"constructor-super": "error",
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": "error",
"func-call-spacing": "error",
"indent": ["error", "tab", { "SwitchCase": 1 }],
"jsx-a11y/label-has-for": [
"error",
{
"required": "id"
}
],
"jsx-a11y/media-has-caption": "off",
"jsx-a11y/no-noninteractive-tabindex": "off",
"jsx-a11y/role-has-required-aria-props": "off",
"jsx-quotes": "error",
"key-spacing": "error",
"keyword-spacing": "error",
"lines-around-comment": "off",
"no-alert": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-console": "error",
"no-const-assign": "error",
"no-debugger": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-else-return": "error",
"no-eval": "error",
"no-extra-semi": "error",
"no-fallthrough": "error",
"no-lonely-if": "error",
"no-mixed-operators": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-multi-spaces": "error",
"no-multi-str": "off",
"no-negated-in-lhs": "error",
"no-nested-ternary": "error",
"no-redeclare": "error",
"no-restricted-syntax": [
"error",
{
"selector": "ImportDeclaration[source.value=/^@wordpress\\u002F.+\\u002F/]",
"message": "Path access on WordPress dependencies is not allowed."
},
{
"selector": "ImportDeclaration[source.value=/^blocks$/]",
"message": "Use @wordpress/blocks as import path instead."
},
{
"selector": "ImportDeclaration[source.value=/^components$/]",
"message": "Use @wordpress/components as import path instead."
},
{
"selector": "ImportDeclaration[source.value=/^date$/]",
"message": "Use @wordpress/date as import path instead."
},
{
"selector": "ImportDeclaration[source.value=/^editor$/]",
"message": "Use @wordpress/editor as import path instead."
},
{
"selector": "ImportDeclaration[source.value=/^element$/]",
"message": "Use @wordpress/element as import path instead."
},
{
"selector": "ImportDeclaration[source.value=/^i18n$/]",
"message": "Use @wordpress/i18n as import path instead."
},
{
"selector": "ImportDeclaration[source.value=/^data$/]",
"message": "Use @wordpress/data as import path instead."
},
{
"selector": "ImportDeclaration[source.value=/^utils$/]",
"message": "Use @wordpress/utils as import path instead."
},
{
"selector": "CallExpression[callee.name=/^__|_n|_x$/]:not([arguments.0.type=/^Literal|BinaryExpression$/])",
"message": "Translate function arguments must be string literals."
},
{
"selector": "CallExpression[callee.name=/^_n|_x$/]:not([arguments.1.type=/^Literal|BinaryExpression$/])",
"message": "Translate function arguments must be string literals."
},
{
"selector": "CallExpression[callee.name=_nx]:not([arguments.2.type=/^Literal|BinaryExpression$/])",
"message": "Translate function arguments must be string literals."
}
],
"no-shadow": "error",
"no-undef": "error",
"no-undef-init": "error",
"no-unreachable": "error",
"no-unsafe-negation": "error",
"no-unused-expressions": "error",
"no-unused-vars": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-useless-return": "error",
"no-var": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": ["error", "always"],
"padded-blocks": ["error", "never"],
"prefer-const": "error",
"quote-props": ["error", "as-needed"],
"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/no-find-dom-node": "warn",
"react/prop-types": "off",
"semi": "error",
"semi-spacing": "error",
"space-before-blocks": ["error", "always"],
"space-before-function-paren": ["error", "never"],
"space-in-parens": ["error", "always"],
"space-infix-ops": ["error", { "int32Hint": false }],
"space-unary-ops": [
"error",
{
"overrides": {
"!": true
}
}
],
"template-curly-spacing": ["error", "always"],
"valid-jsdoc": ["error", { "requireReturn": false }],
"valid-typeof": "error",
"yoda": "off"
}
}
8 changes: 4 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ module.exports = function (grunt) {
},
files: [
{src: ['highlight-and-share.php'], dest: '/', filter: 'isFile'}, // includes files in path
{src: ['has-click-to-share.php'], dest: '/', filter: 'isFile'}, // includes files in path
{src: ['readme.txt'], dest: '/', filter: 'isFile'}, // includes files in path
{src: ['uninstall.txt'], dest: '/', filter: 'isFile'}, // includes files in path
{src: ['css/**'], dest: '/'}, // includes files in path and its subdirs
{src: ['uninstall.php'], dest: '/', filter: 'isFile'}, // includes files in path
{src: ['build/**'], dest: '/'}, // includes files in path and its subdirs
{src: ['dist/**'], dest: '/'}, // includes files in path and its subdirs
{src: ['img/**'], dest: '/'}, // includes files in path and its subdirs
{src: ['js/**'], dest: '/'}, // includes files in path and its subdirs
{src: ['languages/**'], dest: '/'}, // includes files in path and its subdirs
{src: ['lib/**'], dest: '/'}, // includes files in path and its subdirs
{src: ['php/**'], dest: '/'}, // includes files in path and its subdirs
]
}
}
Expand Down
4 changes: 0 additions & 4 deletions SUMMARY.md

This file was deleted.

5 changes: 5 additions & 0 deletions babel-plugin-macros.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
'fontawesome-svg-core': {
license: 'pro',
},
};
11 changes: 11 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = function( api ) {
api.cache.never();
return {
plugins: [
'macros',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-arrow-functions',
],
presets: [ '@babel/preset-env', '@babel/preset-react' ],
};
};
Loading

0 comments on commit 930faf6

Please sign in to comment.