@episerver/eslint-formatter-cms

1.0.0 • Public • Published

@episerver/eslint-formatter-cms

Formatters for @episerver/eslint-plugin-cms that gives a nicer overview of what internal and deprecated Episerver CMS JavaScript API's are used.

If you work on multiple Episerver projects and want to help us improve our public API, we could use your help.

Screenshot of summary output

Installation

You'll first need to install ESLint and @episerver/eslint-plugin-cms:

$ npm i eslint @episerver/eslint-plugin-cms --save-dev
# or
$ yarn add eslint @episerver/eslint-plugin-cms -D

Next, install @episerver/eslint-formatter-cms:

$ npm i @episerver/eslint-formatter-cms --save-dev
# or
$ yarn add @episerver/eslint-formatter-cms -D

Note: If you installed ESLint and @episerver/eslint-plugin-cms globally (using the -g flag) then you must also install @episerver/eslint-formatter-cms globally.

Usage

There are several formatters you can use to get a clearer overview of what Episerver API's are being used but shouldn't be. If you want to send us some statistics to help us in the CMS UI team, please send us the default (telemetry JSON) file. Read more.

The telemetry formatter can be used with:

$ eslint . --format=@episerver/cms

Analyzing multiple projects

Install globally (see instructions above), and then run this for any project:

$ eslint C:/YourEpiserverProject/ --output-file YourEpiserverProject.json --plugin @episerver/cms --format @episerver/cms --rule "{ @episerver/cms/no-internal-episerver-apis: error, @episerver/cms/no-deprecated-episerver-apis: warn }" --ignore-pattern "node_modules" --ignore-pattern "dtk"

Package Sidebar

Install

npm i @episerver/eslint-formatter-cms

Weekly Downloads

3

Version

1.0.0

License

Apache-2.0

Unpacked Size

28 kB

Total Files

11

Last publish

Collaborators

  • johanpetersson
  • ryanbare
  • barteksekula
  • alwa
  • robinjac