Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting, building and automated publishing #75

Merged
merged 5 commits into from
Sep 25, 2019
Merged

Linting, building and automated publishing #75

merged 5 commits into from
Sep 25, 2019

Conversation

knopki
Copy link
Member

@knopki knopki commented Aug 7, 2019

grunt, custom nodejs http server, pm2 configuration removed.

.eslintrc from upstream with some added globals. Some files edited to make eslint happy. @igor89 please test this files:

  • Sim900r.js (remove: unused callbacks, escape character)
  • dweetio.js (fix bug with always empty response)
  • octoliner.js (make i shared)
  • quaddisplay.js (see interval)
  • usb-keyboard.js (remove unused callbacks, make i shared)
  • wifi.js (self magic, useless function argument)
  • x-fet.js (make i shared)

prettier initialized with empty config and all modules prettyfied. May be we need set some options for prettier? (.prettierrc needed even if empty to force vscode use empty config instead of defaults of extension)

CircleCI automation:

  • lint (eslint and prettylint)
  • publish to GCS bucket when merged to master

@igor89 what is http://js.amperka.ru/emu/? If it used we can just put it to the GCS (already did) or publish source code as part of this repository.

@nkrkv @igor89 BTW Espruino supports URLs in require() (but I think example is broken because of wrong urls). So any module can be hosted from github without special repositories. Just to know.

@knopki knopki changed the title [WIP] Linting, building and automated publishing Linting, building and automated publishing Aug 8, 2019
@knopki knopki marked this pull request as ready for review August 8, 2019 07:57
@knopki
Copy link
Member Author

knopki commented Aug 8, 2019

Small update: only modules dir prettified. json excluded because of autogenerated nature of ISKRAJS.json.

Copy link
Contributor

@yurybotov yurybotov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Единственное что бросилось в глаза: перед открывающими фигурными скобками (if(){ /for() {/...) то вставляются пробелы то нет. По идее у преттификатора должна быть какая то однообразная интерпретация.

@knopki
Copy link
Member Author

knopki commented Aug 8, 2019

@yurybotov if и for должны отделяться пробелом однозначно. Не вижу, где без пробела?

@knopki
Copy link
Member Author

knopki commented Sep 20, 2019

image

@nkrkv
Copy link
Member

nkrkv commented Sep 24, 2019

@igor89 review?

Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A vast amount of changes introduced by replacing ' with ". I think it is a wise idea to keep single quotes: we used them before here and we use single quotes in most other JS projects

modules/@amperka/meteo-sensor.js Outdated Show resolved Hide resolved
modules/@amperka/usb-keyboard.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@nomad605dis nomad605dis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the libraries from the list. The change @knopki is OK. But during the test, errors were found in existing modules.

  1. Module usb-keyboard.js does not work on Windows OS.
  2. Kit “Internet of Things (Yodo)” set in the examples, there is no check for an error connecting the Wi-Fi module to the access point. As a result, even if the module is not connected to the network, the code continues to work.

@nkrkv http://js.amperka.ru/emu/ Do we use it?

@nkrkv
Copy link
Member

nkrkv commented Sep 24, 2019

http://js.amperka.ru/emu/ Do we use it?

AFAIK no

@knopki
Copy link
Member Author

knopki commented Sep 25, 2019

@nkrkv singleQuote rule added with array literals ignore. Changeset becomes from +4,201 −1,457 to +3,508 −1,033.

@knopki
Copy link
Member Author

knopki commented Sep 25, 2019

@igor89 Am I understand properly that wifi.js and dweetio.js works but problem only examples (outside of this repo)?

Also, about keyboard.js. This version doesn't work, but previous does? I mean my internal brain JS-compiler says that changes are trivial and can't broke anything. So is it me or previous changes or regression with new version of espruino?

@nomad605dis
Copy link
Collaborator

nomad605dis commented Sep 25, 2019

@knopki

Am I understand properly that wifi.js and dweetio.js works but problem only examples (outside of this repo)?

That's right.

Module keyboard.js on the previous version also does not work. But this is not related to your changes. keyboard.js must be corrected in another PR.

Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, merge

@knopki
Copy link
Member Author

knopki commented Sep 25, 2019

@nkrkv @igor89 Just to note: I don't have rights to merge this PR :)

@knopki knopki merged commit 12d6515 into amperka:master Sep 25, 2019
@knopki knopki deleted the renew branch September 25, 2019 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants