Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #125 from WPTRT/development
Browse files Browse the repository at this point in the history
Merge to master
  • Loading branch information
dingo-d committed Mar 5, 2019
2 parents a0af96a + 8e3c90f commit 98d3b2f
Show file tree
Hide file tree
Showing 69 changed files with 13,189 additions and 8,261 deletions.
16 changes: 12 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
{
"presets": [
["env", {
"targets": {
"browsers": ["last 2 versions", "not ie < 11", "android >= 4.2"]
[
"@babel/preset-env",
{
"targets": {
"browsers": [
"last 2 versions",
"not ie < 11",
"android >= 4.2"
],
"node": "current"
}
}
}]
]
]
}
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4

[*.md]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .esclintignore → .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/vendors/*
/vendor/*
/node_modules/*
14 changes: 6 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@
"__VERSION__": true
},
"env": {

# You can change environment depending on the project you are working on
"browser": true,
"node": true,
"commonjs": true,
"es6": true,
"jquery": true
},
extends: ["eslint:recommended", "wordpress"],
rules: {
indent: ["error", "tab"],
"extends": ["eslint:recommended", "wordpress"],
"rules": {
"indent": ["error", "tab"],
"linebreak-style": ["error", "unix"],
quotes: ["error", "single"],
semi: ["error", "always"],
yoda: ["error", "never"]
"quotes": ["error", "single"],
"semi": ["error", "always"],
"yoda": ["error", "never"]
}
}
15 changes: 13 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
node_modules/
vendor/

# Project build folder
/build/
/assets/build/

# Mac OS custom attribute store and thumbnails
*.DS_Store
._*

# Exclude final build zip file and temp folder
/theme-sniffer
.theme-sniffer.zip

# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Build assets
assets/build/
# IDE specific
theme-sniffer.sublime-project
theme-sniffer.sublime-workspace
115 changes: 1 addition & 114 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,116 +1,3 @@
{
"ignoreFiles": "public/**/*.css",
"rules": {
"color-hex-case": "upper",
"color-hex-length": "long",
"color-named": "never",
"color-no-invalid-hex": true,

"font-family-name-quotes": "always-unless-keyword",

"font-weight-notation": "named-where-possible",

"function-calc-no-unspaced-operator": true,
"function-comma-space-after": "always",
"function-comma-space-before": "never",
"function-linear-gradient-no-nonstandard-direction": true,
"function-parentheses-newline-inside": "never-multi-line",
"function-parentheses-space-inside": "never",
"function-url-quotes": "always",
"function-whitespace-after": "always",

"number-leading-zero": "always",
"number-max-precision": 2,
"number-no-trailing-zeros": true,
"length-zero-no-unit": true,

"string-no-newline": true,
"string-quotes": "single",

"value-no-vendor-prefix": true,
"value-list-comma-newline-before": "never-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",

"property-no-vendor-prefix": true,

"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"declaration-no-important": true,

"declaration-block-no-duplicate-properties": true,
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-trailing-semicolon": "always",

"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always",
"block-no-empty": true,
"block-opening-brace-newline-after": "always",
"block-opening-brace-newline-before": "always-single-line",

"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-max-specificity": "0,4,0",
"selector-max-id": 0,
"selector-max-type": 4,
"selector-max-universal": 0,
"selector-no-vendor-prefix": true,
"selector-pseudo-element-colon-notation": "double",

"selector-list-comma-newline-after": "always",
"selector-list-comma-newline-before": "never-multi-line",

"rule-empty-line-before": [
"always", {
"except": [
"first-nested"
],
"ignore": [
"after-comment"
]
}
],

"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-name-no-vendor-prefix": true,
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",

"at-rule-empty-line-before": [
"always", {
"except": [
"first-nested",
"blockless-after-blockless"
],
"ignore": [
"after-comment"
]
}
],
"at-rule-no-vendor-prefix": true,

"comment-empty-line-before": [
"always", {
"ignore": [
"after-comment"
]
}
],
"comment-whitespace-inside": "always",

"indentation": 2,
"max-line-length": 250,
"max-nesting-depth": 5,
"no-duplicate-selectors": true,
"no-eol-whitespace": true,
"no-unknown-animations": true
}
"extends": "stylelint-config-wordpress"
}
69 changes: 42 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
sudo: false
dist: trusty

cache:
apt: true
directories:
# Cache directory for older Composer versions.
- $HOME/.composer/cache/files
# Cache directory for more recent Composer versions.
- $HOME/.cache/composer/files

language: php

before_install:
- phpenv config-rm xdebug.ini
php:
- 7.0
- 7.1
- 7.3
- nightly

env:
# Highest supported PHPCS version.
- PHPCS_BRANCH="dev-master" LINT=1
# Lowest supported PHPCS version.
- PHPCS_BRANCH="3.3.0"

notifications:
email:
Expand All @@ -14,33 +30,32 @@ notifications:
branches:
only:
- master

cache:
apt: true
directories:
- node_modules
- vendor
- composer
- $HOME/.composer/cache
- development

matrix:
fast_finish: true
include:
- php: 5.3
dist: precise
env: WP_VERSION=3.7.22 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=latest WP_MULTISITE=1
- php: 7.1
env: WP_VERSION=latest WP_MULTISITE=0 SNIFF=1

before_script:
- if [[ "$SNIFF" == "1" ]]; then export PATH="$HOME/.composer/vendor/bin:$PATH"; fi
- if [[ "$SNIFF" == "1" ]]; then composer global require wp-coding-standards/wpcs; fi
- if [[ "$SNIFF" == "1" ]]; then phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs; fi
# Seperate builds for PHP 7.2 with additional checks.
- php: 7.2
env: PHPCS_BRANCH="dev-master"
addons:
apt:
packages:
- libxml2-utils
- php: 7.2
env: PHPCS_BRANCH="3.3.0"

allow_failures:
# Allow failures for unstable builds.
- php: nightly
- php: "7.4snapshot"

before_install:
- phpenv config-rm xdebug.ini
- composer install

script:
# Search theme for PHP syntax errors.
- find . \( -name '*.php' \) -exec php -lf {} \;
- if [[ "$SNIFF" == "1" ]]; then phpcs --standard=phpcs.ruleset.xml $(find . -name '*.php'); fi
- if [[ "$SNIFF" == "1" ]]; then phpcs --standard=phpcs.ruleset.xml $(find . -name '*.php'); fi
# Lint the PHP files against parse errors.
- if find . -path ./vendor -prune -o -name "*.php" -exec php -l {} \; | grep "^[Parse error|Fatal error]"; then exit 1; fi;
# Check the codestyle of the WPThemeReview codebase.
- composer check-cs .
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 WPTRT

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 98d3b2f

Please sign in to comment.