Skip to content

Commit 1274e1f

Browse files
authored
Merge pull request #4 from Yueleng/[email protected]
merge into main for main functions of react-select-reinvent
2 parents 9d245f8 + aefd417 commit 1274e1f

File tree

172 files changed

+39179
-1
lines changed

Some content is hidden

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

172 files changed

+39179
-1
lines changed

.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 0.25%
2+
ie 11
3+
not op_mini all

.changeset/config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "./getChangelogEntry",
4+
"commit": false,
5+
"linked": [],
6+
"access": "public"
7+
}

.changeset/getChangelogEntry.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
require("dotenv").config();
2+
const { getInfo } = require("@changesets/get-github-info");
3+
4+
const getReleaseLine = async (changeset, type) => {
5+
const [firstLine, ...futureLines] = changeset.summary
6+
.split("\n")
7+
.map((l) => l.trimRight());
8+
let { links } = await getInfo({
9+
repo: "yueleng/react-select-reinvent",
10+
commit: changeset.commit,
11+
});
12+
return `- ${links.commit}${links.pull === null ? "" : ` ${links.pull}`}${
13+
links.user === null ? "" : ` Thanks ${links.user}!`
14+
} - ${firstLine}\n${futureLines.map((l) => ` ${l}`).join("\n")}`;
15+
};
16+
17+
const getDependencyReleaseLine = async (changesets, dependenciesUpdated) => {
18+
if (dependenciesUpdated.length === 0) return "";
19+
20+
const changesetLinks = changesets.map(
21+
(changeset) => `- Updated dependencies [${changeset.commit}]:`
22+
);
23+
24+
const updatedDepenenciesList = dependenciesUpdated.map(
25+
(dependency) => ` - ${dependency.name}@${dependency.version}`
26+
);
27+
28+
return [...changesetLinks, ...updatedDepenenciesList].join("\n");
29+
};
30+
31+
module.exports = {
32+
getReleaseLine,
33+
getDependencyReleaseLine,
34+
};

.circleci/config.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
version: 2
2+
3+
docker_defaults: &docker_defaults
4+
docker:
5+
- image: cypress/browsers:node16.17.1-chrome106-ff105-edge
6+
environment:
7+
TERM: xterm
8+
working_directory: ~/project/repo
9+
10+
attach_workspace: &attach_workspace
11+
attach_workspace:
12+
at: ~/project
13+
14+
install_steps: &install_steps
15+
steps:
16+
- checkout
17+
- restore_cache:
18+
name: Restore node_modules cache
19+
keys:
20+
- dependency-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
21+
- dependency-cache-{{ .Branch }}-
22+
- dependency-cache-
23+
- cache-{{ checksum "package.json" }}
24+
- run:
25+
name: Installing Dependencies
26+
command: |
27+
yarn install --silent
28+
- save_cache:
29+
name: Save node_modules cache
30+
key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
31+
paths:
32+
- ~/.cache
33+
- persist_to_workspace:
34+
root: ~/project
35+
paths:
36+
- repo
37+
38+
workflows:
39+
version: 2
40+
build_pipeline:
41+
jobs:
42+
- build
43+
- unit_test:
44+
requires:
45+
- build
46+
- end_to_end:
47+
requires:
48+
- build
49+
jobs:
50+
build:
51+
<<: *docker_defaults
52+
<<: *install_steps
53+
unit_test:
54+
<<: *docker_defaults
55+
steps:
56+
- *attach_workspace
57+
- run:
58+
name: Running unit tests
59+
command: |
60+
yarn prettier:check
61+
yarn lint
62+
yarn type-check
63+
yarn test:jest
64+
yarn coveralls
65+
end_to_end:
66+
<<: *docker_defaults
67+
steps:
68+
- *attach_workspace
69+
- run:
70+
name: Running E2E tests
71+
command: |
72+
yarn global add cypress
73+
yarn install --silent
74+
yarn cypress install
75+
yarn e2e

.codesandbox/ci.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"buildCommand": "build",
3+
"packages": ["packages/*"],
4+
"sandboxes": ["nfmxw"],
5+
"node": "16"
6+
}

