diff --git a/.eslintrc.base.js b/.eslintrc.base.js index 7f39e9c12..b4e93c1c9 100644 --- a/.eslintrc.base.js +++ b/.eslintrc.base.js @@ -72,12 +72,5 @@ module.exports = { // upgrading eslint and dependencies. This rule should be evaluated and // if agreeable turned on upstream in @metamask/eslint-config 'import/no-named-as-default-member': 'off', - - // This rule is set to off to avoid churn when upgrading eslint and its - // dependencies. This rule should be enabled and the failures fixed in - // a separate PR. This rule prevents adding file extensions to imports - // of the same type. E.G, not adding the '.js' extension to file names when - // inside a .js file. - 'import/extensions': 'off', }, }; diff --git a/development/build/scripts.js b/development/build/scripts.js index 923ee7849..566d9c8ec 100644 --- a/development/build/scripts.js +++ b/development/build/scripts.js @@ -46,7 +46,7 @@ const metamaskrc = require('rc')('metamask', { 'https://f59f3dd640d2429d9d0e2445a87ea8e1@sentry.io/273496', }); -const { streamFlatMap } = require('../stream-flat-map.js'); +const { streamFlatMap } = require('../stream-flat-map'); const { BuildType } = require('../lib/build-type'); const { diff --git a/development/build/styles.js b/development/build/styles.js index 926609dff..47c5e5c66 100644 --- a/development/build/styles.js +++ b/development/build/styles.js @@ -73,7 +73,7 @@ async function buildScssPipeline(src, dest, devMode, rtl) { // use our own compiler which runs sass in its own process // in order to not pollute the intrinsics // eslint-disable-next-line node/global-require - sass.compiler = require('./sass-compiler.js'); + sass.compiler = require('./sass-compiler'); } await pump( ...[ diff --git a/development/build/transforms/utils.js b/development/build/transforms/utils.js index fb7f49c32..0f8172cd3 100644 --- a/development/build/transforms/utils.js +++ b/development/build/transforms/utils.js @@ -1,5 +1,5 @@ const { ESLint } = require('eslint'); -const eslintrc = require('../../../.eslintrc.js'); +const eslintrc = require('../../../.eslintrc'); eslintrc.overrides.forEach((override) => { const rules = override.rules ?? {}; diff --git a/development/highlights/index.js b/development/highlights/index.js index 5ed891e5d..2b263005f 100644 --- a/development/highlights/index.js +++ b/development/highlights/index.js @@ -1,6 +1,6 @@ const { promisify } = require('util'); const exec = promisify(require('child_process').exec); -const storybook = require('./storybook.js'); +const storybook = require('./storybook'); module.exports = { getHighlights }; diff --git a/ui/components/app/transaction-activity-log/transaction-activity-log.container.test.js b/ui/components/app/transaction-activity-log/transaction-activity-log.container.test.js index 17302ce9d..cb6dbeab0 100644 --- a/ui/components/app/transaction-activity-log/transaction-activity-log.container.test.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log.container.test.js @@ -8,7 +8,7 @@ jest.mock('react-redux', () => ({ }, })); -require('./transaction-activity-log.container.js'); +require('./transaction-activity-log.container'); describe('TransactionActivityLog container', () => { describe('mapStateToProps()', () => { diff --git a/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js b/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js index 75eca3bfc..93e3cb81b 100644 --- a/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js +++ b/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js @@ -8,7 +8,7 @@ jest.mock('react-redux', () => ({ }, })); -require('./user-preferenced-currency-input.container.js'); +require('./user-preferenced-currency-input.container'); describe('UserPreferencedCurrencyInput container', () => { describe('mapStateToProps()', () => { diff --git a/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js b/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js index 64c0e702e..8c94ffa44 100644 --- a/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js +++ b/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js @@ -8,7 +8,7 @@ jest.mock('react-redux', () => ({ }, })); -require('./user-preferenced-token-input.container.js'); +require('./user-preferenced-token-input.container'); describe('UserPreferencedTokenInput container', () => { describe('mapStateToProps()', () => { diff --git a/ui/pages/send/send-content/add-recipient/add-recipient.container.test.js b/ui/pages/send/send-content/add-recipient/add-recipient.container.test.js index 2d8dd59b0..a78e51134 100644 --- a/ui/pages/send/send-content/add-recipient/add-recipient.container.test.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.container.test.js @@ -40,7 +40,7 @@ jest.mock('../../../../ducks/send', () => ({ getRecipient: (s) => `mockRecipient:${s}`, })); -require('./add-recipient.container.js'); +require('./add-recipient.container'); describe('add-recipient container', () => { describe('mapStateToProps()', () => { diff --git a/ui/pages/send/send-content/send-amount-row/send-amount-row.container.test.js b/ui/pages/send/send-content/send-amount-row/send-amount-row.container.test.js index 4911cb612..88b411b8e 100644 --- a/ui/pages/send/send-content/send-amount-row/send-amount-row.container.test.js +++ b/ui/pages/send/send-content/send-amount-row/send-amount-row.container.test.js @@ -15,7 +15,7 @@ jest.mock('../../../../ducks/send', () => ({ updateSendAmount: jest.fn(), })); -require('./send-amount-row.container.js'); +require('./send-amount-row.container'); describe('send-amount-row container', () => { describe('mapDispatchToProps()', () => { diff --git a/ui/pages/send/send-content/send-gas-row/send-gas-row.container.test.js b/ui/pages/send/send-content/send-gas-row/send-gas-row.container.test.js index 198729f29..1838392c3 100644 --- a/ui/pages/send/send-content/send-gas-row/send-gas-row.container.test.js +++ b/ui/pages/send/send-content/send-gas-row/send-gas-row.container.test.js @@ -48,7 +48,7 @@ jest.mock('../../../../ducks/gas/gas.duck', () => ({ setCustomGasLimit: jest.fn(), })); -require('./send-gas-row.container.js'); +require('./send-gas-row.container'); describe('send-gas-row container', () => { describe('mapDispatchToProps()', () => { diff --git a/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js index 23f1d2c68..cec2c2d8b 100644 --- a/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js +++ b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js @@ -12,7 +12,7 @@ jest.mock('../../../../../ducks/send', () => ({ getSendErrors: (s) => `mockErrors:${s}`, })); -require('./send-row-error-message.container.js'); +require('./send-row-error-message.container'); describe('send-row-error-message container', () => { describe('mapStateToProps()', () => { diff --git a/ui/pages/send/send-footer/send-footer.container.test.js b/ui/pages/send/send-footer/send-footer.container.test.js index d5eb9f8ab..abcf0f8b5 100644 --- a/ui/pages/send/send-footer/send-footer.container.test.js +++ b/ui/pages/send/send-footer/send-footer.container.test.js @@ -12,7 +12,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../store/actions.js', () => ({ +jest.mock('../../../store/actions', () => ({ addToAddressBook: jest.fn(), cancelTx: jest.fn(), })); @@ -31,12 +31,12 @@ jest.mock('../../../ducks/send', () => ({ signTransaction: jest.fn(), })); -jest.mock('../../../selectors/custom-gas.js', () => ({ +jest.mock('../../../selectors/custom-gas', () => ({ getRenderableEstimateDataForSmallButtonsFromGWEI: (s) => [ { gasEstimateType: `mockGasEstimateType:${s}` }, ], })); -require('./send-footer.container.js'); +require('./send-footer.container'); describe('send-footer container', () => { describe('mapDispatchToProps()', () => {