Skip to content

Commit

Permalink
Merge pull request #42 from wpkitpro/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
garikhg authored Jan 21, 2024
2 parents fcbc093 + 25908a6 commit 6878194
Show file tree
Hide file tree
Showing 39 changed files with 40,104 additions and 19,718 deletions.
2 changes: 2 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
last 3 versions
not dead
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
assets/lib/**/*.js
assets/js/*.js
**/*.min.js
**/node_modules/**
**/vendor/**
build/**
185 changes: 147 additions & 38 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,148 @@
module.exports = {
root: true,
extends: ['eslint:recommended'],
parser: 'babel-eslint',
env: {
node: true,
es6: true,
amd: true,
browser: true,
jquery: true
},
parserOptions: {
ecmaFeatures: {
globalReturn: true,
generators: false,
objectLiteralDuplicateProperties: false
},
ecmaVersion: 2017,
sourceType: 'module'
},
plugins: ['import'],
settings: {
'import/core-modules': [],
'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$']
},
rules: {
'no-console': 0,
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'ignore'
}
]
}
};
root: true,
extends: [
'plugin:react/recommended',
'plugin:no-jquery/deprecated',
'plugin:@wordpress/eslint-plugin/recommended-with-formatting'
],
plugins: [
'babel',
'react',
'no-jquery',
],
parser: '@babel/eslint-parser',
globals: {
wp: true,
window: true,
document: true,
_: false,
jQuery: false,
JSON: false,
elementorFrontend: true,
elementor: true,
require: true,
DialogsManager: true,
module: true,
React: true,
PropTypes: true,
__: true,
},
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
ecmaFeatures: {
jsx: true
},
},
rules: {
//start of 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}],
'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-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',
{
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-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',
'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',
},
// settings: {
// 'import/core-modules': [],
// 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$']
// },
};
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

22 changes: 17 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/node_modules
/vendor
/public
npm-debug.log
yarn-error.log
.idea/
node_modules/
.sass-cache/
build/
wpkit/
log/
vendor/
composer.lock
.DS_Store
.project
Thumbs.db
*.log
*.map
yarn.lock
assets/js/
*.css
*.zip
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
}
}
12 changes: 0 additions & 12 deletions .stylelintrc.json

This file was deleted.

80 changes: 0 additions & 80 deletions CHANGELOG.md

This file was deleted.

Loading

0 comments on commit 6878194

Please sign in to comment.