Try typescript

pull/7/head
0mkar 6 years ago
parent 8607d3bbba
commit ebd0d96d29
  1. 5
      remix-resolve/package.json
  2. 8
      remix-resolve/src/index.ts
  3. 21
      remix-resolve/tsconfig.json
  4. 113
      remix-resolve/tslint.json

@ -7,6 +7,7 @@
"remix-resolve": "./bin/remix-resolve" "remix-resolve": "./bin/remix-resolve"
}, },
"scripts": { "scripts": {
"build": "tsc",
"lint": "standard", "lint": "standard",
"test": "standard && mocha tests/ -t 300000" "test": "standard && mocha tests/ -t 300000"
}, },
@ -35,6 +36,8 @@
}, },
"devDependencies": { "devDependencies": {
"mocha": "^5.1.0", "mocha": "^5.1.0",
"standard": "^12.0.1" "standard": "^12.0.1",
"tslint": "^5.11.0",
"typescript": "^3.1.6"
} }
} }

@ -0,0 +1,8 @@
/*
const rr = require('remix-resolve')
const fileContent = rr.resolve('https://github.com/ethereum/greeter.sol')
const input = rr.combineSource({ 'greeter.sol': content })
*/
export * from './resolve.js'
export * from './combineSource.js'
export * from './getFile.js'

@ -0,0 +1,21 @@
{
"compileOnSave": false,
"include": ["./src"],
"compileOptions": {
"baseUrl": "./src",
"outDir": "./dist",
"sourceMap": false,
"declaration": false,
"module": "commonjs",
"strict": true,
"noImplicitAny": false,
"strictPropertyInitialization": false,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": ["node_modules/@types"],
"lib": ["dom", "es2018"],
"paths": {
"remix-resolve": ["./"]
}
}
}

@ -0,0 +1,113 @@
{
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": false,
"deprecation": {
"severity": "warn"
},
"forin": false,
"import-spacing": true,
"indent": [
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-arg": true,
"no-bitwise": false,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-duplicate-super": true,
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-misused-new": true,
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"prefer-const": true,
"quotemark": [
false,
"single"
],
"radix": true,
"semicolon": [
true,
"never"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"unified-signatures": true,
"variable-name": false,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
]
}
}
Loading…
Cancel
Save