Based on https://robertcooper.me/post/using-eslint-and-prettier-in-a-typescript-project
yarn add eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin prettier eslint-config-prettier eslint-plugin-prettier --dev
.eslintrc.js
import { hcf, lcm } from './utils/hcf-lcm'; | |
export class Fraction { | |
private _num: number = 0; | |
private _den: number = 1; | |
get numerator() { | |
return this._num; | |
} | |
set numerator(value: number) { |
Based on https://robertcooper.me/post/using-eslint-and-prettier-in-a-typescript-project
yarn add eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin prettier eslint-config-prettier eslint-plugin-prettier --dev
.eslintrc.js