@salesforce/eslint-plugin-visualforce

1.0.6 • Public • Published

eslint-plugin-visualforce

Build Status NPM version

This ESLint 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 developed by Benoît Zugmeyer under ISC license.

License

This plugin is issued under the ISC license.

Usage

Simply install via yard add --dev @salesforce/eslint-plugin-visualforce and add the plugin to your ESLint configuration. See ESLint documentation.

Example:

{
    "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.

Configuring linter-eslint package for the Atom editor

If the language-salesforce plugin is installed simply add source.visualforce under "List of scopes to run ESLint on" at the linter-eslint configuration page.

Package Sidebar

Install

npm i @salesforce/eslint-plugin-visualforce

Weekly Downloads

2

Version

1.0.6

License

ISC

Last publish

Collaborators

  • dme722
  • nolanlawson
  • ire-npm-team-user
  • jburnie
  • abirchfieldsfdc
  • dlouvton
  • mobify
  • jmsjtu
  • jasonschroeder-sfdc
  • packagellama
  • maward
  • danielshox
  • duane.chew
  • dferro
  • jcourtner
  • jye-sf
  • adirasanam
  • hkii
  • iamaziz
  • dbreese-salesforce
  • ashokrudraraju
  • dhersam
  • demianbrecht
  • mbettio
  • damilareolowoniyi
  • mmadialagan
  • mjrust
  • salesforce-releases
  • mpsenn
  • kevinv11n
  • byao
  • pmdartus
  • ekashida
  • gr8gatsby
  • ravi.jayaramappa
  • apapko
  • jleen-sfdc
  • jqian
  • cwallsf
  • dhagberg-sf
  • khawkins
  • amphro
  • jodarove
  • sfdctaka
  • fernomac
  • jimjag
  • ivarley
  • jbartolotta-sfdc