@metamask/eslint-config-typescript
MetaMask's TypeScript ESLint configuration.
Usage
yarn add --dev \
eslint@^7.23.0 \
eslint-plugin-import@^2.22.0 \
@typescript-eslint/eslint-plugin@^3.9.1 \
@typescript-eslint/parser@^3.9.1 \
@metamask/eslint-config@^5.0.0 \
@metamask/eslint-config-typescript@^5.0.0
The order in which you extend ESLint rules matters.
The @metamask/*
eslint configs should be added to the extends
array last,
with @metamask/eslint-config
first, and @metamask/eslint-config-*
in any
order thereafter.
module.exports = {
root: true,
extends: [
'@metamask/eslint-config',
],
overrides: [
{
files: ['*.ts'],
extends: [
'@metamask/eslint-config-typescript',
],
},
],
};