Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit 8c14d9e

Browse files
committed
refactor: add more linting rules
This include a custom rule that enforces that imports are next to each others (grouped).
1 parent 18fe75d commit 8c14d9e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+259
-94
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"build": "npm run admin -- build",
1818
"build-tsc": "tsc -p tsconfig.json",
1919
"fix": "npm run lint -- --fix",
20-
"lint": "tslint --config tslint.json --project tsconfig.json --type-check",
20+
"lint": "tsc -p rules/tsconfig.json && tslint --config tslint.json --project tsconfig.json --type-check",
2121
"test": "node ./bin/devkit-admin test",
2222
"validate-commits": "./bin/devkit-admin validate-commits",
2323
"integration": "npm run build && npm run integration:build-optimizer",

packages/_/schematics_cli/src/cli.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
import {SchemaClassFactory} from '@ngtools/json-schema';
2323
import * as minimist from 'minimist';
2424
import {Observable} from 'rxjs/Observable';
25-
2625
import 'rxjs/add/operator/ignoreElements';
2726

2827

packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
18
import { readFileSync } from 'fs';
29
import { RawSourceMap } from 'source-map';
310
const MagicString = require('magic-string');

packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
18
import { oneLine } from 'common-tags';
29
import { RawSourceMap } from 'source-map';
3-
410
import { buildOptimizer } from './build-optimizer';
511

612

packages/angular_devkit/build_optimizer/src/build-optimizer/cli.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#!/usr/bin/env node
2+
/**
3+
* @license
4+
* Copyright Google Inc. All Rights Reserved.
5+
*
6+
* Use of this source code is governed by an MIT-style license that can be
7+
* found in the LICENSE file at https://angular.io/license
8+
*/
29
import { writeFileSync } from 'fs';
310
import { join } from 'path';
4-
511
import { buildOptimizer } from './build-optimizer';
612

713

packages/angular_devkit/build_optimizer/src/build-optimizer/webpack-loader.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
18
import { RawSourceMap, SourceMapConsumer, SourceMapGenerator } from 'source-map';
29
import * as webpack from 'webpack';
310
const loaderUtils = require('loader-utils');

packages/angular_devkit/build_optimizer/src/helpers/transform-javascript.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
18
import { readFileSync } from 'fs';
29
import { basename, dirname, join } from 'path';
310
import { RawSourceMap } from 'source-map';

packages/angular_devkit/build_optimizer/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
18
export { default as buildOptimizerLoader } from './build-optimizer/webpack-loader';
29
export { buildOptimizer } from './build-optimizer/build-optimizer';
310

packages/angular_devkit/build_optimizer/src/purify/cli.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#!/usr/bin/env node
2+
/**
3+
* @license
4+
* Copyright Google Inc. All Rights Reserved.
5+
*
6+
* Use of this source code is governed by an MIT-style license that can be
7+
* found in the LICENSE file at https://angular.io/license
8+
*/
29
import { readFileSync, writeFileSync } from 'fs';
310
import { join } from 'path';
4-
511
import { purify } from './purify';
612

713

packages/angular_devkit/build_optimizer/src/purify/purify_spec.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
18
import { oneLine, stripIndent } from 'common-tags';
2-
39
import { purify } from './purify';
410

511
// tslint:disable:max-line-length

0 commit comments

Comments
 (0)