-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
5,861 additions
and
4,815 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
last 4 version | ||
> 1% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,192 +1,18 @@ | ||
|
||
{ | ||
"root": true, | ||
"parser": "babel-eslint", | ||
"extends": [ | ||
"wordpress", | ||
"plugin:react/recommended", | ||
"plugin:jsx-a11y/recommended" | ||
"eslint-config-nk" | ||
], | ||
"env": { | ||
"browser": false, | ||
"es6": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"globals": { | ||
"wp": true, | ||
"wpApiSettings": true, | ||
"window": true, | ||
"document": true | ||
"wp": true | ||
}, | ||
"plugins": ["react", "jsx-a11y"], | ||
"settings": { | ||
"react": { | ||
"pragma": "wp" | ||
} | ||
}, | ||
"rules": { | ||
"array-bracket-spacing": ["error", "always"], | ||
"brace-style": ["error", "1tbs"], | ||
"camelcase": ["error", { "properties": "never" }], | ||
"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", 4], | ||
"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-a11y/no-autofocus": "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", 4], | ||
"react/jsx-indent-props": ["error", 4], | ||
"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" | ||
"react/prefer-stateless-function": "off", | ||
"react/prop-types": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Deploy to WordPress.org | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Disable xDebug - fixes PHP Fatal Error for `i18n make-pot` | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
coverage: none | ||
|
||
- name: Install NPM and Composer Dependencies | ||
run: npm install | ||
|
||
- name: Run Production Task | ||
run: npm run production | ||
|
||
- name: WordPress Plugin Deploy | ||
uses: nk-o/action-wordpress-plugin-deploy@master | ||
env: | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SOURCE_DIR: dist/lazy-blocks/ | ||
SLUG: lazy-blocks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
**/vendor/* | ||
**/*.js | ||
**/*.jsx | ||
**/*.min.css | ||
**/*.build.css | ||
node_modules | ||
vendor | ||
vendors |
Oops, something went wrong.