1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 03:20:23 +01:00

Remove unnecessary file extensions (#15352)

This commit is contained in:
Brad Decker 2022-07-27 14:32:17 -05:00 committed by GitHub
parent 77c3b4622b
commit 693a6dfc0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 14 additions and 21 deletions

View File

@ -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',
},
};

View File

@ -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 {

View File

@ -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(
...[

View File

@ -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 ?? {};

View File

@ -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 };

View File

@ -8,7 +8,7 @@ jest.mock('react-redux', () => ({
},
}));
require('./transaction-activity-log.container.js');
require('./transaction-activity-log.container');
describe('TransactionActivityLog container', () => {
describe('mapStateToProps()', () => {

View File

@ -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()', () => {

View File

@ -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()', () => {

View File

@ -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()', () => {

View File

@ -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()', () => {

View File

@ -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()', () => {

View File

@ -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()', () => {

View File

@ -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()', () => {