-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build(root): Initial project scaffolding #2
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
05d6752
chore: lerna init
f623fb3
chore: typescript init
163a05b
chore: set yarn as npm client for lerna
f7baef3
chore: add dev deps typescript, jest
8cde185
chore: add editor config
5baf5fb
chore: add git ignore
c412301
chore: add typescript config with minimal overrides
85ac589
chore: add dev dep eslint typescript plugin with minimal eslint config
343ca82
chore: add dev dep jest eslint plugin
08f0a43
chore: add prettier eslint plugins, config
1d7b7ea
chore: add scaffolding for ruleset package
8a0ad5a
chore: add yarn lock file
df24f10
doc: Add readme with high-level outline of packages
5a080b8
doc: Add license, code of conduct
9ffae41
doc: add eslint plugin to check/fix copyright header
03ed0de
chore: update prettier config to sync with editorconfig
d3db063
build: add deps, config to lint git commits
4a183fa
ci(root): add ci workflow based on github actions
1bc9a35
build(root): add deps, config for typescript jest integration
303b9c2
build(root): mark generated files for github
f866783
build(root): add explicit public npm registry to override internal
3fdfb3b
doc(root): rename readme, white-space reformat, add TBD status
61a5d12
build(root): add ci,changelog,build npm scripts;switch to npm@12 for ci
f390e1a
build(root): add node engines, update version of package, set exact
9ca1584
docs(root): add contribution guide
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,11 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.{json,yml}] | ||
indent_size = 2 |
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,37 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: ['./tsconfig.json'], | ||
}, | ||
plugins: [ | ||
'@typescript-eslint', | ||
'jest', | ||
'prettier', | ||
'notice', // checks for and fixes copyright header in each file | ||
], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
'plugin:jest/recommended', | ||
'plugin:jest/style', | ||
'plugin:prettier/recommended', | ||
'prettier/@typescript-eslint', | ||
], | ||
rules: { | ||
'notice/notice': [ | ||
'error', | ||
{ | ||
templateFile: 'license-header.txt', | ||
}, | ||
], | ||
}, | ||
env: { | ||
browser: true, | ||
node: true, | ||
}, | ||
ignorePatterns: ['node_modules', 'dist', 'coverage'], | ||
}; |
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,9 @@ | ||
# Mark generated files so that github can better display diffs in PRs | ||
# https://help.github.com/articles/customizing-how-changed-files-appear-on-github/ | ||
# https://github.com/github/linguist#using-gitattributes | ||
# https://www.git-scm.com/docs/gitignore#_pattern_format | ||
# | ||
# Mark generated files | ||
yarn.lock linguist-generated=true | ||
# generated JS files | ||
dist/* linguist-generated=true |
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,8 @@ | ||
*.log | ||
.DS_Store | ||
.vscode/ | ||
.idea/ | ||
.project/ | ||
packages/**/dist/ | ||
node_modules/ | ||
coverage/ |
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,2 @@ | ||
@types:registry=https://registry.npmjs.org/ | ||
registry=https://registry.npmjs.org/ | ||
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,6 @@ | ||
module.exports = { | ||
tabWidth: 4, | ||
printWidth: 120, | ||
singleQuote: true, | ||
trailingComma: 'es5' | ||
}; |
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,105 @@ | ||
# Salesforce Open Source Community Code of Conduct | ||
|
||
## About the Code of Conduct | ||
|
||
Equality is a core value at Salesforce. We believe a diverse and inclusive | ||
community fosters innovation and creativity, and are committed to building a | ||
culture where everyone feels included. | ||
|
||
Salesforce open-source projects are committed to providing a friendly, safe, and | ||
welcoming environment for all, regardless of gender identity and expression, | ||
sexual orientation, disability, physical appearance, body size, ethnicity, nationality, | ||
race, age, religion, level of experience, education, socioeconomic status, or | ||
other similar personal characteristics. | ||
|
||
The goal of this code of conduct is to specify a baseline standard of behavior so | ||
that people with different social values and communication styles can work | ||
together effectively, productively, and respectfully in our open source community. | ||
It also establishes a mechanism for reporting issues and resolving conflicts. | ||
|
||
All questions and reports of abusive, harassing, or otherwise unacceptable behavior | ||
in a Salesforce open-source project may be reported by contacting the Salesforce | ||
Open Source Conduct Committee at ossconduct@salesforce.com. | ||
|
||
## 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 gender | ||
identity and expression, sexual orientation, disability, physical appearance, | ||
body size, ethnicity, nationality, race, age, religion, level of experience, education, | ||
socioeconomic status, or other similar personal characteristics. | ||
|
||
## 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 toward other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Personal attacks, insulting/derogatory comments, or trolling | ||
* Public or private harassment | ||
* Publishing, or threatening to publish, 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 | ||
* Advocating for or encouraging any of the above behaviors | ||
|
||
## 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 with 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 email | ||
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 Salesforce Open Source Conduct Committee | ||
at ossconduct@salesforce.com. All complaints will be reviewed and investigated | ||
and will result in a response that is deemed necessary and appropriate to the | ||
circumstances. The committee 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 and the Salesforce Open Source Conduct | ||
Committee. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant-home], | ||
version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html. | ||
It includes adaptions and additions from [Go Community Code of Conduct][golang-coc], | ||
[CNCF Code of Conduct][cncf-coc], and [Microsoft Open Source Code of Conduct][microsoft-coc]. | ||
|
||
This Code of Conduct is licensed under the [Creative Commons Attribution 3.0 License][cc-by-3-us]. | ||
|
||
[contributor-covenant-home]: https://www.contributor-covenant.org (https://www.contributor-covenant.org/) | ||
[golang-coc]: https://golang.org/conduct | ||
[cncf-coc]: https://github.com/cncf/foundation/blob/master/code-of-conduct.md | ||
[microsoft-coc]: https://opensource.microsoft.com/codeofconduct/ | ||
[cc-by-3-us]: https://creativecommons.org/licenses/by/3.0/us/ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to set these? They should be the defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I have the internal nexus registry configured in the global
.npmrc
, it was resulting in refs to the internal nexus in theyarn.lock
file. Hence had to override it to make sure there are no refs to internal registry - which could affect the CI among others. I guess most projects override the publish config inpackage.json
to the public npm?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree the references should point to the pubic registry rather than internal Nexus for this project. From an open source point of view I don't think there should be any references to the public registry though. I personally comment out the line pointing to Nexus in my root npmrc and only uncomment it when I need to access internal stuff.
Since it's probably a ways away from being truly open source it's probably fine to leave for now, but I think it should be removed by the time it's exposed externally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we can also switch npm registries using profiles https://docs.npmjs.com/configuring-your-registry-settings-as-an-npm-enterprise-user#create-a-profile-for-the-public-npm-registry
But then this adds a manual step to the process which could be easily forgotten.
Agree that we can revisit this later again when we are ready to make this public.