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

Simplify package structure and decouple from Airbnb #20

Merged
merged 28 commits into from
Aug 25, 2017
Merged

Conversation

jkrems
Copy link
Contributor

@jkrems jkrems commented Aug 14, 2017

  • Drop dependency on airbnb base config
  • Go back to one single package for all the things
  • Use proper positive/negative tests
  • Test pretty printing
  • Add prettier for even more automated fixing
  • Upgrade to eslint@4

Still pending:

  • Port all node 6 rules
  • Port all node 4 rules
  • Create node 8 rules
  • Port all ES5 rules
  • Port CSS formatting to prettier
  • Update README/doc files
  • Set up nlm (again) and make it publishable.

Rules that didn't make the cut (selection):

  • Disallow x++ and mixed operators. No --fix yet.
  • Global strict is only a warning, pending a --fix solution.

I tried to be conservative about adding back rules in general. I think we cover all the actual bug prevention now and prettier should cover formatting.

@jkrems jkrems requested a review from dbushong August 22, 2017 23:51
@jkrems
Copy link
Contributor Author

jkrems commented Aug 22, 2017

I think this is ready for a fist review.

@jkrems jkrems changed the title [WIP] Simplify package structure and decouple from Airbnb Simplify package structure and decouple from Airbnb Aug 24, 2017
@jkrems
Copy link
Contributor Author

jkrems commented Aug 24, 2017

Added commits to enable nlm and removed the WIP prefix.

package.json Outdated
"dependencies": {
"coffeelint-config-groupon": "file:./packages/coffeelint-config-groupon",
"coffeelint-forbidden-keywords": "~0.1.1",
"coffeelint-no-mocha-only": "^1.0.0",
"coffeelint-use-strict": "^1.0.0",
"coffeescope2": "~0.4.2",
Copy link
Member

Choose a reason for hiding this comment

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

Should these be peerDeps instead of direct deps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Heh, good point. Yeah, I think so. Blindly left these here based on the previous top-level state which is clearly not correct.

package.json Outdated
"name": "groupon-styleguide",
"version": "3.2.0",
"private": true,
"name": "eslint-config-groupon",
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean for coffeelint it'll be "extends": "eslint-config-groupon/coffee" (similarly for stylus/css?) should we choose a new module name?

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 think eslint is the only one that cares about the naming. In theory we could just go for groupon-code-style or similar. IIRC eslint also accepts full package names..?

@dbushong
Copy link
Member

Shouldn't this be semver-major?

@jkrems
Copy link
Contributor Author

jkrems commented Aug 24, 2017

Re major: Yep! Let me reword the first commit to include the marker.

README.md Outdated
@@ -39,82 +26,25 @@ This ensures that:

Fortunately there already is a great and well-documented style guide for JavaScript over at [airbnb/javascript](https://github.com/airbnb/javascript).
The short answer is: We stick to that.
Copy link
Member

Choose a reason for hiding this comment

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

Is this even true or worth saying anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we should reword this. Maybe turn it into an acknowledgement of where we started.

Copy link
Member

@dbushong dbushong left a comment

Choose a reason for hiding this comment

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

🐑 it

@jkrems jkrems merged commit 4b96ff4 into master Aug 25, 2017
@jkrems jkrems deleted the jk-no-airbnb branch August 25, 2017 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants