Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • s88119/ts-setup-test
1 result
Show changes
Commits on Source (3)
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
build/
{
"extends": "./node_modules/gts/"
}
# Ignore typical output directories
dist
target
out
.webpack
# Node.js specific
node_modules
# Cache directories
.npm
.eslintcache
.tsbuildinfo
# macos specific files
.DS_Store
# test output
junit.xml
coverage
# mongodb
mongodata
mongodatatest
# ignore log files
*.log
module.exports = {
...require('gts/.prettierrc.json')
}
This diff is collapsed.
{
"name": "",
"version": "0.0.0",
"description": "",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"files": [
"build/src"
],
"license": "Apache-2.0",
"keywords": [],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "gts lint",
"clean": "gts clean",
"compile": "tsc",
"fix": "gts fix",
"prepare": "npm.cmd run compile",
"pretest": "npm.cmd run compile",
"posttest": "npm.cmd run lint"
},
"devDependencies": {
"gts": "^5.3.0",
"typescript": "~5.4.3",
"@types/node": "20.11.5"
}
}
console.log('Try npm run lint/fix!');
const longString =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut aliquet diam.';
const trailing = 'Semicolon';
const why = {am: 'I tabbed?'};
const iWish = "I didn't have a trailing space...";
const sicilian = true;
const vizzini = sicilian ? !sicilian : sicilian;
const re = /foo {3}bar/;
export function doSomeStuff(
withThis: string,
andThat: string,
andThose: string[]
) {
//function on one line
if (!andThose.length) {
return false;
}
if ('without brackets') console.error("should've used brackets");
console.log(withThis);
console.log(andThat);
console.dir(andThose);
console.log(longString, trailing, why, iWish, vizzini, re);
return;
}
// TODO: more examples
{
"extends": "./node_modules/gts/tsconfig-google.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
},
"include": [
"src/**/*.ts",
"test/**/*.ts"
]
}