Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Build system enhancements #1619

Merged
merged 6 commits into from
Oct 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .eslintrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ typings/.basedir.ts
# vim swap files
*.swo
*.swp

# grunt-ts, see See https://github.com/grunt-ts/grunt-ts/issues/77
.baseDir.ts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can go away now

127 changes: 0 additions & 127 deletions Gruntfile.js

This file was deleted.

4 changes: 1 addition & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ environment:
install:
- ps: Install-Product node $env:nodejs_version
- npm install
- npm install -g grunt-cli

test_script:
- node --version
- npm --version
- grunt --version
- grunt
- npm run verify

build: off
3 changes: 3 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ general:
dependencies:
pre:
- case $CIRCLE_NODE_INDEX in 0) nvm use 4.2 ;; 1) nvm use 5.7 ;; 2) nvm use 6.1 ;; esac
test:
override:
- npm run verify
deployment:
npm-latest:
# match semver tag (e.g. 3.12.7)
Expand Down
29 changes: 0 additions & 29 deletions custom-typings/resolve.d.ts

This file was deleted.

40 changes: 30 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,23 @@
"linter"
],
"scripts": {
"test": "grunt"
"clean": "npm-run-all -p clean:core clean:test",
"clean:core": "rm -rf lib",
"clean:test": "rm -rf build && rm -rf test/config/node_modules",
"docs": "node scripts/buildDocs.js",
"compile": "npm-run-all -p compile:core compile:test -s compile:scripts",
"compile:core": "tsc -p src",
"compile:scripts": "tsc -p scripts",
"compile:test": "tsc -p test",
"lint": "npm-run-all -p lint:core lint:test",
"lint:core": "tslint src/**/*.ts",
"lint:test": "tslint test/**/*.ts -e test/**/*.test.ts",
"test": "npm-run-all test:pre -p test:bin test:mocha test:rules",
"test:pre": "cd ./test/config && npm install",
"test:bin": "./test/check-bin.sh &> /dev/null",
"test:mocha": "mocha --reporter spec --colors build/test/**/*Tests.js build/test/assert.js",
"test:rules": "node ./build/test/ruleTestRunner.js",
"verify": "npm-run-all clean compile lint test docs"
},
"dependencies": {
"colors": "^1.1.2",
Expand All @@ -29,18 +45,22 @@
"underscore.string": "^3.3.4"
},
"devDependencies": {
"@types/chai": "^3.4.34",
"@types/colors": "^0.6.33",
"@types/diff": "0.0.31",
"@types/findup-sync": "^0.3.29",
"@types/glob": "^5.0.30",
"@types/js-yaml": "^3.5.28",
"@types/mocha": "^2.2.32",
"@types/node": "^6.0.45",
"@types/optimist": "0.0.29",
"@types/resolve": "0.0.4",
"@types/underscore": "^1.7.33",
"@types/underscore.string": "0.0.30",
"chai": "^3.0.0",
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-eslint": "^19.0.0",
"grunt-mocha-test": "^0.13.2",
"grunt-npm-command": "^0.1.2",
"grunt-run": "~0.6.0",
"grunt-ts": "^5.5.1",
"grunt-tslint": "latest",
"js-yaml": "^3.6.1",
"mocha": "^3.1.0",
"npm-run-all": "^3.1.0",
"tslint": "latest",
"tslint-test-config-non-relative": "file:test/external/tslint-test-config-non-relative",
"typescript": "2.0.3"
Expand Down
2 changes: 2 additions & 0 deletions scripts/buildDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ interface IDocumentation {

const DOCS_DIR = "../docs";

process.chdir("./scripts");

/**
* Documentation definition for rule modules.
*/
Expand Down
File renamed without changes.
35 changes: 6 additions & 29 deletions scripts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,12 @@
{
"version": "1.8.0",
"version": "2.0.3",
"compilerOptions": {
"module": "commonjs",
"noImplicitAny": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"declaration": false,
"sourceMap": false,
"target": "es5",
"outDir": "."
},
"atom": {
"rewriteTsconfig": false
},
"filesGlob": [
"../custom-typings/**/*.d.ts",
"../typings/**/*.d.ts",
"./*.ts"
],
"files": [
"../custom-typings/object.d.ts",
"../custom-typings/resolve.d.ts",
"../typings/colors/colors.d.ts",
"../typings/diff/diff.d.ts",
"../typings/findup-sync/findup-sync.d.ts",
"../typings/glob/glob.d.ts",
"../typings/js-yaml/js-yaml.d.ts",
"../typings/minimatch/minimatch.d.ts",
"../typings/node/node.d.ts",
"../typings/optimist/optimist.d.ts",
"../typings/tsd.d.ts",
"../typings/underscore.string/underscore.string.d.ts",
"../typings/underscore/underscore.d.ts",
"buildDocs.ts"
]
}
"target": "es5"
}
}
2 changes: 1 addition & 1 deletion src/language/rule/typedRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {AbstractRule} from "./abstractRule";
import {RuleFailure} from "./rule";

