Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(eslint-plugin): final final config changes for v6#7157

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,7 @@ export = {
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
Expand Down
1 change: 1 addition & 0 deletionspackages/eslint-plugin/src/configs/recommended.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@ export = {
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'no-loss-of-precision': 'off',
'@typescript-eslint/no-loss-of-precision': 'error',
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,7 @@ export = {
'no-array-constructor': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-void-expression': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-dynamic-delete': 'error',
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,6 @@ export = {
'dot-notation': 'off',
'@typescript-eslint/dot-notation': 'error',
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
'@typescript-eslint/no-confusing-void-expression': 'error',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-interface': 'error',
Expand All@@ -31,6 +30,5 @@ export = {
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/sort-type-constituents': 'error',
},
};
1 change: 0 additions & 1 deletionpackages/eslint-plugin/src/configs/stylistic.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,5 @@ export = {
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/sort-type-constituents': 'error',
},
};
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,7 +28,7 @@ export default util.createRule<Options, MessageId>({
docs: {
description:
'Require expressions of type void to appear in statement position',
recommended: 'stylistic',
recommended: 'strict',
requiresTypeChecking: true,
},
messages: {
Expand Down
2 changes: 1 addition & 1 deletionpackages/eslint-plugin/src/rules/no-explicit-any.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,7 @@ export default util.createRule<Options, MessageIds>({
type: 'suggestion',
docs: {
description: 'Disallow the `any` type',
recommended: 'strict',
recommended: 'recommended',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

v happy with this!

JoshuaKGoldberg reacted with heart emoji
},
fixable: 'code',
hasSuggestions: true,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -112,7 +112,6 @@ export default util.createRule<Options, MessageIds>({
docs: {
description:
'Enforce constituents of a type union/intersection to be sorted alphabetically',
recommended: 'stylistic',
},
fixable: 'code',
hasSuggestions: true,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -145,7 +145,7 @@ export default util.createRule<Options, MessageId>({
allowNullableBoolean: false,
allowNullableString: false,
allowNullableNumber: false,
allowNullableEnum:true,
allowNullableEnum:false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this is much safer so happy to see this!

JoshuaKGoldberg reacted with rocket emoji
allowAny: false,
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
},
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
var foo:any = true;
var foo:unknown = true;
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ exports[`recommended-does-not-require-program should lint successfully 1`] = `
"messages": [
{
"column": 7,
"endColumn":15,
"endColumn":19,
"endLine": 1,
"line": 1,
"message": "'foo' is assigned a value but never used.",
Expand All@@ -21,7 +21,7 @@ exports[`recommended-does-not-require-program should lint successfully 1`] = `
"severity": 2,
},
],
"output": "const foo:any = true;
"output": "const foo:unknown = true;
",
"suppressedMessages": [],
"usedDeprecatedRules": [],
Expand Down
2 changes: 0 additions & 2 deletionspackages/typescript-estree/src/ts-estree/ts-nodes.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,6 @@ declare module 'typescript' {

export type TSToken = ts.Token<ts.SyntaxKind>;

/* eslint-disable @typescript-eslint/sort-type-constituents */
export type TSNode =
| ts.AssertClause
| ts.AssertEntry
Expand DownExpand Up@@ -216,4 +215,3 @@ export type TSNode =
| ts.JSDocOptionalType
| ts.JSDocVariadicType
| ts.JSDocAuthorTag;
/* eslint-enable @typescript-eslint/sort-type-constituents */

[8]ページ先頭

©2009-2025 Movatter.jp