Skip to content
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

feat(eslint-plugin): deprecate formatting (meta.type: layout) rules #8073

36 changes: 0 additions & 36 deletions packages/eslint-plugin/src/configs/all.ts
Expand Up @@ -14,17 +14,9 @@ export = {
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/ban-tslint-comment': 'error',
'@typescript-eslint/ban-types': 'error',
'block-spacing': 'off',
'@typescript-eslint/block-spacing': 'error',
'brace-style': 'off',
'@typescript-eslint/brace-style': 'error',
'@typescript-eslint/class-literal-property-style': 'error',
'class-methods-use-this': 'off',
'@typescript-eslint/class-methods-use-this': 'error',
'comma-dangle': 'off',
'@typescript-eslint/comma-dangle': 'error',
'comma-spacing': 'off',
'@typescript-eslint/comma-spacing': 'error',
'@typescript-eslint/consistent-generic-constructors': 'error',
'@typescript-eslint/consistent-indexed-object-style': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
Expand All @@ -38,23 +30,10 @@ export = {
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'func-call-spacing': 'off',
'@typescript-eslint/func-call-spacing': 'error',
indent: 'off',
'@typescript-eslint/indent': 'error',
'init-declarations': 'off',
'@typescript-eslint/init-declarations': 'error',
'key-spacing': 'off',
'@typescript-eslint/key-spacing': 'error',
'keyword-spacing': 'off',
'@typescript-eslint/keyword-spacing': 'error',
'lines-around-comment': 'off',
'@typescript-eslint/lines-around-comment': 'error',
'lines-between-class-members': 'off',
'@typescript-eslint/lines-between-class-members': 'error',
'max-params': 'off',
'@typescript-eslint/max-params': 'error',
'@typescript-eslint/member-delimiter-style': 'error',
'@typescript-eslint/member-ordering': 'error',
'@typescript-eslint/method-signature-style': 'error',
'@typescript-eslint/naming-convention': 'error',
Expand All @@ -73,8 +52,6 @@ export = {
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'no-extra-parens': 'off',
'@typescript-eslint/no-extra-parens': 'error',
'no-extra-semi': 'off',
'@typescript-eslint/no-extra-semi': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
Expand Down Expand Up @@ -140,8 +117,6 @@ export = {
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
'object-curly-spacing': 'off',
'@typescript-eslint/object-curly-spacing': 'error',
'padding-line-between-statements': 'off',
'@typescript-eslint/padding-line-between-statements': 'error',
'@typescript-eslint/parameter-properties': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'prefer-destructuring': 'off',
Expand All @@ -162,28 +137,17 @@ export = {
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/prefer-ts-expect-error': 'error',
'@typescript-eslint/promise-function-async': 'error',
quotes: 'off',
'@typescript-eslint/quotes': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'no-return-await': 'off',
'@typescript-eslint/return-await': 'error',
semi: 'off',
'@typescript-eslint/semi': 'error',
'@typescript-eslint/sort-type-constituents': 'error',
'space-before-blocks': 'off',
'@typescript-eslint/space-before-blocks': 'error',
'space-before-function-paren': 'off',
'@typescript-eslint/space-before-function-paren': 'error',
'space-infix-ops': 'off',
'@typescript-eslint/space-infix-ops': 'error',
'@typescript-eslint/strict-boolean-expressions': 'error',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/typedef': 'error',
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/unified-signatures': 'error',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/block-spacing.ts
Expand Up @@ -17,6 +17,7 @@ export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
export default createRule<Options, MessageIds>({
name: 'block-spacing',
meta: {
deprecated: true,
type: 'layout',
docs: {
description:
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/brace-style.ts
Expand Up @@ -16,6 +16,7 @@ export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
export default createRule<Options, MessageIds>({
name: 'brace-style',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Enforce consistent brace style for blocks',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/comma-dangle.ts
Expand Up @@ -46,6 +46,7 @@ function normalizeOptions(options: Option): NormalizedOptions {
export default createRule<Options, MessageIds>({
name: 'comma-dangle',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Require or disallow trailing commas',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/comma-spacing.ts
Expand Up @@ -22,6 +22,7 @@ type MessageIds = 'missing' | 'unexpected';
export default createRule<Options, MessageIds>({
name: 'comma-spacing',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Enforce consistent spacing before and after commas',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/func-call-spacing.ts
Expand Up @@ -23,6 +23,7 @@ export type MessageIds =
export default createRule<Options, MessageIds>({
name: 'func-call-spacing',
meta: {
deprecated: true,
type: 'layout',
docs: {
description:
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/indent.ts
Expand Up @@ -92,6 +92,7 @@ const KNOWN_NODES = new Set([
export default createRule<Options, MessageIds>({
name: 'indent',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Enforce consistent indentation',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/key-spacing.ts
Expand Up @@ -27,6 +27,7 @@ const baseSchema = Array.isArray(baseRule.meta.schema)
export default createRule<Options, MessageIds>({
name: 'key-spacing',
meta: {
deprecated: true,
type: 'layout',
docs: {
description:
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/keyword-spacing.ts
Expand Up @@ -37,6 +37,7 @@ const schema = deepMerge(
export default createRule<Options, MessageIds>({
name: 'keyword-spacing',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Enforce consistent spacing before and after keywords',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/lines-around-comment.ts
Expand Up @@ -50,6 +50,7 @@ function getCommentLineNums(comments: TSESTree.Comment[]): number[] {
export default createRule<Options, MessageIds>({
name: 'lines-around-comment',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Require empty lines around comments',
Expand Down
Expand Up @@ -33,6 +33,7 @@ const schema = Object.values(
export default createRule<Options, MessageIds>({
name: 'lines-between-class-members',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Require or disallow an empty line between class members',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/member-delimiter-style.ts
Expand Up @@ -136,6 +136,7 @@ const BASE_SCHEMA: JSONSchema4 = {
export default createRule<Options, MessageIds>({
name: 'member-delimiter-style',
meta: {
deprecated: true,
type: 'layout',
docs: {
description:
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/no-extra-parens.ts
Expand Up @@ -20,6 +20,7 @@ type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
export default createRule<Options, MessageIds>({
name: 'no-extra-parens',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Disallow unnecessary parentheses',
Expand Down
Expand Up @@ -590,6 +590,7 @@ const StatementTypes: Record<string, NodeTestObject> = {
export default createRule<Options, MessageIds>({
name: 'padding-line-between-statements',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Require or disallow padding lines between statements',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/quotes.ts
Expand Up @@ -16,6 +16,7 @@ export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
export default createRule<Options, MessageIds>({
name: 'quotes',
meta: {
deprecated: true,
type: 'layout',
docs: {
description:
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/semi.ts
Expand Up @@ -16,6 +16,7 @@ export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
export default createRule<Options, MessageIds>({
name: 'semi',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Require or disallow semicolons instead of ASI',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/space-before-blocks.ts
Expand Up @@ -16,6 +16,7 @@ export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
export default createRule<Options, MessageIds>({
name: 'space-before-blocks',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Enforce consistent spacing before blocks',
Expand Down
Expand Up @@ -20,6 +20,7 @@ export type MessageIds = 'missing' | 'unexpected';
export default createRule<Options, MessageIds>({
name: 'space-before-function-paren',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Enforce consistent spacing before function parenthesis',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/space-infix-ops.ts
Expand Up @@ -18,6 +18,7 @@ const UNIONS = ['|', '&'];
export default createRule<Options, MessageIds>({
name: 'space-infix-ops',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Require spacing around infix operators',
Expand Down
Expand Up @@ -102,6 +102,7 @@ function getRules(
export default createRule<Options, MessageIds>({
name: 'type-annotation-spacing',
meta: {
deprecated: true,
type: 'layout',
docs: {
description: 'Require consistent spacing around type annotations',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/tests/areOptionsValid.test.ts
Expand Up @@ -4,6 +4,7 @@ import { areOptionsValid } from './areOptionsValid';
const exampleRule = createRule<['value-a' | 'value-b'], never>({
name: 'my-example-rule',
meta: {
deprecated: true,
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
type: 'layout',
docs: {
description: 'Detects something or other',
Expand Down