Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/forcedotcom/eslint-plugin-visualforce
An ESLint plugin to lint inline Javascript containing fields and VisualForce tags inside of VisualForce pages
https://github.com/forcedotcom/eslint-plugin-visualforce
eslint eslint-plugin javascript linter salesforce visualforce
Last synced: about 1 month ago
JSON representation
An ESLint plugin to lint inline Javascript containing fields and VisualForce tags inside of VisualForce pages
- Host: GitHub
- URL: https://github.com/forcedotcom/eslint-plugin-visualforce
- Owner: forcedotcom
- License: isc
- Created: 2017-05-03T01:11:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T01:41:57.000Z (over 1 year ago)
- Last Synced: 2024-10-23T02:07:19.823Z (3 months ago)
- Topics: eslint, eslint-plugin, javascript, linter, salesforce, visualforce
- Language: JavaScript
- Homepage:
- Size: 487 KB
- Stars: 7
- Watchers: 10
- Forks: 3
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# eslint-plugin-visualforce
[![Build Status](https://travis-ci.org/forcedotcom/eslint-plugin-visualforce.svg?branch=master)](https://travis-ci.org/forcedotcom/eslint-plugin-visualforce)
[![NPM version](https://img.shields.io/npm/v/@salesforce/eslint-plugin-visualforce.svg)](https://www.npmjs.com/package/@salesforce/eslint-plugin-visualforce)This [`ESLint`](https://eslint.org) plugin extracts and lints scripts from VisualForce pages.
It supports VisualForce Expression Language merge fields within the JS syntax.
This plugin is a heavily modified fork of [`eslint-plugin-html`](https://github.com/BenoitZugmeyer/eslint-plugin-html) developed by [Benoît Zugmeyer](https://github.com/BenoitZugmeyer) under [ISC](https://opensource.org/licenses/ISC) license.## License
This plugin is issued under the [ISC](./LICENSE) license.
## Usage
Simply install via `yard add --dev @salesforce/eslint-plugin-visualforce` and add the plugin to your ESLint
configuration. See
[ESLint documentation](http://eslint.org/docs/user-guide/configuring#configuring-plugins).Example:
```javascript
{
"plugins": [
"@salesforce/eslint-plugin-visualforce"
],
"rules": {
"visualforce/no-atom-expr": "error",
"visualforce/no-apex-tags": "error",
"visualforce/jsencode": "error"
}
}
```Note: by default, when executing the `eslint` command on a directory, only `.js` files will be
linted. You will have to specify extra extensions with the `--ext` option. Example: `eslint --ext
.page pages` will lint `.page` files in the `pages` directory. See [ESLint
documentation](http://eslint.org/docs/user-guide/command-line-interface#ext).## Configuring linter-eslint package for the Atom editor
If the [`language-salesforce`](https://atom.io/packages/language-salesforce) plugin is installed simply add `source.visualforce` under "List of scopes to run ESLint on" at the `linter-eslint` configuration page.