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

Bump NPM dependencies and switch to ESLint #1221

Merged
merged 5 commits into from
May 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: 9 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "eslint:recommended",
"env": {
"node": true
},
"rules": {
"comma-dangle": ["error", "always-multiline"]
}
}
21 changes: 0 additions & 21 deletions .jscsrc

This file was deleted.

2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DS_Store
.gitmodules
.jscsrc
.eslintrc.json
.project
.settings
.travis.yml
Expand Down
58 changes: 27 additions & 31 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,38 @@ if (process.platform === "win32") {
}

module.exports = function (grunt) {
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),

eslint: {
target: [
"Gruntfile.js",
"test/files/formatters/*.js",
],
},

clean: {
core: ["lib/**/*.js", "lib/**/*.d.ts"],
test: ["build/", "test/config/node_modules/"]
test: ["build/", "test/config/node_modules/"],
},

mochaTest: {
test: {
options: {
reporter: "spec"
reporter: "spec",
},
src: ["build/test/**/*Tests.js", "build/test/assert.js"]
}
src: ["build/test/**/*Tests.js", "build/test/assert.js"],
},
},

run: {
testBin: {
cmd: "./test/check-bin.sh",
options: {quiet: Infinity}
options: {quiet: Infinity},
},
testRules: {
args: ["./build/test/ruleTestRunner.js"]
}
},

jscs: {
src: [
"Gruntfile.js",
"test/files/formatters/*.js"
],
options: {
config: ".jscsrc"
}
args: ["./build/test/ruleTestRunner.js"],
},
},

tslint: {
Expand All @@ -52,36 +48,36 @@ module.exports = function (grunt) {
"src/formatters/**/*.ts",
"src/language/**/*.ts",
"src/rules/**/*.ts",
"src/test/**/*.ts"
"src/test/**/*.ts",
],
test: [
"test/**/*.ts",
"!test/**/*.test.ts",
"!test/typings/**/*.ts"
]
"!test/typings/**/*.ts",
],
},

ts: {
core: {
tsconfig: "src/tsconfig.json"
tsconfig: "src/tsconfig.json",
},
test: {
tsconfig: "test/tsconfig.json"
}
tsconfig: "test/tsconfig.json",
},
},

"npm-command": {
test: {
options: {
cwd: "./test/config"
}
}
}
cwd: "./test/config",
},
},
},
});

// load NPM tasks
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-jscs");
grunt.loadNpmTasks("grunt-eslint");
grunt.loadNpmTasks("grunt-mocha-test");
grunt.loadNpmTasks("grunt-run");
grunt.loadNpmTasks("grunt-tslint");
Expand All @@ -92,7 +88,7 @@ module.exports = function (grunt) {
grunt.registerTask("core", [
"clean:core",
"ts:core",
"tslint:src"
"tslint:src",
]);
grunt.registerTask("test", [
"clean:test",
Expand All @@ -104,5 +100,5 @@ module.exports = function (grunt) {
].concat(checkBinTest));

// create default task
grunt.registerTask("default", ["jscs", "core", "test"]);
grunt.registerTask("default", ["eslint", "core", "test"]);
};
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tslint",
"version": "3.9.0",
"description": "a static analysis linter for TypeScript",
"description": "An extensible static analysis linter for the TypeScript language",
"bin": {
"tslint": "./bin/tslint"
},
Expand All @@ -23,20 +23,20 @@
"colors": "^1.1.2",
"diff": "^2.2.1",
"findup-sync": "~0.3.0",
"glob": "^6.0.1",
"glob": "^7.0.3",
"optimist": "~0.6.0",
"resolve": "^1.1.7",
"underscore.string": "~3.1.1"
"underscore.string": "^3.3.4"
},
"devDependencies": {
"chai": "^3.0.0",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.9",
"grunt-contrib-clean": "^0.6.0",
"grunt-jscs": "^1.8.0",
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-eslint": "^18.1.0",
"grunt-mocha-test": "^0.12.7",
"grunt-npm-command": "^0.1.1",
"grunt-run": "^0.3.0",
"grunt-npm-command": "^0.1.2",
"grunt-run": "~0.6.0",
"grunt-ts": "^5.1.0",
"grunt-tslint": "latest",
"mocha": "^2.2.5",
Expand Down
4 changes: 2 additions & 2 deletions test/files/formatters/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ SimpleFormatter.prototype = Object.create({
output += "[" + (line + 1) + ", " + (character + 1) + "]" + fileName + "\n";
}
return output;
}
},
});

module.exports = {
Formatter: SimpleFormatter
Formatter: SimpleFormatter,
};