Bump the npm group with 5 updates (#1977)

* Bump the npm group with 5 updates

Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@octokit/types](https://github.com/octokit/types.ts) | `12.0.0` | `12.1.1` |
| [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) | `10.0.19` | `10.0.20` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.9.0` | `6.9.1` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.9.0` | `6.9.1` |
| [nock](https://github.com/nock/nock) | `13.3.6` | `13.3.7` |


Updates `@octokit/types` from 12.0.0 to 12.1.1
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v12.0.0...v12.1.1)

Updates `@types/sinon` from 10.0.19 to 10.0.20
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

Updates `@typescript-eslint/eslint-plugin` from 6.9.0 to 6.9.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.9.0 to 6.9.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.1/packages/parser)

Updates `nock` from 13.3.6 to 13.3.7
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.3.6...v13.3.7)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2023-10-30 18:27:47 +00:00 committed by GitHub
parent df32e39913
commit c73d8a69e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 1158 additions and 382 deletions

View file

@ -13,6 +13,10 @@ const defaultCamelCaseAllTheThingsConfig = [
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'import',
format: ['camelCase', 'PascalCase'],
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],

File diff suppressed because one or more lines are too long

View file

@ -42,6 +42,14 @@ exports.default = (0, util_1.createRule)({
if (node.directive || isValidExpression(node.expression)) {
return;
}
if (node.expression.type ===
utils_1.TSESTree.AST_NODE_TYPES.TSInstantiationExpression) {
rules.ExpressionStatement({
...node,
expression: node.expression.expression,
});
return;
}
rules.ExpressionStatement(node);
},
};

View file

