diff --git a/@typescript-eslint.js b/@typescript-eslint.js index e69a552..39ebeb4 100644 --- a/@typescript-eslint.js +++ b/@typescript-eslint.js @@ -9,6 +9,10 @@ const config = { 'plugin:prettier/recommended' ], rules: { + // explicitly (re)enable this as it's disabled by eslint-config-prettier + // and its likely our standard JS config will be used alongside this one + 'curly': 'error', + '@typescript-eslint/array-type': ['error', { default: 'array-simple' }], '@typescript-eslint/default-param-last': 'error', '@typescript-eslint/explicit-member-accessibility': 'error', diff --git a/flowtype.js b/flowtype.js index 7a8564f..db34a6e 100644 --- a/flowtype.js +++ b/flowtype.js @@ -4,6 +4,10 @@ const config = { plugins: ['flowtype', 'prettier'], extends: ['plugin:flowtype/recommended', 'plugin:prettier/recommended'], rules: { + // explicitly (re)enable this as it's disabled by eslint-config-prettier + // and its likely our standard JS config will be used alongside this one + 'curly': 'error', + 'flowtype/array-style-complex-type': ['error', 'verbose'], 'flowtype/array-style-simple-type': ['error', 'shorthand'], 'flowtype/arrow-parens': ['error', 'as-needed'], diff --git a/react.js b/react.js index b2f563d..9fb96c0 100644 --- a/react.js +++ b/react.js @@ -30,6 +30,10 @@ const config = { } ], rules: { + // explicitly (re)enable this as it's disabled by eslint-config-prettier + // and its likely our standard JS config will be used alongside this one + 'curly': 'error', + 'react/button-has-type': 'warn', 'react/default-props-match-prop-types': 'warn', 'react/display-name': 'off', // todo: re-look into diff --git a/test/configs.spec.ts b/test/configs.spec.ts index b789eeb..7174f86 100644 --- a/test/configs.spec.ts +++ b/test/configs.spec.ts @@ -237,6 +237,12 @@ describe('for each config file', () => { expect(config.plugins).toContainEqual('prettier'); expect(config.extends).toContainEqual('plugin:prettier/recommended'); }); + + it('should explicitly set curly', () => { + expect.hasAssertions(); + + expect(config.rules).toHaveProperty('curly', 'error'); + }); } }); });