From 651fa65bc4bfe570856a7643f65bb8b94ef21046 Mon Sep 17 00:00:00 2001 From: Andrey Filimonov Date: Wed, 20 May 2020 00:50:40 +0200 Subject: [PATCH 1/2] fix: [dot-notation] explicitly redefine the rule --- src/index.test.ts | 6 +++++- src/index.ts | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/index.test.ts b/src/index.test.ts index 77015166..c09d8f91 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -65,7 +65,11 @@ test('export', (t): void => { ], '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], '@typescript-eslint/default-param-last': 'error', - '@typescript-eslint/dot-notation': ['error', { allowKeywords: true }], + '@typescript-eslint/dot-notation': ['error', { + allowPattern: '', + allowKeywords: true, + allowPrivateClassPropertyAccess: false + }], '@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true, allowHigherOrderFunctions: true, diff --git a/src/index.ts b/src/index.ts index a6254b5f..aee026b8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,6 @@ import { rules as standardRules } from 'eslint-config-standard/eslintrc.json' const equivalents = [ 'comma-spacing', - 'dot-notation', 'brace-style', 'func-call-spacing', 'indent', @@ -42,6 +41,7 @@ export = { camelcase: 'off', 'default-param-last': 'off', 'no-use-before-define': 'off', + 'dot-notation': 'off', // @typescript-eslint versions of Standard.js rules: ...fromEntries(equivalents.map((name) => [`@typescript-eslint/${name}`, standardRules[name]])), @@ -52,6 +52,11 @@ export = { variables: false, typedefs: false // Only the TypeScript rule has this option. }], + '@typescript-eslint/dot-notation': ['error', { + allowPattern: '', + allowKeywords: true, + allowPrivateClassPropertyAccess: false // Only the TypeScript rule has this option. + }], // Rules exclusive to Standard TypeScript: '@typescript-eslint/adjacent-overload-signatures': 'error', From ffadbfa16237b067565f84035d49f2eff3812e78 Mon Sep 17 00:00:00 2001 From: Andrey Filimonov Date: Wed, 20 May 2020 01:26:10 +0200 Subject: [PATCH 2/2] chore: sort rules alphabetically --- src/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index aee026b8..579d955d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -40,11 +40,16 @@ export = { ...fromEntries(equivalents.map((name) => [name, 'off'])), camelcase: 'off', 'default-param-last': 'off', - 'no-use-before-define': 'off', 'dot-notation': 'off', + 'no-use-before-define': 'off', // @typescript-eslint versions of Standard.js rules: ...fromEntries(equivalents.map((name) => [`@typescript-eslint/${name}`, standardRules[name]])), + '@typescript-eslint/dot-notation': ['error', { + allowPattern: '', + allowKeywords: true, + allowPrivateClassPropertyAccess: false // Only the TypeScript rule has this option. + }], '@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, @@ -52,11 +57,6 @@ export = { variables: false, typedefs: false // Only the TypeScript rule has this option. }], - '@typescript-eslint/dot-notation': ['error', { - allowPattern: '', - allowKeywords: true, - allowPrivateClassPropertyAccess: false // Only the TypeScript rule has this option. - }], // Rules exclusive to Standard TypeScript: '@typescript-eslint/adjacent-overload-signatures': 'error',