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

Commit cb15944

Browse files
committed
refactor: prettier everything
1 parent d5fa44d commit cb15944

67 files changed

Lines changed: 425 additions & 561 deletions

Some content is hidden

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

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package.json
2+
dist

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ Run `ng generate component component-name` to generate a new component. You can
2020
## Build
2121

2222
- Run `npm run build` to build the demo project.
23-
The build artifacts will be stored in the `dist/dev-demo` directory.
23+
The build artifacts will be stored in the `dist/dev-demo` directory.
2424
- Run `npm run build:lib` to build the library project.
25-
The build artifacts will be stored in the `dist/dev` directory.
25+
The build artifacts will be stored in the `dist/dev` directory.
2626
- Run `npm run build:schematics` to build the schematics project.
2727

2828
## Running unit tests

angular.json

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,8 @@
2323
"main": "src/main.ts",
2424
"polyfills": "src/polyfills.ts",
2525
"tsConfig": "src/tsconfig.app.json",
26-
"assets": [
27-
"src/favicon.ico",
28-
"src/assets"
29-
],
30-
"styles": [
31-
"src/styles.scss"
32-
],
26+
"assets": ["src/favicon.ico", "src/assets"],
27+
"styles": ["src/styles.scss"],
3328
"scripts": []
3429
},
3530
"configurations": {
@@ -86,26 +81,16 @@
8681
"polyfills": "src/polyfills.ts",
8782
"tsConfig": "src/tsconfig.spec.json",
8883
"karmaConfig": "src/karma.conf.js",
89-
"styles": [
90-
"src/styles.scss"
91-
],
84+
"styles": ["src/styles.scss"],
9285
"scripts": [],
93-
"assets": [
94-
"src/favicon.ico",
95-
"src/assets"
96-
]
86+
"assets": ["src/favicon.ico", "src/assets"]
9787
}
9888
},
9989
"lint": {
10090
"builder": "@angular-devkit/build-angular:tslint",
10191
"options": {
102-
"tsConfig": [
103-
"src/tsconfig.app.json",
104-
"src/tsconfig.spec.json"
105-
],
106-
"exclude": [
107-
"**/node_modules/**"
108-
]
92+
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
93+
"exclude": ["**/node_modules/**"]
10994
}
11095
},
11196
"deploy": {
@@ -135,9 +120,7 @@
135120
"builder": "@angular-devkit/build-angular:tslint",
136121
"options": {
137122
"tsConfig": "e2e/tsconfig.e2e.json",
138-
"exclude": [
139-
"**/node_modules/**"
140-
]
123+
"exclude": ["**/node_modules/**"]
141124
}
142125
}
143126
}
@@ -176,13 +159,8 @@
176159
"lint": {
177160
"builder": "@angular-devkit/build-angular:tslint",
178161
"options": {
179-
"tsConfig": [
180-
"projects/dev/tsconfig.lib.json",
181-
"projects/dev/tsconfig.spec.json"
182-
],
183-
"exclude": [
184-
"**/node_modules/**"
185-
]
162+
"tsConfig": ["projects/dev/tsconfig.lib.json", "projects/dev/tsconfig.spec.json"],
163+
"exclude": ["**/node_modules/**"]
186164
}
187165
}
188166
}
@@ -192,4 +170,4 @@
192170
"cli": {
193171
"analytics": "a80bb417-2132-4b22-83a1-b4c8c0c0a0af"
194172
}
195-
}
173+
}

e2e/protractor.conf.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,22 @@ const { SpecReporter } = require('jasmine-spec-reporter');
55

66
exports.config = {
77
allScriptsTimeout: 11000,
8-
specs: [
9-
'./src/**/*.e2e-spec.ts'
10-
],
8+
specs: ['./src/**/*.e2e-spec.ts'],
119
capabilities: {
12-
'browserName': 'chrome'
10+
browserName: 'chrome',
1311
},
1412
directConnect: true,
1513
baseUrl: 'http://localhost:4200/',
1614
framework: 'jasmine',
1715
jasmineNodeOpts: {
1816
showColors: true,
1917
defaultTimeoutInterval: 30000,
20-
print: function() {}
18+
print: function () {},
2119
},
2220
onPrepare() {
2321
require('ts-node').register({
24-
project: require('path').join(__dirname, './tsconfig.e2e.json')
22+
project: require('path').join(__dirname, './tsconfig.e2e.json'),
2523
});
2624
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27-
}
28-
};
25+
},
26+
};

e2e/tsconfig.e2e.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
"outDir": "../out-tsc/app",
55
"module": "commonjs",
66
"target": "es5",
7-
"types": [
8-
"jasmine",
9-
"jasminewd2",
10-
"node"
11-
]
7+
"types": ["jasmine", "jasminewd2", "node"]
128
}
13-
}
9+
}

