Skip to content

Commit

Permalink
chore: release 1.9.0 (#5631)
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths authored Jun 22, 2023
2 parents a4b29cf + 6b9524d commit 1cdf098
Show file tree
Hide file tree
Showing 765 changed files with 72,525 additions and 31,406 deletions.
161 changes: 71 additions & 90 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,21 @@ module.exports = {
plugins: ["@typescript-eslint", "eslint-plugin-import", "@chainsafe/eslint-plugin-node", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:import/warnings",
],
rules: {
"prettier/prettier": "error",
//doesnt work, it reports false errors
"constructor-super": "off",
"import/order": [
"error",
{
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
pathGroups: [
{
pattern: "@lodestar/**",
group: "internal",
},
],
pathGroupsExcludedImportTypes: ["builtin"],
},
],
"@chainsafe/node/file-extension-in-import": ["error", "always", {esm: true}],
"@chainsafe/node/no-deprecated-api": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {allowExpressions: true}],
"@typescript-eslint/explicit-member-accessibility": ["error", {accessibility: "no-public"}],
"@typescript-eslint/func-call-spacing": "error",
// TODO after upgrading es-lint, member-ordering is now leading to lint errors. Set to warning now and fix in another PR
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/naming-convention": [
"error",
{selector: "default", format: ["camelCase"]},
Expand Down Expand Up @@ -70,77 +62,63 @@ module.exports = {
modifiers: ["requiresQuotes"],
},
//ignore rules on destructured params
{
selector: "variable",
modifiers: ["destructured"],
format: null,
},
],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
allowExpressions: true,
},
{selector: "variable", modifiers: ["destructured"], format: null},
],
"@typescript-eslint/func-call-spacing": "error",
// TODO after upgrading es-lint, member-ordering is now leading to lint errors. Set to warning now and fix in another PR
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
},
],
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/semi": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", {accessibility: "no-public"}],
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-require-imports": "error",
// We usually type-cast these standard types because the concerned function accepts any type
// and we want to TS detect error if original variable type changes
"@typescript-eslint/no-unnecessary-type-assertion": ["error", {typesToIgnore: ["string", "bigint", "number"]}],
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/strict-boolean-expressions": [
"@typescript-eslint/no-unused-vars": ["error", {varsIgnorePattern: "^_", argsIgnorePattern: "^_"}],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/restrict-template-expressions": [
"error",
{
allowNullableBoolean: true,
allowNullableString: true,
allowAny: true,
},
{allowNumber: true, allowBoolean: true, allowNullish: true, allowNever: true, allowRegExp: true},
],
"import/no-extraneous-dependencies": [
"@typescript-eslint/return-await": "error",
"@typescript-eslint/semi": "error",
"@typescript-eslint/strict-boolean-expressions": [
"error",
{
devDependencies: false,
optionalDependencies: false,
peerDependencies: false,
},
{allowNullableBoolean: true, allowNullableString: true, allowAny: true},
],

"@typescript-eslint/type-annotation-spacing": "error",
"constructor-super": "off",
"func-call-spacing": "off",
// Force to add names to all functions to ease CPU profiling
"func-names": ["error", "always"],
//if --fix is run it messes imports like /lib/presets/minimal & /lib/presets/mainnet
"import/no-duplicates": "off",
"import/no-extraneous-dependencies": [
"error",
{devDependencies: false, optionalDependencies: false, peerDependencies: false},
],
"import/no-relative-packages": "error",
"@chainsafe/node/no-deprecated-api": "error",
// TEMP Disabled while eslint-plugin-import support ESM (Typescript does support it) https://github.com/import-js/eslint-plugin-import/issues/2170
"import/no-unresolved": "off",
"import/order": [
"error",
{
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
pathGroups: [{pattern: "@lodestar/**", group: "internal"}],
pathGroupsExcludedImportTypes: ["builtin"],
},
],
//doesnt work, it reports false errors
"new-parens": "error",
"no-loss-of-precision": "error",
"no-caller": "error",
"no-bitwise": "off",
"no-caller": "error",
"no-cond-assign": "error",
"no-consecutive-blank-lines": 0,
"no-console": "error",
"no-var": "error",
"no-return-await": "error",
"object-curly-spacing": ["error", "never"],
"object-literal-sort-keys": 0,
"no-loss-of-precision": "error",
"no-prototype-builtins": 0,
"prefer-const": "error",
quotes: ["error", "double"],
semi: "off",
"no-restricted-imports": [
"error",
{
Expand All @@ -156,19 +134,22 @@ module.exports = {
"path",
"stream",
"util",
"url"
"url",
"worker_threads"
),
],
},
],
"no-restricted-syntax": ["error", ...restrictImportDestructuring("node:fs", "node:os", "node:path")],
// Force to add names to all functions to ease CPU profiling
"func-names": ["error", "always"],

