-
-
Notifications
You must be signed in to change notification settings - Fork 618
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
Conversation
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
dcc43d8
to
8aca6a2
Compare
Hi guys, I noticed the broken tests, which are also broken in I will start right away a RP with the fixes for the broken tests. |
] | ||
}, | ||
"pre-commit": "lint:staged", | ||
"jest": { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
@okonet added your comments, it's ready for a second look |
Could you rebase against master, as the snapshot tests are making the CI fail? |
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 |
Gotcha ✌️ |
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 |
Haven't had a chance to test this, could it chill until tomorrow? |
@ev1stensberg sure! :) Thanks for taking the time |
Could you do |
Would it be possible to merge the PR? I'd like to have it merged as I am working on implementing |
Some tests are failing for this PR. I'm not sure if it's because of those changes or not. |
@DanielaValero you mentioned that tests are failing on the master branch but I can't reproduce that. |
j, | ||
p, | ||
utils.pushCreateProperty, | ||
"context", |
There was a problem hiding this comment.
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')"); |
There was a problem hiding this comment.
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!
pre-commit package stopped working. See observing/pre-commit#113 husky also requires less boilerplate in the package.json
* 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
* 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
What kind of change does this PR introduce?
eslint --fix
to beautify code. In webpack they are usingbeautify-lint
however it seems to me that it does the same thaneslint --fix
, therefore left only the one ofeslint
fix-commit-js
as it is not really workingnote 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