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

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian McKenzie committed Feb 27, 2020
0 parents commit 1a81dfc
Show file tree
Hide file tree
Showing 8,958 changed files with 1,484,891 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 10 additions & 0 deletions .editorconfig
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.js]
indent_style = space
indent_size = 2
76 changes: 76 additions & 0 deletions .github/CODE_OF_CONDUCT.md
@@ -0,0 +1,76 @@
# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, 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 within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
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 <opensource-conduct@fb.com>. 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 https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
35 changes: 35 additions & 0 deletions .github/CONTRIBUTING.md
@@ -0,0 +1,35 @@
# Contributing

We can use help in a bunch of areas and any help is appreciated. Our [GitHub issues](https://github.com/romejs/rome/issues) serve as a place for any discussion, wheter it's bug reports, questions, project direction etc. As the project grows this policy may change.

Our [Discord server](https://discord.gg/9WxHa5d) is open for help and more adhoc discussion. All activity on the Discord is still moderated and will be strictly enforced under the project's [Code of Conduct](.github/CODE_OF_CONDUCT.md).

## Getting Started

Getting started with developing Rome is as easy as three commands. You will need Node v12 or above.

```
$ git clone https://github.com/romejs/rome
$ cd rome
$ scripts/dev-rome --help
```

No dependency installation step is required as we check in our [`node_modules`](node_modules) folder that contains only a copy of TypeScript and some definitions.

## Testing

You can run the test suite with the following command:

```
$ scripts/dev-rome test
```

This will run all tests inside of any `__rtests__` directories.

## Type Checking

Run TypeScript with code emitting disabled to perform a full typecheck outside the editor.

```
$ node_modules/.bin/tsc --noEmit
```
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug.md
@@ -0,0 +1,21 @@
---
name: '🐛 Bug Report'
about: Report a bug or regression
title: ''
labels: 'bug'
---

Description:

Please provide a clear and concise description of what the bug is. Include screenshots if needed.

## Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.
Issues without reproduction steps or code are likely to stall.

1. 2.

## Expected Results

Describe what you expected to happen.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/02_question.md
@@ -0,0 +1,8 @@
---
name: '🤔 Question'
about: Ask a question about the project
title: ''
labels: 'question'
---

Hey! I have a question about the project.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/03_support.md
@@ -0,0 +1,8 @@
---
name: '🚑 Support'
about: Ask for usage support
title: ''
labels: 'support'
---

Hey! I'm having trouble with something.
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/04_task.md
@@ -0,0 +1,6 @@
---
name: '🚀 Task'
about: Actionable tasks to do something
title: ''
labels: ''
---
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/05_discussion.md
@@ -0,0 +1,6 @@
---
name: '🗣️ Discussion'
about: Start a discussion
title: ''
labels: 'discussion'
---
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/06_umbrella.md
@@ -0,0 +1,6 @@
---
name: '☂️ Umbrella'
about: A task to track a collection of other tasks
title: '☂️ '
labels: 'umbrella'
---
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/07_other.md
@@ -0,0 +1,6 @@
---
name: '💭 Other'
about: Issues that don't fit under anything else
title: ''
labels: ''
---
Empty file.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,49 @@
name: CI
on: [push, pull_request]

jobs:
typescript:
runs-on: ubuntu-latest
name: TypeScript Check

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '13.x'
- name: Run TypeScript
run: node ./node_modules/.bin/tsc --noEmit

tests:
name: Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '13.x'
- name: Run tests
run: ./scripts/dev-rome test

build:
name: Build
runs-on: ubuntu-latest
needs: [typescript, tests]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '13.x'

- name: Build release
run: ./scripts/build-release dist

- name: Create tarball
run: tar -C dist -czvf dist.tar.gz .

- name: Upload tarball
uses: actions/upload-artifact@v1
with:
name: package.tgz
path: dist.tar.gz
21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Facebook, Inc. and its affiliates.

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 the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
65 changes: 65 additions & 0 deletions README.md
@@ -0,0 +1,65 @@
<p align="center">
<img alt="babel" src="assets/logo_with_text.png" width="546">
</p>

**Rome** is an experimental JavaScript toolchain. It includes a compiler, linter, formatter, bundler, testing framework and more. It aims to be a comprehensive tool for anything related to the processing of JavaScript source code.

**Rome** is not a collection of existing tools. All components are custom and use no third-party dependencies.

**Rome** is experimental and in active development. It's open for contributors and those interested in experimental tools. **It is not ready for production usage. The only way to use it is to build from source.**

**Rome** aims to be a replacement for many existing JavaScript tools. We will, however, offer integrations for components in other tools. For example, using the Rome compiler as a plugin for another bundler.

**Rome** is [MIT licensed](LICENSE), and the project managed under the [Contributor Covenant Code of Conduct](.github/CODE_OF_CONDUCT.md).

## History

**Rome** was started by [Sebastian McKenzie](https://twitter.com/sebmck), the author of [Babel](https://babeljs.io) and [Yarn](https://yarnpkg.com).

**Rome** is a project from the [React Native](https://github.com/facebook/react-native/) team at Facebook.

**Rome** gets its name from proverbs such as "All Roads Lead to Rome", "Rome wasn't built in a day" and "When in Rome, do as the Romans do". This refers to the expansive scope and the desire for conformity across the project. It started as a joke at the office.

**Rome** has a logo of an ancient Greek spartan helmet. It's not very relevant since it's not Roman, but it looks cooler than a [Galea](<https://en.wikipedia.org/wiki/Galea_(helmet)>).

## Codebase

**Rome** is written completely in TypeScript with sparing usage of loose types.

**Rome** is a monorepo with [internal packages](packages/@romejs) to delineate code boundaries.

**Rome** is [self-hosted](<https://en.wikipedia.org/wiki/Self-hosting_(compilers)>) and compiles itself with an old version.

**Rome** supports processing [JSX](https://reactjs.org/docs/introducing-jsx.html) as well as [Flow](https://flow.org/) and [TypeScript](https://www.typescriptlang.org/) annotated code.

See [CONTRIBUTING](.github/CONTRIBUTING.md) for more information.

## Status

The current area of focus is **linting**. See the umbrella task [#20](https://github.com/facebookexperimental/rome/issues/20) for tracking.

## Philosophy

This list includes general ethos the project should abide by. This list is not comprehensive. Some of these are obvious but are stated for completeness.

### Project Management

- **Set clear expectations.** Make project intent and decisions known well in advance. Nothing should be a surprise.
- **Transparency.** No back-channel project management. Project conversation and decisions will take place only on public forums such as GitHub, the Rome Discord, and Twitter. The only exception to this is moderation decisions which will be strictly done in private.

### Technical

- **No external dependencies.** This allows us to develop faster and provide a more cohesive experience by integrating internal libraries more tightly and sharing concepts and abstractions. There always exist opportunities to have a better experience by having something purpose-built.
- **Errors should suggest fixes and hints where possible.** These should be inferred and filtered from usage to reduce surfacing irrelevant and unhelpful messages.
- **Unique and specific error messages.** No generic error messages. This not only helps users understand what went wrong, but should provide maintainers with a unique call site and the necessary information to debug.
- **Minimize API.** Question the existence of all options and flags. Are they necessary? Can they be combined? How can we reduce code branching?
- **Reduce jargon.** Don't assume that users will understand specific terminology. Strive to provide clear meaning for experts and beginners. For example, use "character" where you would traditionally use "token" when producing parser errors.
- **Utilize verbosity when naming commands and flags.** No unnecessary and confusing abbreviations.
- **Use inclusive terminology.** Use gender-neutral pronouns. No ableist slurs. No usage of terms that could be considered insensitive.
- **Build for generic clients.** Don't assume that output will only be consumed by a terminal and using ANSI codes. Use abstractions that could be generalized for viewing in an IDE, browser, or other environments.
- **Use strong types.** Don't use loose types such as `any`. Where possible, refine and validate input. Aim for sound types.
- **Terminal output should be unambiguous.** When designing terminal output, don't purely rely on formatting cues such as color. Always use a combination of formatting, symbols, and spacing. If all ANSI codes are striped, all the output should still be understood.

## Community

Additional project coordination and realtime discussion happens on our [Discord server](https://discord.gg/9WxHa5d). Remember that all activity on the Discord is still moderated and will be strictly enforced under the project's [Code of Conduct](.github/CODE_OF_CONDUCT.md).
Binary file added assets/logo_with_text.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions node_modules/.bin/tsc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/tsserver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions node_modules/@types/node/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions node_modules/@types/node/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1a81dfc

Please sign in to comment.