Skip to content

Instantly share code, notes, and snippets.

View sandersn's full-sized avatar
😷
triage+review community PRs

Nathan Shively-Sanders sandersn

😷
triage+review community PRs
View GitHub Profile
## Triaged rules
### Bad rules
- no-inferrable-types (who cares what tests do? and doesn't apply to .d.ts)
- no-var-requires (only in tests, and approx 0% of people would do this anyway)
- prefer-readonly (private variables not modified outside constructor must be marked `readonly`)
- function-constructor (no `new Function`, only in tests, who cares)
- label-position (labels only on `do/for/while/switch`, only in tests, who cares, TS will catch syntax errors)
- no-arg (no `arguments.callee`, only in tests, who cares)
- no-construct (no `new String` `new Number` `new Boolean`, only in tests, who cares)
@sandersn
sandersn / errs1.txt
Last active October 3, 2023 15:35
Current dtslint-runner errors
3> akamai-edgeworkers failing:
3> Error: Errors in typescript@4.5 for external dependencies:
3> error TS2318: Cannot find global type 'Array'.
3> error TS2318: Cannot find global type 'Boolean'.
3> error TS2318: Cannot find global type 'Function'.
3> error TS2318: Cannot find global type 'IArguments'.
3> error TS2318: Cannot find global type 'Number'.
3> error TS2318: Cannot find global type 'Object'.
3> error TS2318: Cannot find global type 'Promise'.
3> error TS2318: Cannot find global type 'RegExp'.
@babel/runtime 45
eslint-plugin-import 20
babel-loader 19
@babel/polyfill 15
@babel/preset-typescript 14
download-git-repo 14
css-loader 12
@babel/cli 12
@babel/preset-react 12
less-loader 11
@sandersn
sandersn / gist:efacf9b4d67f0c89faed44dbfa0d5f60
Created November 18, 2021 00:51
checker-error-examples
Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async
let async
export const l = [1,2,3]
for (async of l) {
console.log(x)
}
Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement
for (let y, x in [1,2,3]) {
console.log(x)
}
@sandersn
sandersn / osd-bug-summary.md
Last active September 30, 2020 16:26
Summary of OSD bugs
  • If you want to contribute to a large open source project, many of the error message bugs are simple enough to let you focus on that.
  • If you want to learn to write concise, correct Typescript types, look at the standard library/DOM bugs. The DOM bugs, especially, are in a smaller repo with less building overhead.
  • If you want to learn about compilers, the parser bugs are a good place to start, mostly because it's easier to figure out what the parser should be doing.
  • If you want something interactive, take a look at the codefix bugs. They tend to be complicated to test, but it's super cool when you see your changes running in an editor. (The intellisense, formatter and smart select bugs are similar.)

Improve/fix error messages

These bugs range from fixing message grammar, splitting one error into several, up to restructuring code to be able to give more detailed errors.

@sandersn
sandersn / union-prayer-meeting-notes.md
Last active June 27, 2020 18:58
Meeting Notes from Union prayer meeting

Black newspapers in Seattle

> types-publisher@0.0.0 check /home/nathansa/types-publisher
> node bin/check-parse-results.js
Using local Definitely Typed at ../DefinitelyTyped.
Typings already defined for akumina-core (Akumina) as of 1.1.1 (our version: 4.5)
To fix this:
git checkout -b not-needed-akumina-core
yarn not-needed akumina-core 1.1.1 https://github.com/akumina/AkuminaDev "Akumina"
git add --all && git commit -m "akumina-core: Provides its own types" && git push -u origin not-needed-akumina-core
[
[
"node",
254
],
[
"...",
208
],
[