export abstract class TypedRule extends AbstractRule {
public apply(sourceFile: ts.SourceFile): RuleFailure[] {
public apply(_sourceFile: ts.SourceFile): RuleFailure[] {
// if no program is given to the linter, throw an error
throw new Error(`${this.getOptions().ruleName} requires type checking`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/language/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function getSourceFile(fileName: string, source: string): ts.SourceFile {
getCanonicalFileName: (filename: string) => filename,
getCurrentDirectory: () => "",
getDefaultLibFileName: () => "lib.d.ts",
getDirectories: (path: string) => [],
getDirectories: (_path: string) => [],
getNewLine: () => "\n",
getSourceFile: (filenameToGet: string) => {
if (filenameToGet === normalizedName) {
Expand Down
8 changes: 4 additions & 4 deletions src/rules/memberOrderingRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ export class MemberOrderingWalker extends Lint.RuleWalker {
super.visitPropertySignature(node);
}

public visitTypeLiteral(node: ts.TypeLiteralNode) {
public visitTypeLiteral(_node: ts.TypeLiteralNode) {
// don't call super from here -- we want to skip the property declarations in type literals
}

public visitObjectLiteralExpression(node: ts.ObjectLiteralExpression) {
public visitObjectLiteralExpression(_node: ts.ObjectLiteralExpression) {
// again, don't call super here - object literals can have methods,
// and we don't wan't to check these
}
Expand All @@ -298,7 +298,7 @@ export class MemberOrderingWalker extends Lint.RuleWalker {
const failure = this.createFailure(
node.getStart(),
node.getWidth(),
`Declaration of ${toString(currentMember)} not allowed to appear after declaration of ${toString(this.previousMember)}`
`Declaration of ${toString(currentMember)} not allowed to appear after declaration of ${toString(this.previousMember)}`,
);
this.addFailure(failure);
}
Expand Down Expand Up @@ -367,7 +367,7 @@ export class MemberOrderingWalker extends Lint.RuleWalker {
this.addFailure(this.createFailure(
node.getStart(),
node.getWidth(),
errorLine1
errorLine1,
));
} else {
// keep track of last good node
Expand Down
4 changes: 2 additions & 2 deletions src/rules/noDuplicateVariableRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ class NoDuplicateVariableWalker extends Lint.BlockScopeAwareRuleWalker<{}, Scope
this.visitBlock(node.block);
}

public visitMethodSignature(node: ts.SignatureDeclaration) {
public visitMethodSignature(_node: ts.SignatureDeclaration) {
// don't call super, we don't want to walk method signatures either
}

public visitTypeLiteral(node: ts.TypeLiteralNode) {
public visitTypeLiteral(_node: ts.TypeLiteralNode) {
// don't call super, we don't want to walk the inside of type nodes
}

Expand Down
Loading