Skip to content

Commit

Permalink
refactor(test): remove lint option from test command (#4261)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: ng test no longer has the --lint flag available.
  • Loading branch information
clydin authored and hansl committed Jan 30, 2017
1 parent 38e43ce commit 645c870
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 34 deletions.
2 changes: 0 additions & 2 deletions docs/documentation/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ Tests will execute after a build is executed via [Karma](http://karma-runner.git

You can run tests with coverage via `--code-coverage`. The coverage report will be in the `coverage/` directory.

Linting during tests is also available via the `--lint` flag. See [Linting and formatting code](#linting-and-formatting-code) chapter for more informations.

## Options
`--watch` (`-w`) flag to run builds when files change

Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@
"stylus-loader": "^2.4.0",
"temp": "0.8.3",
"through": "^2.3.6",
"tslint": "^4.0.2",
"tslint-loader": "^3.3.0",
"typescript": "~2.0.3",
"url-loader": "^0.5.7",
"walk-sync": "^0.2.6",
Expand Down Expand Up @@ -154,6 +152,7 @@
"rewire": "^2.5.1",
"sinon": "^1.17.3",
"tree-kill": "^1.0.0",
"ts-node": "^1.3.0"
"ts-node": "^1.3.0",
"tslint": "^4.0.2"
}
}
2 changes: 0 additions & 2 deletions packages/angular-cli/commands/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {CliConfig} from '../models/config';
export interface TestOptions {
watch?: boolean;
codeCoverage?: boolean;
lint?: boolean;
singleRun?: boolean;
browsers?: string;
colors?: boolean;
Expand All @@ -22,7 +21,6 @@ const TestCommand = EmberTestCommand.extend({
availableOptions: [
{ name: 'watch', type: Boolean, default: true, aliases: ['w'] },
{ name: 'code-coverage', type: Boolean, default: false, aliases: ['cc'] },
{ name: 'lint', type: Boolean, default: false, aliases: ['l'] },
{ name: 'single-run', type: Boolean, default: false, aliases: ['sr'] },
{ name: 'progress', type: Boolean, default: true},
{ name: 'browsers', type: String },
Expand Down
23 changes: 0 additions & 23 deletions packages/angular-cli/models/webpack-configs/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ const ProgressPlugin = require('webpack/lib/ProgressPlugin');
* Enumerate loaders and their dependencies from this file to let the dependency validator
* know they are used.
*
* require('tslint-loader')
* require('source-map-loader')
* require('sourcemap-istanbul-instrumenter-loader')
*
* require('remap-istanbul')
* require('tslint')
*/


Expand All @@ -44,27 +42,6 @@ const getTestConfig = function (projectRoot, environment, appConfig, testConfig)
});
}

if (testConfig.lint) {
extraRules.push({
test: /\.ts$/,
enforce: 'pre',
loader: 'tslint-loader',
exclude: [
path.resolve(projectRoot, 'node_modules')
]
});
extraPlugins.push(new webpack.LoaderOptionsPlugin({
options: {
tslint: {
emitErrors: false,
failOnHint: false,
resourcePath: `./${appConfig.root}`,
typeCheck: true
}
}
}))
}

if (testConfig.progress) {
extraPlugins.push(new ProgressPlugin({ colors: true }));
}
Expand Down
2 changes: 0 additions & 2 deletions packages/angular-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@
"stylus-loader": "^2.4.0",
"temp": "0.8.3",
"through": "^2.3.6",
"tslint": "^4.0.2",
"tslint-loader": "^3.3.0",
"typescript": "~2.0.3",
"url-loader": "^0.5.7",
"walk-sync": "^0.2.6",
Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/plugins/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const init = (config) => {
const environment = config.angularCli.environment || 'dev';
const testConfig = {
codeCoverage: config.angularCli.codeCoverage || false,
lint: config.angularCli.lint || false,
sourcemap: config.angularCli.sourcemap,
progress: config.angularCli.progress
}
Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/tasks/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default Task.extend({

karmaOptions.angularCli = {
codeCoverage: options.codeCoverage,
lint: options.lint,
sourcemap: options.sourcemap,
progress: options.progress
};
Expand Down

0 comments on commit 645c870

Please sign in to comment.