https://github.com/tengattack/eslint-plugin-php-markup
A eslint plugin to process PHP markup
https://github.com/tengattack/eslint-plugin-php-markup
Last synced: 10 months ago
JSON representation
A eslint plugin to process PHP markup
- Host: GitHub
- URL: https://github.com/tengattack/eslint-plugin-php-markup
- Owner: tengattack
- Created: 2018-04-11T18:42:04.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-30T11:45:43.000Z (over 6 years ago)
- Last Synced: 2024-04-24T11:15:55.157Z (about 2 years ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```sh
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`](https://github.com/BenoitZugmeyer/eslint-plugin-html)!
```js
{
// ...
"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