.coveralls.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
service-name: travis-ci
2+
repo_token: itdMRdBNgDK8Gb5nIA63zVMEryaxTQxkR

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
root = true
4+
5+
[*]
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
indent_style = space
11+
indent_size = 2
12+
13+
[*.md]
14+
trim_trailing_whitespace = false
15+
16+
[.circleci/config.yml]
17+
indent_size = 4

.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
coverage/*
2+
cypress/plugins/*
3+
cypress/support/*
4+
**/dist/*
5+
lib/*
6+
node_modules/*
7+
**/node_modules/*

.eslintrc.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
module.exports = {
2+
extends: ["plugin:react-hooks/recommended", "plugin:@typescript-eslint/base"],
3+
parser: "@typescript-eslint/parser",
4+
env: {
5+
browser: true,
6+
es6: true,
7+
node: true,
8+
},
9+
plugins: ["react", "@typescript-eslint"],
10+
rules: {
11+
"@typescript-eslint/no-unused-vars": [
12+
"error",
13+
{
14+
args: "after-used",
15+
argsIgnorePattern: "^event$",
16+
ignoreRestSiblings: true,
17+
vars: "all",
18+
varsIgnorePattern: "jsx|emotionJSX",
19+
},
20+
],
21+
curly: [2, "multi-line"],
22+
"jsx-quotes": 2,
23+
"no-shadow": 0,
24+
"@typescript-eslint/no-shadow": 2,
25+
"no-trailing-spaces": 1,
26+
"no-underscore-dangle": 1,
27+
"@typescript-eslint/no-unused-expressions": 1,
28+
"object-curly-spacing": [1, "always"],
29+
// quotes: "off",
30+
// "@typescript-eslint/quotes": "error",
31+
"@typescript-eslint/quotes": [2, "double", "avoid-escape"],
32+
"react/jsx-boolean-value": 1,
33+
"react/jsx-no-undef": 1,
34+
"react/jsx-uses-react": 1,
35+
"react/jsx-uses-vars": 1,
36+
"react/jsx-wrap-multilines": 1,
37+
"react/no-did-mount-set-state": 1,
38+
"react/no-did-update-set-state": 1,
39+
"react/no-unknown-property": 1,
40+
"react/react-in-jsx-scope": 1,
41+
"react/self-closing-comp": 1,
42+
"react/sort-prop-types": 1,
43+
"@typescript-eslint/semi": 2,
44+
"@typescript-eslint/no-inferrable-types": 2,
45+
strict: 0,
46+
},
47+
settings: {
48+
react: {
49+
version: "detect",
50+
},
51+
},
52+
};

.github/CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
3+
Thanks for your interest in React-Select-Reinvent. All forms of contribution are
4+
welcome, from issue reports to PRs and documentation / write-ups.
5+
6+
Before you open a PR:
7+
8+
- In development, run `yarn start` to build (+watch) the project source, and run
9+
the [development server](http://localhost:8000).
10+
- Please ensure all the examples work correctly after your change. If you're
11+
adding a major new use-case, add a new example demonstrating its use.
12+
- Be careful to follow the code style of the project. Run `yarn lint` after
13+
your changes and ensure you do not introduce any new errors or warnings.
14+
- This repository uses TypeScript, please run `yarn type-check` after your changes to ensure
15+
that you do not introduce any new type errors.
16+
17+
- Ensure that your effort is aligned with the project's roadmap by talking to
18+
the maintainers, especially if you are going to spend a lot of time on it.
19+
- Make sure there's an issue open for any work you take on and intend to submit
20+
as a pull request - it helps core members review your concept and direction
21+
early and is a good way to discuss what you're planning to do.
22+
- If you open an issue and are interested in working on a fix, please let us
23+
know. We'll help you get started, rather than adding it to the queue.
24+
- Make sure you do not add regressions by running `yarn test`.
25+
- Where possible, include tests with your changes, either that demonstrates the
26+
bug, or tests the new functionality. If you're not sure how to test your
27+
changes, feel free to ping @gwyneplaine or @JedWatson
28+
- Run `yarn coveralls` to check that the coverage hasn't dropped, and look at the
29+
report (under the generated `coverage` directory) to check that your changes are
30+
covered

0 commit comments

Comments
 (0)