kata-ai / kata-ai/development-standard

[RFC] Migrating to ESLint, and code formatting with Prettier

Open
#1 0 comments 0 reactions 3 assignees Claimed by @mandocaesar View on GitHub
rfc
Dominant language
No language data
Stars
38
Forks
4
PR merge metrics
No merged PRs in 30d

Description

## Summary

We need to ensure our development tooling keeps in track with the current practices. [TSLint is already deprecated](https://medium.com/palantir/tslint-in-2019-1a144c2317a9). Therefore, we will need to port the configs for our [development standard](https://github.com/kata-ai/development-standard) to its ESLint counterpart.

Moreover, to prevent the headache of formatting code, we should standardise using [Prettier](https://prettier.io/), which is supported on many editors, and is runnable during commit time with tools like [lint-staged](https://github.com/okonet/lint-staged).

## Motivation

This RFC serves as a baseline for proper linting + formatting within all JavaScript/TypeScript codebase within Kata.ai, to ensure all JavaScript/TypeScript codes align to the Development Standard.

In future RFCs, we may also tinker around with tools like `lint-staged` for automatically running Prettier on commit time.

## Exceptions

For projects within Kata.ai that are about to be sunset, this change need not applied.

## Drawbacks

We need to factor in maintenance costs in applying the new ESLint config. In many cases, most of the code formatting issues can be solved by Prettier implementation. In addition, since the ESLint config as it stands is an extension of Airbnb config, any linting rules that didn't align to our Standard shall be fixed and published to npm.

## Additional context

The new ESLint config has already been developed alongside [Aksara UI](https://github.com/kata-ai/aksara-ui), and we use that project, as well as other frontend projects within Kata.ai, to dogfood the ESLint config's implementation.

The ESLint config will live in https://github.com/kata-ai/eslint-config-kata. Further changes to the ESLint config shall go through another RFC process in the Development Standard.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.