@amplication/plugin-linter-eslint

0.0.5 • Public • Published

@amplication/plugin-linter-eslint

This plugin helps in integrating eslint into your app generated by Amplication.

Purpose

Provides linting out of the box by leveraging one of the best and most popular solutions in industry. This plugin is based on recommended eslint configuration for React projects for the admin app and recommended eslint configuration for Node.js projects for the server app.

Configuration

This plugin requires the following settings during plugin configuration:

  • rules - eslint rules to be used in the app. See eslint rules for more information. Example ( Default rules in settings ) :-
{
  "rules" : {
    "indent": [ "error", 4 ],
    "linebreak-style": [ "error", "unix" ],
    "quotes": [ "error", "single" ],
    "semi": [ "error", "always" ]
  }
}

Scripts

build

Running npm run build will bundle your plugin with Webpack for production.

dev

Running npm run dev will watch your plugin's source code and automatically bundle it with every change.

lint

Running npm run lint will lint your plugin's source code. If run with npm run lint:fix it will also fix the linting errors.

Usage

It can be used by adding the plugin in the plugins page of the app settings. The plugin can be added by providing the settings as shown in the Configuration section.

Results in creating a .eslintrc file in the root of the app's server and admin with the rules provided in the settings.

To view the files that will be created, check the templates folder.

Readme

Keywords

none

Package Sidebar

Install

npm i @amplication/plugin-linter-eslint

Weekly Downloads

25,336

Version

0.0.5

License

Apache-2.0

Unpacked Size

37.8 kB

Total Files

27

Last publish

Collaborators

  • amitbarletz
  • amplication-bot
  • barshimi
  • levivannoort
  • morhag
  • mulygottlieb
  • overbit
  • yuvalhazaz