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

Chore/prettify and lint #173

Merged
merged 10 commits into from
Sep 13, 2017
Merged

Chore/prettify and lint #173

merged 10 commits into from
Sep 13, 2017

Conversation

DanielaValero
Copy link
Contributor

@DanielaValero DanielaValero commented Jul 18, 2017

What kind of change does this PR introduce?

  • Build feature: Uses the webpack eslint config. Edits some settings, that make sense to have in the cli. Example no warning when we use console.log
  • Uses eslint --fix to beautify code. In webpack they are using beautify-lint however it seems to me that it does the same than eslint --fix, therefore left only the one of eslint
  • Chore: Fixes all lintin errors in the code base
  • Updates all the dependencies
  • Removed fix-commit-js as it is not really working

note Wanted to use prettier for the automatic prettification of the code, but was quite complicated. More details here: #102 (comment)

Did you add tests for your changes?
N/A

If relevant, did you update the documentation?
N/A

Does this PR introduce a breaking change?

Nope

@DanielaValero DanielaValero force-pushed the chore/prettify-and-lint branch from dcc43d8 to 8aca6a2 Compare July 18, 2017 13:20
@DanielaValero
Copy link
Contributor Author

Hi guys,

I noticed the broken tests, which are also broken in master. If apart from that, the PR is good for you, I'd suggest to get it merged. As it touches many files, the longer we take to merge it, the more merge conflicts we'll get here.

I will start right away a RP with the fixes for the broken tests.

]
},
"pre-commit": "lint:staged",
"jest": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you drop this intentionally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, good finding! did not want to drop it, was in the merge conflict solving, etc, etc

package.json Outdated
"babel-polyfill": "^6.23.0",
"eslint": "^4.2.0",
"eslint-plugin-node": "^5.1.0",
"eslint-plugin-prettier": "^2.1.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

I see this dependency but I could not find the reference to it anywhere. Did you forget to add it to eslintrc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forgot to remove it, I had added it when I was trying to add prettier to automatically style our code, but after I figured out that prettier is not yet there, removed it, and forgot to get it out from the dependencies.

@DanielaValero
Copy link
Contributor Author

@okonet added your comments, it's ready for a second look

@evenstensberg
Copy link
Member

Could you rebase against master, as the snapshot tests are making the CI fail?

@DanielaValero
Copy link
Contributor Author

Hi @ev1stensberg

The branch is already up-to-date, the tests are also failing in the master branch. Once this is merged, I'll check them out, to make a PR fixing them

@evenstensberg
Copy link
Member

Gotcha ✌️

@DanielaValero
Copy link
Contributor Author

Hello @ev1stensberg @okonet As there is no more comment on this PR, would it be possible to merge it?

Otherwise, let me know what the blocker issue is, so I can apply it, and get this in asap.

There are many touched files, and the longer we wait to merge it, the more extra not necessary work will be raised

@evenstensberg
Copy link
Member

Haven't had a chance to test this, could it chill until tomorrow?

@DanielaValero
Copy link
Contributor Author

@ev1stensberg sure! :) Thanks for taking the time

@evenstensberg
Copy link
Member

Could you do rm -rf node_modules && npm install ? Otherwise, lgtm

@ematipico
Copy link
Contributor

Would it be possible to merge the PR? I'd like to have it merged as I am working on implementing Flow. This could generate conflicts and since this PR has been already reviewed, I'd like to rebase on it. Cheers!

@okonet
Copy link
Contributor

okonet commented Sep 12, 2017

Some tests are failing for this PR. I'm not sure if it's because of those changes or not.

@okonet
Copy link
Contributor

okonet commented Sep 12, 2017

I'll look at test and merge this one.

@DanielaValero you mentioned that tests are failing on the master branch but I can't reproduce that.

j,
p,
utils.pushCreateProperty,
"context",
Copy link
Contributor

@okonet okonet Sep 12, 2017

Choose a reason for hiding this comment

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

So FYI this is what was breaking the test. Nope. Looking further.

defineTest(__dirname, 'context', 'context-2', 'contextVariable');
const defineTest = require("../../../transformations/defineTest");

defineTest(__dirname, "context", "context-0", "path.resolve(__dirname, 'app')");
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is to blame!

Andrey Okonetchnikov added 2 commits September 12, 2017 22:37
pre-commit package stopped working. See observing/pre-commit#113

husky also requires less boilerplate in the package.json
@okonet okonet merged commit b3186a9 into master Sep 13, 2017
@okonet okonet deleted the chore/prettify-and-lint branch September 13, 2017 08:37
evenstensberg pushed a commit that referenced this pull request Oct 22, 2017
* build: Add webpack lint settings and style code with eslint --fix

We now use the webpack eslint settings that make
sense in the cli. Also use the new --fix of eslint
to automatically beautify the code

