Add tslint and prettier to ci

This commit is contained in:
Daniel McNab 2018-10-08 22:36:47 +01:00
parent f4ad36e972
commit 3a405b65d6
5 changed files with 621 additions and 401 deletions

View file

@ -1,19 +1,24 @@
language: rust
matrix: matrix:
include: include:
- rust: stable - language: rust
rust: stable
script: script:
- cargo gen-kinds --verify - cargo gen-kinds --verify
- cargo gen-tests --verify - cargo gen-tests --verify
- cargo test - cargo test
# - rust: nightly # - language: rust
# rust: nightly
# before_script: # before_script:
# - rustup component add clippy-preview # - rustup component add clippy-preview
# - rustup component add rustfmt-preview # - rustup component add rustfmt-preview
# script: # script:
# - cargo fmt --all -- --check || true # - cargo fmt --all -- --check || true
# - cargo clippy # - cargo clippy
- language: node_js
node_js: node
before_script: false
script:
- cd editors/code && npm ci && npm run travis; cd ../..
allow_failures: allow_failures:
- rust nightly - rust nightly

File diff suppressed because it is too large Load diff

View file

@ -17,17 +17,26 @@
"vscode:prepublish": "npm run compile", "vscode:prepublish": "npm run compile",
"compile": "tsc -p ./", "compile": "tsc -p ./",
"watch": "tsc -watch -p ./", "watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install" "postinstall": "node ./node_modules/vscode/bin/install",
"lint": "tslint --project .",
"prettier": "prettier **/*.{json,ts}",
"travis": "npm run compile && npm run lint && npm run prettier --list-different"
},
"prettier": {
"tabWidth": 4
}, },
"dependencies": { "dependencies": {
"vscode-languageclient": "^4.4.0" "vscode-languageclient": "^4.4.0"
}, },
"devDependencies": { "devDependencies": {
"@types/mocha": "^2.2.42",
"@types/node": "^8.10.34",
"prettier": "^1.14.3",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0",
"typescript": "^2.6.1", "typescript": "^2.6.1",
"vscode": "^1.1.21", "vsce": "^1.51.1",
"vsce": "^1.42.0", "vscode": "^1.1.21"
"@types/node": "^8.10.25",
"@types/mocha": "^2.2.42"
}, },
"activationEvents": [ "activationEvents": [
"onLanguage:rust" "onLanguage:rust"

View file

@ -1,13 +1,9 @@
{ {
"defaultSeverity": "error", "defaultSeverity": "error",
"extends": [ "extends": ["tslint:recommended", "tslint-config-prettier"],
"tslint:recommended"
],
"jsRules": {},
"rules": { "rules": {
"quotemark": [true, "single"], "quotemark": [true, "single"],
"interface-name": false, "interface-name": false,
"object-literal-sort-keys": false "object-literal-sort-keys": false
}, }
"rulesDirectory": []
} }