0.0.1 • Published 7 years ago

eslint-plugin-exclude-php-tags v0.0.1

Weekly downloads
16
License
BSD-3-Clause
Repository
github
Last release
7 years ago

eslint-plugin-exclude-php-tags

A preprocessor to remove PHP tags to prevent "Unexpected token <" errors in .phtml files.

Under the hood

By fact it just replaces occurrences of <?...?> for 0 to prevent parsing of php code.

Installation

You'll first need to install ESLint:

$ npm install eslint

Next, install eslint-plugin-exclude-php-tags:

$ npm install eslint-plugin-exclude-php-tags

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-exclude-php-tags globally.

Usage

Add exclude-php-tags to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "exclude-php-tags"
    ]
}