* Add additional .eslintrc to /bin to remove unrelated eslint errors

* build: Add jest-cli as dev dependency

* style: fix lintin errors and coding style according to webpack settings

* build: update dependencies and add package-lock to repo

* feat: Require quotes only in property names that require it

* chore: Add again removed settings by merge conflict solving

* tests: Fix failing test

* chore: Use husky instead of pre-commit

pre-commit package stopped working. See observing/pre-commit#113

husky also requires less boilerplate in the package.json
evenstensberg added a commit that referenced this pull request Oct 22, 2017
* chore: Use prettier (#173)

* build: Add webpack lint settings and style code with eslint --fix

We now use the webpack eslint settings that make
sense in the cli. Also use the new --fix of eslint
to automatically beautify the code

* Add additional .eslintrc to /bin to remove unrelated eslint errors

* build: Add jest-cli as dev dependency

* style: fix lintin errors and coding style according to webpack settings

* build: update dependencies and add package-lock to repo

* feat: Require quotes only in property names that require it

* chore: Add again removed settings by merge conflict solving

* tests: Fix failing test

* chore: Use husky instead of pre-commit

pre-commit package stopped working. See observing/pre-commit#113

husky also requires less boilerplate in the package.json

* [Feature] Added support to Flow inside transformations (#174)

* [FLOW] Implemented interfaces and flow types inside the transformations

* [FLOW] first commit

* Added flwo to two other files

* Reviewed interfaces

* Created different intefaces for expressions

* Fixed rest of trasformations

* More developments

* Updated code after code review

* Fixed failing tests

* Removed yarn file

* Applied linting

* Updated packages

* Applied lint style to the imports due to code review

* docs: Documentation for migrate (#175)

* initial draft of migrate documentation

* formatting

* formatting

* added summary of migrate changes

* maintain consistent usage of user through documentation

* Feature/generate loader (#183)

* Add template files for loader yeoman generator

* Create yeoman generator for a webpack loader project

* Add tests for loader-generator

* Add `mkdirp` dependency for loader-generator

* Add function to create yeoman env and run loader-generator

* Add `generate-loader` command to webpack-cli

* Copy loader templates from proper directory

* Add template files for plugin generator

* Create yeoman generator for webpack plugins

* Add function to create yeoman env and run plugin generator

* Add cli command to generate plugin

* Register generate- commands in yargs

* Add template files for loader examples and tests

* Copy loader test and example template files in generator

* Add template files for plugin examples and tests

* Copy plugin test and example template files in generator

* Refactor generator file copying, switch .includes with .indexOf in CLI arg parsing

* Change `indexOf('foo') > -1` to `indexOf('foo') >= 0`

* Factor out generator copy utilities into separate module

* Rewrite generators using a function that returns a customized generator class

* Fix linting errors

* Remove //eslint-disable lines from template files

* Add unit tests for CLI and add flow compilation (#186)

* add unit tests for everything and flow compilation

* add travis builds

* add cli to signature & add ignore to trash code

* port to jest

* remove redundant cli command

* Feature/generate loader (#183)

* Add template files for loader yeoman generator

* Create yeoman generator for a webpack loader project

* Add tests for loader-generator

* Add `mkdirp` dependency for loader-generator

* Add function to create yeoman env and run loader-generator

* Add `generate-loader` command to webpack-cli

* Copy loader templates from proper directory

* Add template files for plugin generator

* Create yeoman generator for webpack plugins

* Add function to create yeoman env and run plugin generator

* Add cli command to generate plugin

* Register generate- commands in yargs

* Add template files for loader examples and tests

* Copy loader test and example template files in generator

* Add template files for plugin examples and tests

* Copy plugin test and example template files in generator

* Refactor generator file copying, switch .includes with .indexOf in CLI arg parsing

* Change `indexOf('foo') > -1` to `indexOf('foo') >= 0`

* Factor out generator copy utilities into separate module

* Rewrite generators using a function that returns a customized generator class

* Fix linting errors

* Remove //eslint-disable lines from template files

* add unit tests for everything and flow compilation

* add travis builds

* add cli to signature & add ignore to trash code

* port to jest

* remove redundant cli command

* rebase against master

* ast for devServer (#185)

* feat: replace yarn backup w/ normal yarn (#160)

* feat: replace yarn backup w/ normal yarn

* upgrade npm & remove yarn

* Use yarn if available (#189)

* bump version to 1.3.4

* update package.json

* 1.3.5

* prepublish -> postinstall

* 1.3.6

* temp fix to prepublish issue

* 1.3.7

* add propper post install

* 1.3.8

* re-add manual build step

* 1.3.9

* refactor

* bump version

* disable published pkg

* add ignore patterns

* add more ignore patterns for npm
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