Code Monkey home page Code Monkey logo

poy's People

Contributors

nathsou avatar xerios avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xerios

poy's Issues

editorconfig is unecessary when you have prettier

At first I had the impression that most editors supported the editorconfig file by default, unfortunately that's not the case. For instance, vscode requires an extension to support editorconfig.

Prettier is great but it is as they say "opinionated" and unfortunately not very customizable.
Personally I use eslint stylistic with eslint + import + typescript plugins, which allows a more fine-tuned control over the style while still providing all the warnings and error-checking.

It takes time to setup a proper config matching prettier, so here's mine if you're interested:
https://gist.github.com/Xerios/efa3a230629d92a537efb866b24f7987

Otherwise if you don't want to mess with formatting, you can simply remove editorconfig and keep prettier config

Sepearate big classes into separate files

This kind of requires to make some methods public, but benefits outweigh the useless private declaration imo

import { inferFunc, inferLet, inferStmt } from './infer.stmt.js'
import { inferDecl } from './infer.decl.js'
//...
export class TypeEnv {
  //...
  inferDecl = inferDecl
  inferExpr = inferExpr
  inferStmt = inferStmt
  inferLet = inferLet
  inferFunc = inferFunc
export function inferExpr(this: TypeEnv, expr: Expr): Type {

Along with vscode's ability to nest files

  "explorer.fileNesting.patterns": {
    "*.ts": "$(capture).js, $(capture).d.ts.map, $(capture).*.ts",

image

Overall this may give a better dev experience

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.