Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
feat($prettier-eslint): Integrate prettier-eslint
Browse files Browse the repository at this point in the history
As discussed in:
- #57
- kentcdodds/prettier-eslint-atom#28
- prettier/prettier#758

This commit completely refactors the repo. We now allow using
prettier-eslint as an option so that you do not need to install
a separate plugin (prettier-eslint-atom).

Under the hood, almost all of the code has been refactored and
covered by Jest integration tests. We also implement Babel and
many of the devops/build configurations that Kent Dodds authored
in the prettier-eslint-atom repo.

Resolves #57
  • Loading branch information
robwise committed Mar 4, 2017
1 parent 9a05140 commit 2622404
Show file tree
Hide file tree
Showing 68 changed files with 11,535 additions and 222 deletions.
135 changes: 135 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"projectName": "prettier-atom",
"projectOwner": "robwise",
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "jlongster",
"name": "James Long",
"avatar_url": "https://avatars.githubusercontent.com/u/17031?v=3",
"profile": "http://jlongster.com",
"contributions": [
"question",
"code",
"doc",
"plugin",
"review"
]
},
{
"login": "robwise",
"name": "Rob Wise",
"avatar_url": "https://avatars.githubusercontent.com/u/6173488?v=3",
"profile": "https://robwise.github.io",
"contributions": [
"code",
"doc"
]
},
{
"login": "kentcdodds",
"name": "Kent C. Dodds",
"avatar_url": "https://avatars.githubusercontent.com/u/1500684?v=3",
"profile": "https://kentcdodds.com",
"contributions": [
"code",
"doc",
"infra"
]
},
{
"login": "cloud-walker",
"name": "Luca Barone",
"avatar_url": "https://avatars.githubusercontent.com/u/1144075?v=3",
"profile": "https://github.com/cloud-walker",
"contributions": []
},
{
"login": "arnarthor",
"name": "Arnar Þór Sveinsson",
"avatar_url": "https://avatars.githubusercontent.com/u/4514159?v=3",
"profile": "https://github.com/arnarthor",
"contributions": [
"code"
]
},
{
"login": "skevy",
"name": "Adam Miskiewicz",
"avatar_url": "https://avatars.githubusercontent.com/u/131916?v=3",
"profile": "http://www.adammiskiewicz.com/",
"contributions": [
"code"
]
},
{
"login": "oriSomething",
"name": "Ori Livni",
"avatar_url": "https://avatars.githubusercontent.com/u/2685242?v=3",
"profile": "http://www.orilivni.com",
"contributions": [
"code"
]
},
{
"login": "transcranial",
"name": "Leon Chen",
"avatar_url": "https://avatars.githubusercontent.com/u/6182852?v=3",
"profile": "https://transcranial.github.io",
"contributions": [
"code"
]
},
{
"login": "vjeux",
"name": "Christopher Chedeau",
"avatar_url": "https://avatars.githubusercontent.com/u/197597?v=3",
"profile": "http://blog.vjeux.com/",
"contributions": [
"question",
"code",
"plugin"
]
},
{
"login": "1st8",
"name": "Christoph Geschwind",
"avatar_url": "https://avatars.githubusercontent.com/u/646693?v=3",
"profile": "http://christoph-geschwind.de",
"contributions": [
"code"
]
},
{
"login": "ahutchings",
"name": "Andrew Hutchings",
"avatar_url": "https://avatars.githubusercontent.com/u/35026?v=3",
"profile": "https://andrewhutchings.com",
"contributions": [
"code"
]
},
{
"login": "schnerd",
"name": "David Schnurr",
"avatar_url": "https://avatars.githubusercontent.com/u/875591?v=3",
"profile": "http://davidschnurr.com",
"contributions": [
"code"
]
},
{
"login": "ryancole",
"name": "Ryan Cole",
"avatar_url": "https://avatars.githubusercontent.com/u/484801?v=3",
"profile": "http://rycole.com/",
"contributions": [
"code"
]
}
]
}
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": [["env", { "electron": 1.4 }], "stage-2"],
"plugins": ["transform-flow-strip-types"]
}
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.nyc_output
coverage
dist
flow-typed/npm
23 changes: 23 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
extends:
- airbnb-base
- plugin:flowtype/recommended
- plugin:jest/recommended

parser: babel-eslint

plugins:
- flowtype
- jest

globals:
atom: true

env:
node: true
jest: true

rules:
no-confusing-arrow: 0 # not that confusing
max-len:
- 2
- 110
9 changes: 9 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[ignore]
dist

[include]

[libs]
decls/

[options]
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.js text eol=lf
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
node_modules
npm-debug.log
.nyc_output
coverage
.opt-in
.opt-out
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- '6'
script:
- yarn start validate
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at kent+coc@doddsfamily.us. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
67 changes: 67 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Contributing

Thanks for being willing to contribute!

**Working on your first Pull Request?** You can learn how from this *free* series
[How to Contribute to an Open Source Project on GitHub][egghead]

## Project setup

1. Fork and clone the repo
2. `$ yarn install` to install dependencies
3. `$ yarn start validate` to validate you've got it working
4. Create a branch for your PR

This project uses [`nps`][nps] and you can run `yarn start` to see what scripts are available.

## Add yourself as a contributor

This project follows the [all contributors][all-contributors] specification. To add yourself to the table of
contributors on the README.md, please use the automated script as part of your PR:

```console
yarn start addContributor <YOUR_GITHUB_USERNAME>
```

Follow the prompt. If you've already added yourself to the list and are making a new type of contribution, you can run
it again and select the added contribution type.

## Committing and Pushing changes

This project uses [`semantic-release`][semantic-release] to do automatic releases and generate a changelog based on the
commit history. So we follow [a convention][convention] for commit messages. Please follow this convention for your
commit messages.

You can use `commitizen` to help you to follow [the convention][convention]

Once you are ready to commit the changes, please use the below commands

1. `git add <files to be comitted>`
2. `$ yarn start commit`

... and follow the instruction of the interactive prompt.

### opt into git hooks

There are git hooks set up with this project that are automatically installed when you install dependencies. They're
really handy, but are turned off by default (so as to not hinder new contributors). You can opt into these by creating
a file called `.opt-in` at the root of the project and putting this inside:

```
commit-msg
pre-commit
```

## Help needed

Please checkout the [ROADMAP.md][ROADMAP] and raise an issue to discuss
any of the items in the want to do or might do list.

Also, please watch the repo and respond to questions/bug reports/feature requests! Thanks!

[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
[semantic-release]: https://npmjs.com/package/semantic-release
[convention]: https://github.com/conventional-changelog/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
[all-contributors]: https://github.com/kentcdodds/all-contributors
[ROADMAP]: ./ROADMAP.md
[nps]: https://www.npmjs.com/package/nps
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) Stephen Kubovic
Copyright (c) Rob Wise

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down

0 comments on commit 2622404

Please sign in to comment.