From 0a0585f3accd01ca9384bd99d2cc4bc8f016b7e5 Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Sat, 22 Jul 2023 16:39:34 +0700 Subject: [PATCH] feat: @typescript-eslint/block-spacing BREAKING CHANGE: add rule @typescript-eslint/block-spacing and bump minimum @typescript-eslint to 5.52.0 Co-authored-by: Rostislav Simonik --- package.json | 10 +++++----- readme.md | 2 +- src/index.test.ts | 6 ++++++ src/index.ts | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 960f036a..7657fefe 100644 --- a/package.json +++ b/package.json @@ -53,11 +53,11 @@ "TypeScript" ], "dependencies": { - "@typescript-eslint/parser": "^5.50.0", + "@typescript-eslint/parser": "^5.52.0", "eslint-config-standard": "17.1.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.50.0", + "@typescript-eslint/eslint-plugin": "^5.52.0", "eslint": "^8.0.1", "eslint-plugin-import": "^2.25.2", "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", @@ -76,9 +76,9 @@ "@types/npm-package-arg": "6.1.1", "@types/semver": "7.5.0", "@types/ungap__structured-clone": "0.3.0", - "@typescript-eslint_bottom/eslint-plugin": "npm:@typescript-eslint/eslint-plugin@5.50.0", - "@typescript-eslint_bottom/parser": "npm:@typescript-eslint/parser@5.50.0", - "@typescript-eslint/eslint-plugin": "5.50.0", + "@typescript-eslint_bottom/eslint-plugin": "npm:@typescript-eslint/eslint-plugin@5.52.0", + "@typescript-eslint_bottom/parser": "npm:@typescript-eslint/parser@5.52.0", + "@typescript-eslint/eslint-plugin": "5.62.0", "@ungap/structured-clone": "1.2.0", "ava": "5.3.1", "editorconfig-checker": "5.1.1", diff --git a/readme.md b/readme.md index 79b08bde..42b75e42 100644 --- a/readme.md +++ b/readme.md @@ -43,7 +43,7 @@ npm install --save-dev \ eslint-plugin-promise@^6.0.0 \ eslint-plugin-import@^2.25.2 \ eslint-plugin-n@^15.0.0 \ - @typescript-eslint/eslint-plugin@^5.50.0 \ + @typescript-eslint/eslint-plugin@^5.52.0 \ eslint-config-standard-with-typescript@latest ``` diff --git a/src/index.test.ts b/src/index.test.ts index 7991293b..5d2ae27c 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -55,6 +55,7 @@ test('export', (t): void => { plugins: ['@typescript-eslint'], parser: '@typescript-eslint/parser', rules: { + 'block-spacing': 'off', 'brace-style': 'off', camelcase: 'off', 'comma-dangle': 'off', @@ -142,6 +143,7 @@ test('export', (t): void => { } } }], + '@typescript-eslint/block-spacing': ['error', 'always'], '@typescript-eslint/brace-style': ['error', '1tbs', { allowSingleLine: true }], '@typescript-eslint/class-literal-property-style': ['error', 'fields'], '@typescript-eslint/comma-dangle': ['error', { @@ -432,10 +434,13 @@ test('all plugin rules are considered', (t) => { 'member-ordering', 'no-confusing-non-null-assertion', 'no-duplicate-enum-values', + 'no-duplicate-type-constituents', 'no-explicit-any', 'no-implicit-any-catch', + 'no-import-type-side-effects', 'no-inferrable-types', 'no-meaningless-void-operator', + 'no-mixed-enums', 'no-non-null-asserted-nullish-coalescing', 'no-parameter-properties', 'no-redundant-type-constituents', @@ -448,6 +453,7 @@ test('all plugin rules are considered', (t) => { 'no-unsafe-assignment', 'no-unsafe-call', 'no-unsafe-declaration-merging', + 'no-unsafe-enum-comparison', 'no-unsafe-member-access', 'no-unsafe-return', 'no-useless-empty-export', diff --git a/src/index.ts b/src/index.ts index d737851d..64553ac2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,7 @@ import configStandard from './eslint-config-standard' import { type Linter } from 'eslint' const equivalents = [ + 'block-spacing', 'comma-spacing', 'dot-notation', 'brace-style',