Skip to content

Commit

Permalink
feat: @typescript-eslint/block-spacing
Browse files Browse the repository at this point in the history
BREAKING CHANGE: add rule @typescript-eslint/block-spacing and bump
minimum @typescript-eslint to 5.52.0

Co-authored-by: Rostislav Simonik <rostislav.simonik@technologystudio.sk>
  • Loading branch information
mightyiam and rostislav-simonik committed Jul 22, 2023
1 parent fb19302 commit 0a0585f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
6 changes: 6 additions & 0 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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', {
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 0a0585f

Please sign in to comment.