Grit automatically fixes technical debt by combining static analysis and machine learning to generate pull requests that clean up code and migrate to the latest frameworks.
新しい構文がやってくる ご存知の通り、JavaScript の標準仕様である ECMAScript では毎年新しい記法や構文が提案され、採択されています。もちろん JavaScript のスーパーセットである TypeScript もその例外ではありません。 TypeScript では基本的に ECMAScript Proposal の Stage3 になった仕様から順次サポートするという方針があります。最近であれば v5.0 に入った Decorators や v5.2 で導入される using Declarations(Explicit Resource Management)などが該当します。 ここまでのことは普段 TypeScript を利用している方であれば知っている方も多いでしょう。しかし実際に TypeScript で新しい構文がサポートされた後、typescript-esl
This article was discussed on Hacker News. This is a continuation of my last post on how to write a tree-sitter grammar in an afternoon. Building on the grammar we wrote, now we’re going to write a linter for Imp, and it’s even easier! The final result clocks in less than 60 SLOC and can be found here. Recall that tree-sitter is an incremental parser generator. That is, you give it a description o
Programmatically modify JavaScript and TypeScript source codes with a simplified, elegant and familiar syntax. Built on top of the AST parsed by recast and babel. ❯ 🧙🏼 Magical modify a JS/TS file and write back magically just like JSON! ❯ 🔀 Exports/Import manipulate module's imports and exports at ease ❯ 💼 Function Arguments easily manipulate arguments passed to a function call, like defineCon
Romeとは 現代のJavascript開発には多くのツールチェーンが必要とされます。Babel,webpack,Jest,ESLint,Prettier,Typescriptなどを組み合わせて開発することが多く、さらにこれらの一部代替選としてesbuild,SWC,Viteなどのツールチェーンの選択肢が存在し、選択肢の多さやその組み合わせの複雑さに苦い思いをしたことがある方も少なくないのではないと思います。 こうした中で、新たに開発が進められているツールチェーン、Romeをご存知でしょうか? Romeは先に挙げたように複数のツールチェーンを役割ごとに組み合わせて使うのではなく、1つのツールチェーンでこれら全ての役割を担ってしまおうという壮大な計画を持つツールチェーンです。 Romeは2020/03にFacebookより発表されました。現在は法人化され、yarnやBabelの生みの親である
The OpenRewrite project is an automated refactoring ecosystem for source code, enabling developers to effectively eliminate technical debt within their repositories. It consists of an auto-refactoring engine that runs prepackaged, open source refactoring recipes for common framework migrations, security fixes, and stylistic consistency tasks—reducing your coding effort from hours or days to minute
An insane fast Javascript toolchain. WIP Kataw is a JavaScript toolchain that aim to unify functionality that has previously been separate tools. It features everything from low-level CST manipulation to tools like linting, code analyzes, transform, and minification. CST nodes CST keywords ESNext Diagnostics Diagnostic arguments Printing Ignore comment Linting Transformation Types Comments CST par
Note! As of now the author ran out of time. If anyone wants to help out "fixing" a small part of my private code, so it can be ported to Escaya. This parser can be completed. Just ping me in the 'TODO's issue on this repo if interested. Escaya An blazing fast 100% spec compliant, incremental javascript parser written in Typescript Work in progress Features Conforms to the standard ECMAScript® 2021
const unified = require('unified') const { parser } = require('@geut/jsdast') const tree = unified().use(parser).parse(` /** * @param {number} a * @param {number} b * @returns {number} */ function sum(a, b) { return a + b } `) console.log(JSON.stringify(tree, null, 2)) /* { "type": "Root", "children": [ { "type": "Module", "name": "Index", "doc": { "description": "", "tags": [] }, "children": [ {
つい先日 beta リリースされたフロントエンドのツールチェインの Rome について、その思想とコードを読んだ結果の現状について。 Rome Frontend Toolchain この記事は公式ドキュメント以外にもソースを読んで得られた undocumented な部分も含んでいるので、すぐ古くなる。その前提で読むように。 問題の認識とその解決手段 フロントエンドの最適化は実行前のプリプロセスに、エコシステムの開発リソースの多くが当てられている。Node のツールチェインが発達するにつれて、自前の パーサ+AST 定義を持つ実装が増えていった歴史がある。 acorn(estree) babel prettier typescript terser それぞれのツールの生成する AST はそのツールの都合で微妙に/もしくは大幅に定義がずれている。typescript に至っては完全に別物。こ
前 v7.1.0 | 次 v7.3.0 ESLint v7.2.0 has been released!https://t.co/8dSO0Hc5X7 — ESLint (@geteslint) June 6, 2020 ESLint 7.2.0 がリリースされました。小さな機能追加とバグ修正が含まれています。 また、日本語のサポートチャットが Gitter から Discord に移動しました。 質問やバグ報告等ありましたら、お気軽にこちらまでお寄せください。 🏢 日本語 Issue 管理リポジトリ 👫 日本語サポート チャット (招待リンク) 🏢 本家リポジトリ 👫 本家サポート チャット (招待リンク) [PR] ESLint は開発リソースを確保するための寄付を募っています。 応援してくださると嬉しいです。 ESLint の GitHub Sponsors 私個人の Git
はじめに JavaScriptのコードを一括で変換したり修正したい場合、正規表現などを使い置換しますか? シンプルなケースであればそれでも問題ないですが、複雑な変換であればASTベースでコードを自在に変換できる「jscodeshift」が便利です。 jscodeshiftを利用すると、以下のようなことができます。 例) functionで書かれた関数をアロー関数に一括で変換 target/arrow-function/index.js const fn = function() { console.log("foo"); }.bind(this); [1, 2, 3].map(function(v) { return v * v; }); Promise.resolve() .then(function() { console.log("foo"); }) .then(function()
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く