unional / typescript-blackbook Goto Github PK
View Code? Open in Web Editor NEWThe TypeScript Blackbook
Home Page: http://unional.github.io/typescript-blackbook/
License: MIT License
The TypeScript Blackbook
Home Page: http://unional.github.io/typescript-blackbook/
License: MIT License
Convert all chapters using new format
function fool(name: string) {
reutnr `Hi ${name} fool`
}
reutnr
should be return
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@docusaurus/core
, @docusaurus/module-type-aliases
, @docusaurus/plugin-client-redirects
, @docusaurus/preset-classic
, @docusaurus/theme-classic
, @docusaurus/types
).github/workflows/codeql-analysis.yml
actions/checkout v4
github/codeql-action v3
github/codeql-action v3
github/codeql-action v3
.github/workflows/pull-request.yaml
.github/workflows/release.yml
docs/package.json
github-page/package.json
@docusaurus/core 2.4.3
@docusaurus/plugin-client-redirects ^2.2.0
@docusaurus/preset-classic 2.4.3
@mdx-js/react ^1.6.22
clsx ^2.0.0
prism-react-renderer ^1.3.5
react ^18.0.0
react-dom ^18.0.0
@docusaurus/module-type-aliases 2.4.3
@docusaurus/theme-classic ^2.2.0
@docusaurus/types ^2.2.0
@tsconfig/docusaurus ^2.0.0
@types/node ^18.11.9
typescript ^5.0.0
package.json
prettier ^3.0.0
prettier-plugin-astro ^0.13.0
turbo ^1.7.4
pnpm 8.15.3
page/package.json
@astrojs/mdx ^0.19.0
@astrojs/react ^3.0.0
@astrojs/solid-js ^4.0.0
@astrojs/tailwind ^5.0.0
@tanstack/react-query ^5.0.0
@types/react ^18.0.26
@types/react-dom ^18.0.9
astro ^2.3.0
react ^18.0.0
react-dom ^18.0.0
solid-js ^1.6.10
tailwindcss ^3.2.6
tools/style/package.json
Work on one topic at a time. Update a guideline that is marked as draft to fit with TypeScript.
Need some help on this:
https://github.com/unional/typescript/blob/master/packages/tslint-config-unional/gulpfile.js#L19-L21
To flip failed test to success and vice versa.
A little background:
That code is using gulp-tslint
to ensure rules are working and specified as I meant it to be.
Positive test is easy.
I try to add negative test to make sure it does capture any violated style.
gulp-tslint
pass back a file, something like:
<File "label-position.fail.ts" <Buffer 73 74 61 72 74 3a 0a 76 61 72 20 78 20 3d 20 31 3b 0a>>
<File "no-conditional-assignment.fail.ts" <Buffer 76 61 72 20 78 2c 20 79 3b 0a 69 66 20 28 78 20 3d 20 79 29 20 7b 0a 0a 7d 0a>>
<File "no-construct.fail.ts" <Buffer 76 61 72 20 78 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 28 27 73 27 29 3b 0a>>
I am expecting it would give me some information in the form of:
https://github.com/palantir/tslint/blob/master/src/lint.ts#L40-L45
export interface LintResult {
failureCount: number;
failures: RuleFailure[];
format: string;
output: string;
}
and
https://github.com/palantir/tslint/blob/master/src/language/rule/rule.ts#L74-L137:
export class RuleFailure {
private sourceFile: ts.SourceFile;
private fileName: string;
private startPosition: RuleFailurePosition;
private endPosition: RuleFailurePosition;
private failure: string;
private ruleName: string;
constructor(sourceFile: ts.SourceFile,
start: number,
end: number,
failure: string,
ruleName: string) {
this.sourceFile = sourceFile;
this.fileName = sourceFile.fileName;
this.startPosition = this.createFailurePosition(start);
this.endPosition = this.createFailurePosition(end);
this.failure = failure;
this.ruleName = ruleName;
}
public getFileName() {
return this.fileName;
}
public getRuleName() {
return this.ruleName;
}
public getStartPosition(): RuleFailurePosition {
return this.startPosition;
}
public getEndPosition(): RuleFailurePosition {
return this.endPosition;
}
public getFailure() {
return this.failure;
}
public toJson(): any {
return {
endPosition: this.endPosition.toJson(),
failure: this.failure,
name: this.fileName,
ruleName: this.ruleName,
startPosition: this.startPosition.toJson(),
};
}
public equals(ruleFailure: RuleFailure) {
return this.failure === ruleFailure.getFailure()
&& this.fileName === ruleFailure.getFileName()
&& this.startPosition.equals(ruleFailure.getStartPosition())
&& this.endPosition.equals(ruleFailure.getEndPosition());
}
private createFailurePosition(position: number) {
const lineAndCharacter = this.sourceFile.getLineAndCharacterOfPosition(position);
return new RuleFailurePosition(position, lineAndCharacter);
}
}
But I may be wrong.
Current info comes from airbnb/javascript master. I have some changes to their styles.
Need to get them over here.
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.
Since we did not receive a CI status on the greenkeeper/initial
branch, we assume that you still need to configure it.
If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/
.
We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
master
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here is some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
semantic-release cannot push the version tag to the branch master
on the remote Git repository with URL https://[secure]@github.com/unional/typescript-guidebook.git
.
This can be caused by:
Good luck with your project ✨
Your semantic-release bot 📦🚀
Aloha! :-)
You have renamed the repo and currently, links on https://www.npmjs.com/package/typescript-style are not working. It's not a issue, but it's a little note - your npm package had topic position on google queries ))
Resolve rendering references.
i.e. expending the image reference to any references, including syntax-highlighting code block.
This eslint
rule does not work with the following:
function foo(options: foo.Options) {}
namespace foo {
export type Options = {}
}
See if we can create a different version of the rule to exclude checking type in eslint-plugin-harmony
I want the chapters to be more useful as a reference.
When user comes to the style guide, they have certain style question in mind.
I want to organize the table of content so that the user knows right away where to look for answers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.