Skip to content
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
refactor(test): remove lint option from test command
BREAKING CHANGE: ng test no longer has the --lint flag available.
  • Loading branch information
Charles Lyding committed Jan 28, 2017
commit e9fc8eb97c862dbc17cfcafb8c2c98f21e435950
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 @@ -105,8 +105,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 @@ -156,6 +154,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 @@ -89,8 +89,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 @@ -25,7 +25,6 @@ export default Task.extend({

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