eslint-plugin-php-markup

6.0.0 • Public • Published

eslint-plugin-php-markup

A eslint plugin to process PHP markup.

It can make us get rid of "Unexpected token <" errors in .php files.

Principle

This plugin just replace every php markup <? ... ?> to other text.

Installation

npm install --save-dev eslint-plugin-php-markup

Usage

Add php-markup to the plugins section of your .eslintrc configuration file.

BTW, it works like a charm together with eslint-plugin-html!

{
  // ...
  "plugins": [
    "html",
    "php-markup"
  ],
  "settings": {
    "php/php-extensions": [".php"],
    "php/markup-replacement": {"php": "", "=": "0"},
    "php/keep-eol": false,
    "php/remove-whitespace": false,
    "php/remove-empty-line": false,
    "php/remove-php-lint": false
  },
  // ...
}

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i eslint-plugin-php-markup

Weekly Downloads

1,315

Version

6.0.0

License

MIT

Unpacked Size

28.1 kB

Total Files

11

Last publish

Collaborators

  • tengattack