@ -1 +1 @@
{"version":3,"file":"no-unused-expressions.js","sourceRoot":"","sources":["../../src/rules/no-unused-expressions.ts"],"names":[],"mappings":";;AACA,oDAA0D;AAM1D,kCAAqC;AACrC,iEAA8D;AAE9D,MAAM,QAAQ,GAAG,IAAA,qCAAiB,EAAC,uBAAuB,CA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AC,IAAI,KAAK,sBAAc,CAAC,qBAAqB,EAAE;gBACtE,OAAO,CACL,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC;oBACjC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CACnC,CAAC;aACH;YACD,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe;gBAC3C,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc,CAAC;gBACzD,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB,CAC9C,CAAC;QACJ,CAAC;QAED,OAAO;YACL,mBAAmB,CAAC,IAAI;gBACtB,IAAI,IAAI,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;oBACxD,OAAO;iBACR;gBAED,IACE,IAAI,CAAC,UAAU,CAAC,IAAI;oBACpB,gBAAQ,CAAC,cAAc,CAAC,yBAAyB,EACjD;oBACA,KAAK,CAAC,mBAAmB,CAAC;wBACxB,GAAG,IAAI;wBACP,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU;qBACvC,CAAC,CAAC;oBACH,OAAO;iBACR;gBAED,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;YAClC,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}

View file

@ -80,6 +80,11 @@ const defaultOptions: Options = [
trailingUnderscore: 'allow',
},
{
selector: 'import',
format: ['camelCase', 'PascalCase'],
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],

View file

@ -127,8 +127,16 @@ interface Garply {
## When Not To Use It
If an unknown type or a library without typings is used
and you want to be able to specify `any`.
`any` is always a dangerous escape hatch.
Whenever possible, it is always safer to avoid it.
TypeScript's `unknown` is almost always preferable to `any`.
However, there are occasional situations where it can be necessary to use `any`.
Most commonly:
- If your project isn't fully onboarded to TypeScript yet, `any` can be temporarily used in places where types aren't yet known or representable
- If an external package doesn't yet have typings and you want to use `any` pending adding a `.d.ts` for it
- You're working with particularly complex or nuanced code that can't yet be represented in the TypeScript type system
## Related To
@ -140,4 +148,5 @@ and you want to be able to specify `any`.
## Further Reading
- TypeScript [any type](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)
- TypeScript [`any` type documentation](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)
- TypeScript [`unknown` type release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#new-unknown-top-type)

View file

@ -54,7 +54,7 @@ properlyTyped.prop[key];
const arr = [1, 2, 3];
arr[1];
const idx = 1;
let idx = 1;
arr[idx];
arr[idx++];
```

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/eslint-plugin",
"version": "6.9.0",
"version": "6.9.1",
"description": "TypeScript plugin for ESLint",
"files": [
"dist",
@ -57,10 +57,10 @@
},
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.9.0",
"@typescript-eslint/type-utils": "6.9.0",
"@typescript-eslint/utils": "6.9.0",
"@typescript-eslint/visitor-keys": "6.9.0",
"@typescript-eslint/scope-manager": "6.9.1",
"@typescript-eslint/type-utils": "6.9.1",
"@typescript-eslint/utils": "6.9.1",
"@typescript-eslint/visitor-keys": "6.9.1",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@ -73,8 +73,8 @@
"@types/debug": "*",
"@types/marked": "*",
"@types/natural-compare": "*",
"@typescript-eslint/rule-schema-to-typescript-types": "6.9.0",
"@typescript-eslint/rule-tester": "6.9.0",
"@typescript-eslint/rule-schema-to-typescript-types": "6.9.1",
"@typescript-eslint/rule-tester": "6.9.1",
"ajv": "^6.12.6",
"chalk": "^5.3.0",
"cross-fetch": "*",
@ -103,5 +103,5 @@
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"gitHead": "101563b34ad21c68177ab6ed373c0eb1643e1888"
"gitHead": "1e472949e561ea37e160f4c9d9e0136e04f40a1f"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/parser",
"version": "6.9.0",
"version": "6.9.1",
"description": "An ESLint custom parser which leverages TypeScript ESTree",
"files": [
"dist",
@ -51,10 +51,10 @@
"eslint": "^7.0.0 || ^8.0.0"
},
"dependencies": {
"@typescript-eslint/scope-manager": "6.9.0",
"@typescript-eslint/types": "6.9.0",
"@typescript-eslint/typescript-estree": "6.9.0",
"@typescript-eslint/visitor-keys": "6.9.0",
"@typescript-eslint/scope-manager": "6.9.1",
"@typescript-eslint/types": "6.9.1",
"@typescript-eslint/typescript-estree": "6.9.1",
"@typescript-eslint/visitor-keys": "6.9.1",
"debug": "^4.3.4"
},
"devDependencies": {
@ -82,5 +82,5 @@
]
}
},
"gitHead": "101563b34ad21c68177ab6ed373c0eb1643e1888"
"gitHead": "1e472949e561ea37e160f4c9d9e0136e04f40a1f"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/scope-manager",
"version": "6.9.0",
"version": "6.9.1",
"description": "TypeScript scope analyser for ESLint",
"files": [
"dist",
@ -44,13 +44,13 @@
"typecheck": "nx typecheck"
},
"dependencies": {
"@typescript-eslint/types": "6.9.0",
"@typescript-eslint/visitor-keys": "6.9.0"
"@typescript-eslint/types": "6.9.1",
"@typescript-eslint/visitor-keys": "6.9.1"
},
"devDependencies": {
"@prettier/sync": "*",
"@types/glob": "*",
"@typescript-eslint/typescript-estree": "6.9.0",
"@typescript-eslint/typescript-estree": "6.9.1",
"glob": "*",
"jest-specific-snapshot": "*",
"make-dir": "*",
@ -68,5 +68,5 @@
]
}
},
"gitHead": "101563b34ad21c68177ab6ed373c0eb1643e1888"
"gitHead": "1e472949e561ea37e160f4c9d9e0136e04f40a1f"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/type-utils",
"version": "6.9.0",
"version": "6.9.1",
"description": "Type utilities for working with TypeScript + ESLint together",
"files": [
"dist",
@ -45,13 +45,13 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/typescript-estree": "6.9.0",
"@typescript-eslint/utils": "6.9.0",
"@typescript-eslint/typescript-estree": "6.9.1",
"@typescript-eslint/utils": "6.9.1",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
"devDependencies": {
"@typescript-eslint/parser": "6.9.0",
"@typescript-eslint/parser": "6.9.1",
"ajv": "^6.10.0",
"downlevel-dts": "*",
"jest": "29.7.0",
@ -78,5 +78,5 @@
]
}
},
"gitHead": "101563b34ad21c68177ab6ed373c0eb1643e1888"
"gitHead": "1e472949e561ea37e160f4c9d9e0136e04f40a1f"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/types",
"version": "6.9.0",
"version": "6.9.1",
"description": "Types for the TypeScript-ESTree AST spec",
"files": [
"dist",
@ -90,5 +90,5 @@
]
}
},
"gitHead": "101563b34ad21c68177ab6ed373c0eb1643e1888"
"gitHead": "1e472949e561ea37e160f4c9d9e0136e04f40a1f"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/typescript-estree",
"version": "6.9.0",
"version": "6.9.1",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
"files": [
"dist",
@ -52,8 +52,8 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/types": "6.9.0",
"@typescript-eslint/visitor-keys": "6.9.0",
"@typescript-eslint/types": "6.9.1",
"@typescript-eslint/visitor-keys": "6.9.1",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -88,5 +88,5 @@
]
}
},
"gitHead": "101563b34ad21c68177ab6ed373c0eb1643e1888"
"gitHead": "1e472949e561ea37e160f4c9d9e0136e04f40a1f"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/utils",
"version": "6.9.0",
"version": "6.9.1",
"description": "Utilities for working with TypeScript + ESLint together",
"files": [
"dist",
@ -68,16 +68,16 @@
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.9.0",
"@typescript-eslint/types": "6.9.0",
"@typescript-eslint/typescript-estree": "6.9.0",
"@typescript-eslint/scope-manager": "6.9.1",
"@typescript-eslint/types": "6.9.1",
"@typescript-eslint/typescript-estree": "6.9.1",
"semver": "^7.5.4"
},
"peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0"
},
"devDependencies": {
"@typescript-eslint/parser": "6.9.0",
"@typescript-eslint/parser": "6.9.1",
"downlevel-dts": "*",
"jest": "29.7.0",
"prettier": "^3.0.3",
@ -95,5 +95,5 @@
]
}
},
"gitHead": "101563b34ad21c68177ab6ed373c0eb1643e1888"
"gitHead": "1e472949e561ea37e160f4c9d9e0136e04f40a1f"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/visitor-keys",
"version": "6.9.0",
"version": "6.9.1",
"description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
"files": [
"dist",
@ -45,7 +45,7 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/types": "6.9.0",
"@typescript-eslint/types": "6.9.1",
"eslint-visitor-keys": "^3.4.1"
},
"devDependencies": {
@ -67,5 +67,5 @@
]
}
},
"gitHead": "101563b34ad21c68177ab6ed373c0eb1643e1888"
"gitHead": "1e472949e561ea37e160f4c9d9e0136e04f40a1f"
}