firebase.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
{
44
"target": "dev-demo",
55
"public": "dist/dev-demo",
6-
"ignore": [
7-
"firebase.json",
8-
"**/.*",
9-
"**/node_modules/**"
10-
],
6+
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
117
"appAssociation": "AUTO",
128
"rewrites": [
139
{

prettier.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
printWidth: 140,
3+
tabWidth: 2,
4+
useTabs: false,
5+
semi: true,
6+
singleQuote: true,
7+
trailingComma: 'all',
8+
bracketSpacing: true,
9+
jsxBracketSameLine: false,
10+
arrowParens: 'avoid',
11+
rangeStart: 0,
12+
rangeEnd: Infinity,
13+
requirePragma: false,
14+
insertPragma: false,
15+
proseWrap: 'preserve',
16+
};

projects/dev/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ Find the [demo here](https://devintent-dev.firebaseapp.com/button-bar). Resize t
2323
features.
2424

2525
#### Button Bar Template ([example](https://github.com/DevIntent/dev/blob/master/src/app/button-bar-demo/button-bar-demo.component.html))
26+
2627
```html
27-
<dev-button-bar [navItems]="navItems" class="mat-elevation-z1"></dev-button-bar>
28-
<router-outlet></router-outlet>
28+
<dev-button-bar [navItems]="navItems" class="mat-elevation-z1"></dev-button-bar> <router-outlet></router-outlet>
2929
```
3030

3131
#### Button Bar Component ([example](https://github.com/DevIntent/dev/blob/master/src/app/button-bar-demo/button-bar-demo.component.ts))
32+
3233
```ts
3334
import {NavItem} from '@devintent/dev';
3435
...
@@ -43,9 +44,11 @@ this.navItems = [
4344
];
4445
...
4546
```
47+
4648
Find icon names by searching the [Material Design Icons Tool](https://material.io/tools/icons/).
4749

4850
#### Button Bar Module
51+
4952
```ts
5053
import {DevintentModule} from '@devintent/dev';
5154
...
@@ -66,6 +69,7 @@ The component themes work with Angular Material [Custom Themes](https://material
6669
which are defined in `.scss` files.
6770

6871
You should define your theme in a [SASS Partial](https://sass-lang.com/guide). For example, `_theme.scss`:
72+
6973
```scss
7074
// Custom Theming for Angular Material
7175
// For more information: https://material.angular.io/guide/theming
@@ -85,15 +89,16 @@ $demo-theme: mat-light-theme($demo-primary, $demo-accent, $demo-warn);
8589

8690
$demo-typography: mat-typography-config(
8791
//$font-family: 'Roboto, monospace',
88-
//$headline: mat-typography-level(32px, 48px, 700),
89-
//$body-1: mat-typography-level(16px, 24px, 500)
92+
//$headline: mat-typography-level(32px, 48px, 700),
93+
//$body-1: mat-typography-level(16px, 24px, 500)
9094
);
9195
```
9296

9397
Then your primary SCSS entrypoint should import this theme file and pass the theme into both the Angular Material
9498
and DevIntent Dev components.
99+
95100
```scss
96-
@import "theme";
101+
@import 'theme';
97102
@import '~@devintent/dev/theming';
98103

99104
// Include the common styles for Angular Material. We include this here so that you only
@@ -108,5 +113,6 @@ and DevIntent Dev components.
108113
// components know about your theme.
109114
@include dev-theme($demo-theme);
110115
```
116+
111117
Note: Custom typography is not yet implemented for these components, but you can use it with Angular Material components.
112-
See more in their [Typography Guide](https://material.angular.io/guide/typography).
118+
See more in their [Typography Guide](https://material.angular.io/guide/typography).

projects/dev/karma.conf.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Karma configuration file, see link for more information
22
// https://karma-runner.github.io/1.0/config/configuration-file.html
33

4-
module.exports = function(config) {
4+
module.exports = function (config) {
55
config.set({
66
basePath: '',
77
frameworks: ['jasmine', '@angular-devkit/build-angular'],
@@ -10,22 +10,22 @@ module.exports = function(config) {
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
1212
require('karma-coverage-istanbul-reporter'),
13-
require('@angular-devkit/build-angular/plugins/karma')
13+
require('@angular-devkit/build-angular/plugins/karma'),
1414
],
1515
client: {
16-
clearContext: false // leave Jasmine Spec Runner output visible in browser
16+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
1717
},
1818
coverageIstanbulReporter: {
1919
dir: require('path').join(__dirname, '../../coverage'),
2020
reports: ['html', 'lcovonly', 'text-summary'],
21-
fixWebpackSourcePaths: true
21+
fixWebpackSourcePaths: true,
2222
},
2323
reporters: ['progress', 'kjhtml'],
2424
port: 9876,
2525
colors: true,
2626
logLevel: config.LOG_INFO,
2727
autoWatch: false,
2828
browsers: ['Chrome'],
29-
singleRun: true
29+
singleRun: true,
3030
});
3131
};

projects/dev/ng-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"lib": {
55
"entryFile": "src/public_api.ts"
66
}
7-
}
7+
}

0 commit comments

Comments
 (0)