Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Commit

Permalink
Merge pull request #1 from Nevoss/ED-874-base
Browse files Browse the repository at this point in the history
feat: add elementor ruleset
  • Loading branch information
KingYes authored Dec 6, 2020
2 parents 861bcb3 + 75b5cba commit 065f099
Show file tree
Hide file tree
Showing 5 changed files with 783 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor/
.idea
composer.lock
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
# Elementor Sniffs

Collection of PHP_CodeSniffer sniffs for Elementor.

## Installation

```php
composer require elementor/elementor-sniffs
```

## Usage

### Command line

```bash
./vendor/bin/phpcs --standard=Elementor-Core <file>
```

### Config file

PHPCS config file:

```xml
<?xml version="1.0"?>
<ruleset name="Elementor Coding Standards">
<description>My projects ruleset.</description>

<config name="text_domain" value="my-plugin-name" />

<exclude-pattern>vendor/</exclude-pattern>

<!-- Rules -->
<rule ref="Elementor-Core" />
</ruleset>
```
24 changes: 24 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "elementor/elementor-sniffs",
"description": "Elementor sniffs",
"type": "phpcodesniffer-standard",
"license": "GPL-3.0+",
"authors": [
{
"name": "Elementor Team",
"email": "[email protected]"
}
],
"keywords": [
"phpcs",
"standards",
"WordPress",
"Elementor"
],
"minimum-stability": "stable",
"require": {
"php": ">=5.6",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"wp-coding-standards/wpcs": "^2.3"
}
}
Loading

0 comments on commit 065f099

Please sign in to comment.