Skip to content

Commit f3fe2e8

Browse files
clydinMRHarrison
authored andcommitted
refactor(test): remove lint option from test command (angular#4261)
BREAKING CHANGE: ng test no longer has the --lint flag available.
1 parent a317bf8 commit f3fe2e8

File tree

7 files changed

+2
-34
lines changed

7 files changed

+2
-34
lines changed

docs/documentation/test.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ Tests will execute after a build is executed via [Karma](http://karma-runner.git
1515

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

18-
Linting during tests is also available via the `--lint` flag. See [Linting and formatting code](#linting-and-formatting-code) chapter for more informations.
19-
2018
## Options
2119
`--watch` (`-w`) flag to run builds when files change
2220

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@
103103
"stylus-loader": "^2.4.0",
104104
"temp": "0.8.3",
105105
"through": "^2.3.6",
106-
"tslint": "^4.0.2",
107-
"tslint-loader": "^3.3.0",
108106
"typescript": "~2.0.3",
109107
"url-loader": "^0.5.7",
110108
"walk-sync": "^0.2.6",
@@ -154,6 +152,7 @@
154152
"rewire": "^2.5.1",
155153
"sinon": "^1.17.3",
156154
"tree-kill": "^1.0.0",
157-
"ts-node": "^1.3.0"
155+
"ts-node": "^1.3.0",
156+
"tslint": "^4.0.2"
158157
}
159158
}

packages/angular-cli/commands/test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {CliConfig} from '../models/config';
55
export interface TestOptions {
66
watch?: boolean;
77
codeCoverage?: boolean;
8-
lint?: boolean;
98
singleRun?: boolean;
109
browsers?: string;
1110
colors?: boolean;
@@ -22,7 +21,6 @@ const TestCommand = EmberTestCommand.extend({
2221
availableOptions: [
2322
{ name: 'watch', type: Boolean, default: true, aliases: ['w'] },
2423
{ name: 'code-coverage', type: Boolean, default: false, aliases: ['cc'] },
25-
{ name: 'lint', type: Boolean, default: false, aliases: ['l'] },
2624
{ name: 'single-run', type: Boolean, default: false, aliases: ['sr'] },
2725
{ name: 'progress', type: Boolean, default: true},
2826
{ name: 'browsers', type: String },

packages/angular-cli/models/webpack-configs/test.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ const ProgressPlugin = require('webpack/lib/ProgressPlugin');
1717
* Enumerate loaders and their dependencies from this file to let the dependency validator
1818
* know they are used.
1919
*
20-
* require('tslint-loader')
2120
* require('source-map-loader')
2221
* require('sourcemap-istanbul-instrumenter-loader')
2322
*
2423
* require('remap-istanbul')
25-
* require('tslint')
2624
*/
2725

2826

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

47-
if (testConfig.lint) {
48-
extraRules.push({
49-
test: /\.ts$/,
50-
enforce: 'pre',
51-
loader: 'tslint-loader',
52-
exclude: [
53-
path.resolve(projectRoot, 'node_modules')
54-
]
55-
});
56-
extraPlugins.push(new webpack.LoaderOptionsPlugin({
57-
options: {
58-
tslint: {
59-
emitErrors: false,
60-
failOnHint: false,
61-
resourcePath: `./${appConfig.root}`,
62-
typeCheck: true
63-
}
64-
}
65-
}))
66-
}
67-
6845
if (testConfig.progress) {
6946
extraPlugins.push(new ProgressPlugin({ colors: true }));
7047
}

packages/angular-cli/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@
8787
"stylus-loader": "^2.4.0",
8888
"temp": "0.8.3",
8989
"through": "^2.3.6",
90-
"tslint": "^4.0.2",
91-
"tslint-loader": "^3.3.0",
9290
"typescript": "~2.0.3",
9391
"url-loader": "^0.5.7",
9492
"walk-sync": "^0.2.6",

packages/angular-cli/plugins/karma.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const init = (config) => {
1515
const environment = config.angularCli.environment || 'dev';
1616
const testConfig = {
1717
codeCoverage: config.angularCli.codeCoverage || false,
18-
lint: config.angularCli.lint || false,
1918
sourcemap: config.angularCli.sourcemap,
2019
progress: config.angularCli.progress
2120
}

packages/angular-cli/tasks/test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export default Task.extend({
1919

2020
karmaOptions.angularCli = {
2121
codeCoverage: options.codeCoverage,
22-
lint: options.lint,
2322
sourcemap: options.sourcemap,
2423
progress: options.progress
2524
};

0 commit comments

Comments
 (0)