Обсуждение: pgAdmin 4 commit: Introducing custom linter script for javascriptfiles

Поиск
Список
Период
Сортировка

pgAdmin 4 commit: Introducing custom linter script for javascriptfiles

От
Ashesh Vashi
Дата:
Introducing custom linter script for javascript files.
Also, changed the 'linter' yarn-command to use this script.

This script will run the 'eslint' against all the static javascripts,
found under pgadmin and regression directories of source (excepts
'vendor', 'generated'). It also allows to run the 'eslint' against
specific javascript file[s].

In order to run eslint on all static javascript files, run the following command:
  yarn run linter
  node pga_eslint

In order to run eslint on specific files, run the following command:
  yarn run linter --file <filename> [<filename>]
  node pga_script --file <filename> [<filename>]

In order to provide eslint specific commands, run the following command:
  yarn run linter [--file <filename> [<filename>]] --eslint-options
  node pga_script [--file <filename> [<filename>]] --eslint-options

  i.e.
    yarn run linter --fix
    yarn run linter --debug
    node pga_eslint --fix --debug pgadmin/static/js/pgadmin.js

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=4d8b7556f8b780b804017d754726a60490985f4f

Modified Files
--------------
web/package.json  |  2 +-
web/pga_eslint.js | 43 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 1 deletion(-)