-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0fb4fef
Showing
324 changed files
with
475,660 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
{ | ||
"settings": { | ||
"react": { | ||
"pragma": "React", | ||
"version": "17.0", | ||
"flowVersion": "0.214.0" // Flow version | ||
}, | ||
"ft-flow": { | ||
"onlyFilesWithFlowAnnotation": true | ||
} | ||
}, | ||
// babel parser to support ES6/7 features | ||
"parser": "hermes-eslint", | ||
"extends": [ | ||
"plugin:ft-flow/recommended", | ||
"prettier" | ||
], | ||
"plugins": [ | ||
"ft-flow", | ||
"react" | ||
], | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"jest": true, | ||
"node": true | ||
}, | ||
"ignorePatterns": [ | ||
"build", | ||
"coverage", | ||
"dist", | ||
"lib", | ||
"node_modules", | ||
"nextjs-example" | ||
], | ||
"globals": { | ||
"$Call": "readonly", | ||
"$Diff": "readonly", | ||
"$ElementType": "readonly", | ||
"$Exact": "readonly", | ||
"$FlowFixMe": "readonly", | ||
"$Keys": "readonly", | ||
"$NonMaybeType": "readonly", | ||
"$ObjMap": "readonly", | ||
"$ObjMapConst": "readonly", | ||
"$ObjMapi": "readonly", | ||
"$PropertyType": "readonly", | ||
"$ReactOnly": "readonly", | ||
"$ReactOnlyArray": "readonly", | ||
"$ReadOnlyMap": "readonly", | ||
"$ReadOnlySet": "readonly", | ||
"$Rest": "readonly", | ||
"$TupleMap": "readonly", | ||
"$Values": "readonly", | ||
"Partial": "readonly" | ||
}, | ||
"rules": { | ||
"camelcase": 0, | ||
"constructor-super": 2, | ||
"default-case": [2, { "commentPattern": "^no default$" }], | ||
"eqeqeq": [2, "allow-null"], | ||
"handle-callback-err": [2, "^(err|error)$" ], | ||
"new-cap": [2, { "newIsCap": true, "capIsNew": false }], | ||
"no-alert": 1, | ||
"no-array-constructor": 2, | ||
"no-caller": 2, | ||
"no-case-declarations": 2, | ||
"no-class-assign": 2, | ||
"no-cond-assign": 2, | ||
"no-const-assign": 2, | ||
"no-control-regex": 2, | ||
"no-debugger": 2, | ||
"no-delete-var": 2, | ||
"no-dupe-args": 2, | ||
"no-dupe-class-members": 2, | ||
"no-dupe-keys": 2, | ||
"no-duplicate-case": 2, | ||
"no-empty-character-class": 2, | ||
"no-empty-pattern": 2, | ||
"no-eval": 2, | ||
"no-ex-assign": 2, | ||
"no-extend-native": 2, | ||
"no-extra-bind": 2, | ||
"no-extra-boolean-cast": 2, | ||
"no-fallthrough": 2, | ||
"no-floating-decimal": 2, | ||
"no-func-assign": 2, | ||
"no-implied-eval": 2, | ||
"no-inner-declarations": [2, "functions"], | ||
"no-invalid-regexp": 2, | ||
"no-irregular-whitespace": 2, | ||
"no-iterator": 2, | ||
"no-label-var": 2, | ||
"no-labels": [2, { "allowLoop": false, "allowSwitch": false }], | ||
"no-lone-blocks": 2, | ||
"no-loop-func": 2, | ||
"no-multi-str": 2, | ||
"no-native-reassign": 2, | ||
"no-negated-in-lhs": 2, | ||
"no-new": 2, | ||
"no-new-func": 2, | ||
"no-new-object": 2, | ||
"no-new-require": 2, | ||
"no-new-symbol": 2, | ||
"no-new-wrappers": 2, | ||
"no-obj-calls": 2, | ||
"no-octal": 2, | ||
"no-octal-escape": 2, | ||
"no-path-concat": 2, | ||
"no-proto": 2, | ||
"no-redeclare": 2, | ||
"no-regex-spaces": 2, | ||
"no-return-assign": [2, "except-parens"], | ||
"no-script-url": 2, | ||
"no-self-assign": 2, | ||
"no-self-compare": 2, | ||
"no-sequences": 2, | ||
"no-shadow-restricted-names": 2, | ||
"no-sparse-arrays": 2, | ||
"no-this-before-super": 2, | ||
"no-throw-literal": 2, | ||
"no-undef": 0, | ||
"no-undef-init": 2, | ||
"no-unexpected-multiline": 2, | ||
"no-unmodified-loop-condition": 2, | ||
"no-unneeded-ternary": [2, { "defaultAssignment": false }], | ||
"no-unreachable": 2, | ||
"no-unsafe-finally": 2, | ||
"no-unused-vars": [2, { "vars": "all", "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }], | ||
"no-useless-call": 2, | ||
"no-useless-computed-key": 2, | ||
"no-useless-concat": 2, | ||
"no-useless-constructor": 2, | ||
"no-useless-escape": 2, | ||
"no-var": 2, | ||
"no-with": 2, | ||
"prefer-const": 2, | ||
"prefer-rest-params": 2, | ||
"quotes": [2, "single", "avoid-escape"], | ||
"radix": 2, | ||
"use-isnan": 2, | ||
"valid-typeof": 2, | ||
"yoda": [2, "never"], | ||
|
||
// flow | ||
"ft-flow/space-after-type-colon": [2, "always", {"allowLineBreak": true}], | ||
"ft-flow/generic-spacing": 0, | ||
|
||
// react | ||
"react/display-name": 0, | ||
"react/jsx-no-bind": 0, | ||
"react/jsx-no-duplicate-props": 2, | ||
"react/jsx-no-undef": 2, | ||
"react/jsx-pascal-case": 2, | ||
"react/jsx-sort-props": 2, | ||
"react/jsx-uses-react": 2, | ||
"react/jsx-uses-vars": 2, | ||
"react/no-did-mount-set-state": 0, | ||
"react/no-did-update-set-state": 2, | ||
"react/no-direct-mutation-state": 2, | ||
"react/no-multi-comp": 0, | ||
"react/no-string-refs": 2, | ||
"react/no-unknown-property": 2, | ||
"react/prefer-es6-class": 2, | ||
"react/prop-types": 0, | ||
"react/react-in-jsx-scope": 0, | ||
"react/self-closing-comp": 2, | ||
"react/sort-comp": 0, | ||
"react/sort-prop-types": 2, | ||
"react/wrap-multilines": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[version] | ||
0.220.0 | ||
|
||
[ignore] | ||
.*/build/.* | ||
.*/dist/.* | ||
.*/lib/.* | ||
.*/malformed_package_json/.* | ||
.*/next-example/.* | ||
|
||
[include] | ||
|
||
[libs] | ||
flow-typed | ||
|
||
[lints] | ||
|
||
[options] | ||
emoji=true | ||
exact_by_default=true | ||
experimental.const_params=true | ||
module.use_strict=true | ||
munge_underscores=true | ||
suppress_type=$FlowFixMe | ||
suppress_type=$FlowTODO | ||
module.name_mapper='^@stylexjs\/shared$' -> '<PROJECT_ROOT>/packages/shared/src/index.js' | ||
module.name_mapper='^@stylexjs\/shared\/lib\/\([a-zA-Z0-9_\-]+\)$' -> '<PROJECT_ROOT>/packages/shared/src/\1' | ||
module.name_mapper='^@stylexjs/stylex$' -> '<PROJECT_ROOT>/packages/stylex/src/stylex.js' | ||
module.name_mapper='^@stylexjs/stylex\/lib\/\([a-zA-Z0-9_\-]+\)$' -> '<PROJECT_ROOT>/packages/stylex/src/\1' | ||
; type-stubs | ||
module.system.node.resolve_dirname=flow_modules | ||
module.system.node.resolve_dirname=node_modules | ||
|
||
|
||
[strict] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# 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. | ||
|
||
This Code of Conduct also applies outside the project spaces when there is a | ||
reasonable belief that an individual's behavior may have a negative impact on | ||
the project or its community. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at <[email protected]>. 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Contributing | ||
|
||
## Reporting Issues and Asking Questions | ||
|
||
Before opening an issue, please search the issue tracker to make sure your issue | ||
hasn't already been reported. Please note that your issue may be closed if it | ||
doesn't include the information requested in the issue template. | ||
|
||
## Getting started | ||
|
||
Visit the issue tracker to find a list of open issues that need attention. | ||
|
||
Fork, then clone the repo: | ||
|
||
``` | ||
git clone https://github.com/your-username/stylex.git | ||
``` | ||
|
||
Make sure you have npm@>=7 and node@>=16 installed. Then install the package | ||
dependencies: | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
## Automated tests | ||
|
||
To run the linter: | ||
|
||
``` | ||
npm run lint | ||
``` | ||
|
||
To run flow: | ||
|
||
``` | ||
npm run flow | ||
``` | ||
|
||
To run all the unit tests: | ||
|
||
``` | ||
npm run test | ||
``` | ||
|
||
…in watch mode: | ||
|
||
``` | ||
npm run test -- --watch | ||
``` | ||
|
||
## Compile and build | ||
|
||
To compile the source code: | ||
|
||
``` | ||
npm run build | ||
``` | ||
|
||
### New Features | ||
|
||
Please, familiarize yourself with | ||
[StyleX's goals and architectural principles](https://stylex-docusaurus.vercel.app/docs/learn/thinking-in-stylex/), | ||
and open an issue with a proposal when suggesting a new feature of behavioural | ||
change. We don't want you to waste your efforts on a pull request that we won't | ||
want to accept. | ||
|
||
## Pull requests | ||
|
||
**Before submitting a pull request**, please make sure the following is done: | ||
|
||
1. Fork the repository and create your branch from `main`. | ||
2. If you've added code that should be tested, add tests! | ||
3. If you've changed APIs, update the documentation. | ||
4. Ensure the tests pass (`npm run test`). | ||
|
||
You can now submit a pull request, referencing any issues it addresses. | ||
|
||
Please try to keep your pull request focused in scope and avoid including | ||
unrelated commits. | ||
|
||
After you have submitted your pull request, we'll try to get back to you as soon | ||
as possible. We may suggest some changes or improvements. | ||
|
||
Thank you for contributing! |
Oops, something went wrong.