// TEMP Disabled while eslint-plugin-import support ESM (Typescript does support it) https://github.com/import-js/eslint-plugin-import/issues/2170
"import/no-unresolved": "off",

"@chainsafe/node/file-extension-in-import": ["error", "always", {esm: true}],
// superseded by @typescript-eslint/return-await, must be disabled as it can report incorrect errors
"no-return-await": "off",
"no-var": "error",
"object-curly-spacing": ["error", "never"],
"object-literal-sort-keys": 0,
"prefer-const": "error",
"prettier/prettier": "error",
quotes: ["error", "double"],
semi: "off",
},
settings: {
"import/internal-regex": "^@chainsafe/",
Expand All @@ -189,32 +170,39 @@ module.exports = {
{
files: ["**/*.config.js", "**/*.config.mjs", "**/*.config.cjs", "**/*.config.ts"],
rules: {
"@typescript-eslint/naming-convention": "off",
// Allow require in CJS modules
"@typescript-eslint/no-require-imports": "off",
// Allow require in CJS modules
"@typescript-eslint/no-var-requires": "off",
// Allow importing packages from dev dependencies
"import/no-extraneous-dependencies": "off",
// Allow importing and mixing different configurations
"import/no-relative-packages": "off",
"@typescript-eslint/naming-convention": "off",
// Allow require in CJS modules
"@typescript-eslint/no-var-requires": "off",
// Allow require in CJS modules
"@typescript-eslint/no-require-imports": "off",
},
},
{
files: ["**/test/**/*.ts"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"func-names": "off",
"import/no-extraneous-dependencies": "off",
// Turned off as it floods log with warnings. Underlying issue is not critical so switching off is acceptable
"import/no-named-as-default-member": "off",
"@typescript-eslint/no-explicit-any": "off",
"func-names": "off",
},
},
{
files: ["**/test/**/*.test.ts"],
plugins: ["mocha", "chai-expect"],
extends: ["plugin:mocha/recommended", "plugin:chai-expect/recommended"],
rules: {
// We observed that having multiple top level "describe" save valuable indentation
// https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/max-top-level-suites.md
"mocha/max-top-level-suites": "off",
// We need to disable because we disabled "mocha/no-setup-in-describe" rule
// TODO: Move all setup code to before/beforeEach and then disable async describe
// https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-async-describe.md
"mocha/no-async-describe": "off",
// Use of arrow functions are very common
"mocha/no-mocha-arrows": "off",
// It's common to call function inside describe block
Expand All @@ -223,13 +211,6 @@ module.exports = {
// We use to split before in small isolated tasks
// https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-sibling-hooks.md
"mocha/no-sibling-hooks": "off",
// We need to disable because we disabled "mocha/no-setup-in-describe" rule
// TODO: Move all setup code to before/beforeEach and then disable async describe
// https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-async-describe.md
"mocha/no-async-describe": "off",
// We observed that having multiple top level "describe" save valuable indentation
// https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/max-top-level-suites.md
"mocha/max-top-level-suites": "off",
},
},
{
Expand Down
35 changes: 0 additions & 35 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Bug report
description: Create a bug report to help us improve
title: "[Descriptive title] "
body:
- type: textarea
id: describe
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is and steps to reproduce it.
placeholder: This is what I'm seeing.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: This is what should happen.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: List the steps to reproduce the behavior
placeholder: |
1. Run command './lodestar beacon --flag'
2. Wait for node syncing log
3. Query API at 'beacon:9596/eth/v1/api'
4. See error
validations:
required: false
- type: textarea
id: attachments
attributes:
label: Additional context
description: If applicable, add screenshots, links or other context about the issue
placeholder: |
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: dropdown
attributes:
label: Operating system
description: What type of operating system are you running on?
multiple: false
options:
- Linux
- macOS
- Windows
validations:
required: true
- type: input
id: version
attributes:
label: Lodestar version or commit hash
description: Which version or commit hash of Lodestar are you running?
placeholder: v1.8.0 or a4b29cf
validations:
required: true
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: General questions
url: https://github.com/ChainSafe/lodestar/discussions
about: General questions should be directed to our Github discussions instead of an issue.
- name: Join our Discord community
url: https://discord.gg/aMxzVcr
about: Engage in our Lodestar community of contributors, users and supporters.
- name: Ethereum Bug Bounty
url: https://ethereum.org/en/bug-bounty/
about: Earn up to $250,000 USD and a place on the leaderboard by finding protocol, client and Solidity bugs affecting the Ethereum network.
24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

Loading

0 comments on commit 1cdf098

Please sign in to comment.