Skip to content

Commit 00c5128

Browse files
Build working, types all good, one test failing - may be sweet state related
0 parents  commit 00c5128

File tree

102 files changed

+20892
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+20892
-0
lines changed

.eslintrc.js

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
module.exports = {
2+
parser: 'babel-eslint',
3+
env: {
4+
browser: true,
5+
es6: true,
6+
node: true,
7+
},
8+
extends: [
9+
'eslint:recommended',
10+
'plugin:react/recommended',
11+
'plugin:prettier/recommended',
12+
'prettier/react',
13+
],
14+
parserOptions: {
15+
ecmaFeatures: {
16+
jsx: true,
17+
},
18+
ecmaVersion: 2018,
19+
sourceType: 'module',
20+
},
21+
settings: {
22+
react: {
23+
version: 'detect',
24+
},
25+
},
26+
globals: {
27+
// enable webpack require
28+
require: 'readonly',
29+
// fix for eslint-plugin-flowtype/384 not supporting wildcard
30+
_: 'readonly',
31+
},
32+
plugins: ['react', 'react-hooks', 'import'],
33+
rules: {
34+
'no-shadow': ['error'],
35+
indent: ['off'],
36+
'linebreak-style': ['off'],
37+
quotes: ['off'],
38+
semi: ['off'],
39+
'newline-before-return': ['error'],
40+
'prettier/prettier': ['warn'],
41+
'react/no-direct-mutation-state': ['off'],
42+
'react/display-name': ['off'],
43+
'react-hooks/rules-of-hooks': ['error'],
44+
'react-hooks/exhaustive-deps': ['warn'],
45+
},
46+
overrides: [
47+
{
48+
// Flow specific rules
49+
files: [
50+
'src/index.js.flow',
51+
'src/server/index.js.flow',
52+
'*/*flow.js',
53+
'examples/*-flow/*/*.js',
54+
],
55+
extends: ['plugin:flowtype/recommended'],
56+
plugins: ['flowtype'],
57+
rules: {
58+
'flowtype/generic-spacing': ['off'],
59+
},
60+
},
61+
{
62+
// TypeScript specific rules
63+
files: ['*.{ts,tsx}'],
64+
extends: [
65+
'plugin:@typescript-eslint/recommended',
66+
'prettier/@typescript-eslint',
67+
],
68+
rules: {
69+
'@typescript-eslint/explicit-function-return-type': 'off',
70+
'@typescript-eslint/no-use-before-define': 'off',
71+
'@typescript-eslint/no-explicit-any': 'off',
72+
'@typescript-eslint/no-implicit-any': 'off',
73+
'@typescript-eslint/explicit-member-accessibility': 'off',
74+
'@typescript-eslint/no-non-null-assertion': 'off',
75+
'@typescript-eslint/no-empty-interface': 'off',
76+
'@typescript-eslint/ban-ts-ignore': 'off',
77+
},
78+
},
79+
{
80+
// Jest env
81+
files: ['test.{js,ts,tsx}'],
82+
env: {
83+
jest: true,
84+
},
85+
},
86+
],
87+
};

.flowconfig

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[ignore]
2+
3+
[include]
4+
5+
[libs]
6+
7+
[lints]
8+
9+
[options]
10+
module.name_mapper='^react-loosely-lazy' ->'<PROJECT_ROOT>/src'
11+
# Provides a way to suppress flow errors in the following line.
12+
# Example: // $FlowFixMe: This following line is borked because of reasons.
13+
# Example: // $ExpectError: This following line is correctly ignored by flow.
14+
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
15+
suppress_comment= \\(.\\|\n\\)*\\$ExpectError
16+
include_warnings=true
17+
server.max_workers=1
18+
19+
[strict]

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
build
3+
coverage
4+
yarn.lock
5+
6+
# misc
7+
local-scripts/
8+
.idea
9+
.vscode
10+
src/webpack/__tests__/__fixtures__/webpack/output

.npmignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
# Ignore dev files
3+
.vscode
4+
.circleci
5+
.editorconfig
6+
.eslintrc.js
7+
.prettierrc.js
8+
*.config.js
9+
*.config.*.js
10+
*.setup.js
11+
.flowconfig
12+
tsconfig.json
13+
14+
# Ignore source files
15+
src
16+
17+
# Ignore examples
18+
examples
19+
docs
20+
21+
# Ignore tests
22+
**/__tests__
23+
tests
24+
coverage
25+
26+
# Other stuff
27+
.DS_Store

.prettierrc.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
arrowParens: 'avoid',
3+
printWidth: 80,
4+
semi: true,
5+
singleQuote: true,
6+
tabWidth: 2,
7+
trailingComma: 'es5',
8+
};

CODE_OF_CONDUCT.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
6+
7+
Examples of unacceptable behavior by participants include:
8+
9+
* The use of sexualized language or imagery
10+
* Personal attacks
11+
* Trolling or insulting/derogatory comments
12+
* Public or private harassment
13+
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
14+
* Submitting contributions or comments that you know to violate the intellectual property or privacy rights of others
15+
* Other unethical or unprofessional conduct
16+
17+
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.
18+
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
19+
20+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
21+
22+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer. Complaints will result in a response and be reviewed and investigated in a way that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
23+
24+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.3.0, available at [http://contributor-covenant.org/version/1/3/0/][version]
25+
26+
[homepage]: http://contributor-covenant.org
27+
[version]: http://contributor-covenant.org/version/1/3/0/

CONTRIBUTING.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Contributing to react-loosely-lazy
2+
3+
Thank you for considering a contribution to [Project name]! Pull requests, issues and comments are welcome. For pull requests, please:
4+
5+
* Add tests for new features and bug fixes
6+
* Follow the existing style
7+
* Separate unrelated changes into multiple pull requests
8+
9+
See the existing issues for things to start contributing.
10+
11+
For bigger changes, please make sure you start a discussion first by creating an issue and explaining the intended change.
12+
13+
Atlassian requires contributors to sign a Contributor License Agreement, known as a CLA. This serves as a record stating that the contributor is entitled to contribute the code/documentation/translation to the project and is willing to have it used in distributions and derivative works (or is willing to transfer ownership).
14+
15+
Prior to accepting your contributions we ask that you please follow the appropriate link below to digitally sign the CLA. The Corporate CLA is for those who are contributing as a member of an organization and the individual CLA is for those contributing as an individual.
16+
17+
* [CLA for corporate contributors](https://na2.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=e1c17c66-ca4d-4aab-a953-2c231af4a20b)
18+
* [CLA for individuals](https://na2.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=3f94fbdc-2fbe-46ac-b14c-5d152700ae5d)

0 commit comments

Comments
 (0)