Skip to content

Commit

Permalink
Merge branch 'master' into package-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford authored Aug 20, 2018
2 parents f61aa91 + 439b75b commit 303d5a8
Show file tree
Hide file tree
Showing 9,111 changed files with 369,132 additions and 217,336 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
111 changes: 111 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 8
UseTab: Never
29 changes: 20 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ module.exports = {
],
parserOptions: { sourceType: 'module' },
},
{
files: ['**/*.md'],
parserOptions: { ecmaFeatures: { impliedStrict: true } },
rules: { strict: 'off' },
},
],
rules: {
// ESLint built-in rules
Expand Down Expand Up @@ -94,6 +99,7 @@ module.exports = {
'no-dupe-class-members': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-duplicate-imports': 'error',
'no-empty-character-class': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
Expand All @@ -105,6 +111,7 @@ module.exports = {
'no-invalid-regexp': 'error',
'no-irregular-whitespace': 'error',
'no-lonely-if': 'error',
'no-misleading-character-class': 'error',
'no-mixed-requires': 'error',
'no-mixed-spaces-and-tabs': 'error',
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
Expand Down Expand Up @@ -132,7 +139,7 @@ module.exports = {
{
object: 'assert',
property: 'equal',
message: 'Use assert.astrictEqual() rather than assert.equal().',
message: 'Use assert.strictEqual() rather than assert.equal().',
},
{
object: 'assert',
Expand All @@ -148,40 +155,40 @@ module.exports = {
message: '__defineSetter__ is deprecated.',
}
],
/* eslint-disable max-len, quotes */
/* eslint-disable max-len */
// If this list is modified, please copy the change to lib/.eslintrc.yaml
'no-restricted-syntax': [
'error',
{
selector: "CallExpression[callee.object.name='assert'][callee.property.name='doesNotThrow']",
message: "Please replace `assert.doesNotThrow()` and add a comment next to the code instead."
message: 'Please replace `assert.doesNotThrow()` and add a comment next to the code instead.'
},
{
selector: `CallExpression[callee.object.name='assert'][callee.property.name='rejects'][arguments.length<2]`,
selector: "CallExpression[callee.object.name='assert'][callee.property.name='rejects'][arguments.length<2]",
message: 'assert.rejects() must be invoked with at least two arguments.',
},
{
selector: `CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])`,
selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])",
message: 'Use an object as second argument of assert.throws()',
},
{
selector: `CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.length<2]`,
selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.length<2]",
message: 'assert.throws() must be invoked with at least two arguments.',
},
{
selector: `CallExpression[callee.name='setTimeout'][arguments.length<2]`,
selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]",
message: 'setTimeout() must be invoked with at least two arguments.',
},
{
selector: `CallExpression[callee.name='setInterval'][arguments.length<2]`,
selector: "CallExpression[callee.name='setInterval'][arguments.length<2]",
message: 'setInterval() must be invoked with at least 2 arguments.',
},
{
selector: 'ThrowStatement > CallExpression[callee.name=/Error$/]',
message: 'Use new keyword when throwing an Error.',
}
],
/* eslint-enable max-len, quotes */
/* eslint-enable max-len */
'no-return-await': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
Expand Down Expand Up @@ -242,9 +249,13 @@ module.exports = {

// Custom rules from eslint-plugin-node-core
'node-core/no-unescaped-regexp-dot': 'error',
'node-core/no-duplicate-requires': 'error',
},
globals: {
Atomics: false,
BigInt: false,
BigInt64Array: false,
BigUint64Array: false,
COUNTER_HTTP_CLIENT_REQUEST: false,
COUNTER_HTTP_CLIENT_RESPONSE: false,
COUNTER_HTTP_SERVER_REQUEST: false,
Expand Down
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve

---

<!--
Thank you for reporting a possible bug in Node.js.
Please fill in as much of the template below as you can.
Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify the affected core module name
If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you can.
-->

* **Version**:
* **Platform**:
* **Subsystem**:

<!-- Please provide more details below this comment. -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "\U0001F680 Feature request"
about: Suggest an idea for this project

---

<!--
Thank you for suggesting an idea to make Node.js better.
Please fill in as much of the template below as you're able.
-->

**Is your feature request related to a problem? Please describe.**
Please describe the problem you are trying to solve.

**Describe the solution you'd like**
Please describe the desired behavior.

**Describe alternatives you've considered**
Please describe alternative solutions or features you have considered.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/3-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: "⁉️ Need help with Node.js?"
about: Please file an issue in our help repo.

---

If you have a question about Node.js that is not a bug report or feature
request, please post it in https://github.com/nodejs/help!

Questions posted to this repository will be closed.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/4-nodejs-org.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: "\U0001F310 Found a problem with nodejs.org?"
about: Please file an issue in the Node.js website repo.

---

If you have a question, suggestion or issue regarding our website,
please post it in https://github.com/nodejs/nodejs.org!

Issues with the Node.js API documentation should be posted here. All other
issues regarding the website will be closed.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
!test/fixtures/**/.*
!tools/node_modules/**/.*
!tools/doc/node_modules/**/.*
!.clang-format
!.editorconfig
!.eslintignore
!.eslintrc.js
Expand Down Expand Up @@ -69,6 +70,7 @@ ipch/

/config.mk
/config.gypi
/config.status
/config_fips.gypi
*-nodegyp*
/gyp-mac-tool
Expand Down Expand Up @@ -105,8 +107,10 @@ deps/npm/node_modules/.bin/
/*.pkg
/SHASUMS*.txt*

# api docs artifacts
tools/doc/node_modules

# test artifacts
tools/faketime
tools/remark-cli/node_modules
tools/remark-preset-lint-node/node_modules
icu_config.gypi
Expand Down
Loading

0 comments on commit 303d5a8

Please sign in to comment.