Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: bump prettier from 2.1.1 to 2.2.1 #3034

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

Merged
merged 3 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"lint-staged": "^10.2.13",
"make-dir": "^3.1.0",
"markdownlint-cli": "^0.23.2",
"prettier": "^2.1.1",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",
"ts-jest": "^26.3.0",
"ts-node": "^9.0.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1570,9 +1570,9 @@ export default createRule<Options, MessageIds>({
* 2. Don't set any offsets against the first token of the node.
* 3. Call `ignoreNode` on the node sometime after exiting it and before validating offsets.
*/
const offsetListeners = Object.keys(baseOffsetListeners).reduce<
TSESLint.RuleListener
>(
const offsetListeners = Object.keys(
baseOffsetListeners,
).reduce<TSESLint.RuleListener>(
/*
* Offset listener calls are deferred until traversal is finished, and are called as
* part of the final `Program:exit` listener. This is necessary because a node might
Expand All @@ -1590,9 +1590,9 @@ export default createRule<Options, MessageIds>({
* ignored nodes are known.
*/
(acc, key) => {
const listener = baseOffsetListeners[key] as TSESLint.RuleFunction<
TSESTree.Node
>;
const listener = baseOffsetListeners[
key
] as TSESLint.RuleFunction<TSESTree.Node>;
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
acc[key] = node => listenerCallQueue.push({ listener, node });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,9 @@ function validateUnderscores(name: string): boolean {
return !wasUnderscore;
}

const PredefinedFormatToCheckFunction: Readonly<Record<
PredefinedFormats,
(name: string) => boolean
>> = {
const PredefinedFormatToCheckFunction: Readonly<
Record<PredefinedFormats, (name: string) => boolean>
> = {
[PredefinedFormats.PascalCase]: isPascalCase,
[PredefinedFormats.StrictPascalCase]: isStrictPascalCase,
[PredefinedFormats.camelCase]: isCamelCase,
Expand Down
4 changes: 1 addition & 3 deletions packages/eslint-plugin/src/rules/semi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ export default util.createRule<Options, MessageIds>({
],
create(context) {
const rules = baseRule.create(context);
const checkForSemicolon = rules.ExpressionStatement as TSESLint.RuleFunction<
TSESTree.Node
>;
const checkForSemicolon = rules.ExpressionStatement as TSESLint.RuleFunction<TSESTree.Node>;

/*
The following nodes are handled by the member-delimiter-style rule
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin/src/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const {
isObjectNotArray,
getParserServices,
} = ESLintUtils;
type InferMessageIdsTypeFromRule<T> = ESLintUtils.InferMessageIdsTypeFromRule<
type InferMessageIdsTypeFromRule<
T
>;
> = ESLintUtils.InferMessageIdsTypeFromRule<T>;
type InferOptionsTypeFromRule<T> = ESLintUtils.InferOptionsTypeFromRule<T>;

export {
Expand Down
16 changes: 6 additions & 10 deletions packages/eslint-plugin/tests/rules/naming-convention.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ const parserOptions = {
project: './tsconfig.json',
};

const formatTestNames: Readonly<Record<
PredefinedFormatsString,
Record<'valid' | 'invalid', string[]>
>> = {
const formatTestNames: Readonly<
Record<PredefinedFormatsString, Record<'valid' | 'invalid', string[]>>
> = {
camelCase: {
valid: ['strictCamelCase', 'lower', 'camelCaseUNSTRICT'],
invalid: ['snake_case', 'UPPER_CASE', 'UPPER', 'StrictPascalCase'],
Expand Down Expand Up @@ -1132,13 +1131,11 @@ ruleTester.run('naming-convention', rule, {
{
const camelCaseVar = 1;
function camelCaseFunction() {}
declare function camelCaseDeclaredFunction() {
};
declare function camelCaseDeclaredFunction() {};
}
const PascalCaseVar = 1;
function PascalCaseFunction() {}
declare function PascalCaseDeclaredFunction() {
};
declare function PascalCaseDeclaredFunction() {};
`,
options: [
{ selector: 'default', format: ['camelCase'] },
Expand Down Expand Up @@ -1991,8 +1988,7 @@ ruleTester.run('naming-convention', rule, {
code: `
const PascalCaseVar = 1;
function PascalCaseFunction() {}
declare function PascalCaseDeclaredFunction() {
};
declare function PascalCaseDeclaredFunction() {};
`,
options: [
{ selector: 'default', format: ['snake_case'] },
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin/tests/rules/no-empty-function.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import rule from '../../src/rules/no-empty-function';
import { RuleTester } from '../RuleTester';
import { noFormat, RuleTester } from '../RuleTester';

const ruleTester = new RuleTester({
parser: '@typescript-eslint/parser',
Expand Down Expand Up @@ -159,7 +159,7 @@ function foo() {}
],
},
{
code: `
code: noFormat`
@decorator()
function foo() {}
`,
Expand Down
34 changes: 10 additions & 24 deletions packages/experimental-utils/src/ts-eslint/Rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ interface RuleFixer {
type ReportFixFunction = (
fixer: RuleFixer,
) => null | RuleFix | RuleFix[] | IterableIterator<RuleFix>;
type ReportSuggestionArray<TMessageIds extends string> = ReportDescriptorBase<
TMessageIds
>[];
type ReportSuggestionArray<
TMessageIds extends string
> = ReportDescriptorBase<TMessageIds>[];

interface ReportDescriptorBase<TMessageIds extends string> {
/**
Expand Down Expand Up @@ -328,29 +328,21 @@ interface RuleListener {
TryStatement?: RuleFunction<TSESTree.TryStatement>;
TSAbstractClassProperty?: RuleFunction<TSESTree.TSAbstractClassProperty>;
TSAbstractKeyword?: RuleFunction<TSESTree.TSAbstractKeyword>;
TSAbstractMethodDefinition?: RuleFunction<
TSESTree.TSAbstractMethodDefinition
>;
TSAbstractMethodDefinition?: RuleFunction<TSESTree.TSAbstractMethodDefinition>;
TSAnyKeyword?: RuleFunction<TSESTree.TSAnyKeyword>;
TSArrayType?: RuleFunction<TSESTree.TSArrayType>;
TSAsExpression?: RuleFunction<TSESTree.TSAsExpression>;
TSAsyncKeyword?: RuleFunction<TSESTree.TSAsyncKeyword>;
TSBigIntKeyword?: RuleFunction<TSESTree.TSBigIntKeyword>;
TSBooleanKeyword?: RuleFunction<TSESTree.TSBooleanKeyword>;
TSCallSignatureDeclaration?: RuleFunction<
TSESTree.TSCallSignatureDeclaration
>;
TSCallSignatureDeclaration?: RuleFunction<TSESTree.TSCallSignatureDeclaration>;
TSClassImplements?: RuleFunction<TSESTree.TSClassImplements>;
TSConditionalType?: RuleFunction<TSESTree.TSConditionalType>;
TSConstructorType?: RuleFunction<TSESTree.TSConstructorType>;
TSConstructSignatureDeclaration?: RuleFunction<
TSESTree.TSConstructSignatureDeclaration
>;
TSConstructSignatureDeclaration?: RuleFunction<TSESTree.TSConstructSignatureDeclaration>;
TSDeclareKeyword?: RuleFunction<TSESTree.TSDeclareKeyword>;
TSDeclareFunction?: RuleFunction<TSESTree.TSDeclareFunction>;
TSEmptyBodyFunctionExpression?: RuleFunction<
TSESTree.TSEmptyBodyFunctionExpression
>;
TSEmptyBodyFunctionExpression?: RuleFunction<TSESTree.TSEmptyBodyFunctionExpression>;
TSEnumDeclaration?: RuleFunction<TSESTree.TSEnumDeclaration>;
TSEnumMember?: RuleFunction<TSESTree.TSEnumMember>;
TSExportAssignment?: RuleFunction<TSESTree.TSExportAssignment>;
Expand All @@ -371,9 +363,7 @@ interface RuleListener {
TSMethodSignature?: RuleFunction<TSESTree.TSMethodSignature>;
TSModuleBlock?: RuleFunction<TSESTree.TSModuleBlock>;
TSModuleDeclaration?: RuleFunction<TSESTree.TSModuleDeclaration>;
TSNamespaceExportDeclaration?: RuleFunction<
TSESTree.TSNamespaceExportDeclaration
>;
TSNamespaceExportDeclaration?: RuleFunction<TSESTree.TSNamespaceExportDeclaration>;
TSNeverKeyword?: RuleFunction<TSESTree.TSNeverKeyword>;
TSNonNullExpression?: RuleFunction<TSESTree.TSNonNullExpression>;
TSNullKeyword?: RuleFunction<TSESTree.TSNullKeyword>;
Expand All @@ -400,12 +390,8 @@ interface RuleListener {
TSTypeLiteral?: RuleFunction<TSESTree.TSTypeLiteral>;
TSTypeOperator?: RuleFunction<TSESTree.TSTypeOperator>;
TSTypeParameter?: RuleFunction<TSESTree.TSTypeParameter>;
TSTypeParameterDeclaration?: RuleFunction<
TSESTree.TSTypeParameterDeclaration
>;
TSTypeParameterInstantiation?: RuleFunction<
TSESTree.TSTypeParameterInstantiation
>;
TSTypeParameterDeclaration?: RuleFunction<TSESTree.TSTypeParameterDeclaration>;
TSTypeParameterInstantiation?: RuleFunction<TSESTree.TSTypeParameterInstantiation>;
TSTypePredicate?: RuleFunction<TSESTree.TSTypePredicate>;
TSTypeQuery?: RuleFunction<TSESTree.TSTypeQuery>;
TSTypeReference?: RuleFunction<TSESTree.TSTypeReference>;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7157,10 +7157,10 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=

prettier@*, prettier@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.1.tgz#d9485dd5e499daa6cb547023b87a6cf51bee37d6"
integrity sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==
prettier@*, prettier@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==

pretty-format@^25.2.1, pretty-format@^25.5.0:
version "25.5.0"
Expand Down