Skip to content

Commit 5a3c2ea

Browse files
authored
Feature/lint (#20)
* feat: add linting + run prettier * add app version * update theaming * very great improvements * fix missed imports
1 parent 906a864 commit 5a3c2ea

File tree

86 files changed

+1528
-1150
lines changed

Some content is hidden

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

86 files changed

+1528
-1150
lines changed

.eslintrc.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:prettier/recommended",
10+
"plugin:@typescript-eslint/recommended",
11+
"plugin:@angular-eslint/recommended",
12+
"plugin:@angular-eslint/template/process-inline-templates"
13+
],
14+
"rules": {
15+
"@angular-eslint/directive-selector": [
16+
"error",
17+
{
18+
"type": "attribute",
19+
"prefix": "app",
20+
"style": "camelCase"
21+
}
22+
],
23+
"@angular-eslint/component-selector": [
24+
"error",
25+
{
26+
"type": "element",
27+
"prefix": "app",
28+
"style": "kebab-case"
29+
}
30+
]
31+
}
32+
},
33+
// NOTE: WE ARE NOT APPLYING PRETTIER IN THIS OVERRIDE, ONLY @ANGULAR-ESLINT/TEMPLATE
34+
{
35+
"files": ["*.html"],
36+
"extends": ["plugin:@angular-eslint/template/recommended"],
37+
"rules": {}
38+
},
39+
// NOTE: WE ARE NOT APPLYING @ANGULAR-ESLINT/TEMPLATE IN THIS OVERRIDE, ONLY PRETTIER
40+
{
41+
"files": ["*.html"],
42+
"excludedFiles": ["*inline-template-*.component.html"],
43+
"extends": ["plugin:prettier/recommended"],
44+
"rules": {
45+
// NOTE: WE ARE OVERRIDING THE DEFAULT CONFIG TO ALWAYS SET THE PARSER TO ANGULAR (SEE BELOW)
46+
"prettier/prettier": [
47+
"error",
48+
{
49+
"parser": "angular"
50+
}
51+
]
52+
}
53+
}
54+
]
55+
}

.github/workflows/build-gh-pages-demo.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build GH Pages Demo
33
on:
44
push:
55
branches:
6-
- "main"
6+
- 'main'
77

88
jobs:
99
build-gh-pages-demo:
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup node
1616
uses: actions/setup-node@v2
1717
with:
18-
node-version: "16.x"
18+
node-version: '16.x'
1919

2020
- name: install packages
2121
run: yarn
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/checkout@v3
2727
with:
2828
ref: gh-pages-demo
29-
path: "gh-pages-demo"
29+
path: 'gh-pages-demo'
3030

3131
- name: Clean out old dist and copy new dist
3232
run: |

.github/workflows/pull-request.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v3
18-
18+
1919
- name: Setup node
2020
uses: actions/setup-node@v3
2121
with:
22-
node-version: "16.x"
23-
registry-url: "https://npm.pkg.github.com"
24-
scope: "@fullstack-devops"
22+
node-version: '16.x'
23+
registry-url: 'https://npm.pkg.github.com'
24+
scope: '@fullstack-devops'
2525

2626
- name: install packages
2727
run: yarn

.github/workflows/release.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Release Package
33
on:
44
push:
55
branches:
6-
- "main"
6+
- 'main'
77
paths-ignore:
8-
- "README.md"
9-
- "docs/**"
10-
- ".github/ISSUE_TEMPLATE/**"
11-
- ".github/PULL_REQUEST_TEMPLATE.md"
8+
- 'README.md'
9+
- 'docs/**'
10+
- '.github/ISSUE_TEMPLATE/**'
11+
- '.github/PULL_REQUEST_TEMPLATE.md'
1212

1313
jobs:
1414
create_release:
@@ -26,9 +26,9 @@ jobs:
2626
- name: Setup node for GitHub
2727
uses: actions/setup-node@v3
2828
with:
29-
node-version: "16.x"
30-
registry-url: "https://npm.pkg.github.com"
31-
scope: "@fullstack-devops"
29+
node-version: '16.x'
30+
registry-url: 'https://npm.pkg.github.com'
31+
scope: '@fullstack-devops'
3232

3333
- name: install packages
3434
run: yarn
@@ -46,10 +46,9 @@ jobs:
4646
- name: Setup node for npmjs
4747
uses: actions/setup-node@v3
4848
with:
49-
node-version: "16.x"
50-
registry-url: "https://registry.npmjs.org"
51-
scope: "@fullstack-devops"
52-
49+
node-version: '16.x'
50+
registry-url: 'https://registry.npmjs.org'
51+
scope: '@fullstack-devops'
5352

5453
- name: npm publish to npmjs
5554
working-directory: dist/ng-mat-components

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ projects/ng-nav-frame/README.md
1515
npm-debug.log
1616
yarn-error.log
1717
yarn.lock
18+
package-lock.json
1819
.yarn/
1920

2021
# IDEs and editors
@@ -47,4 +48,4 @@ testem.log
4748
.DS_Store
4849
Thumbs.db
4950
.yarnrc
50-
package-lock.json
51+
package-lock.json

.prettierignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
package-lock.json
14+
yarn.lock
15+
16+
# IDEs and editors
17+
.idea/
18+
.project
19+
.classpath
20+
.c9/
21+
*.launch
22+
.settings/
23+
*.sublime-workspace
24+
25+
# Visual Studio Code
26+
.vscode/*
27+
!.vscode/settings.json
28+
!.vscode/tasks.json
29+
!.vscode/launch.json
30+
!.vscode/extensions.json
31+
.history/*
32+
33+
# Miscellaneous
34+
/.angular/cache
35+
.sass-cache/
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
testem.log
40+
/typings
41+
42+
# System files
43+
.DS_Store
44+
Thumbs.db

.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false,
4+
"singleQuote": true,
5+
"semi": true,
6+
"bracketSpacing": true,
7+
"arrowParens": "avoid",
8+
"trailingComma": "es5",
9+
"bracketSameLine": true,
10+
"printWidth": 160,
11+
"htmlWhitespaceSensitivity": "ignore"
12+
}

.vscode/extensions.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
2-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
32
"recommendations": [
43
"angular.ng-template",
4+
"johnpapa.Angular2",
5+
"dbaeumer.vscode-eslint",
6+
"esbenp.prettier-vscode",
7+
"PKief.material-icon-theme",
8+
"Mikael.Angular-BeastCode",
59
"bradlc.vscode-tailwindcss"
610
]
7-
}
11+
}

.vscode/settings.json

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
{
2+
"editor.formatOnPaste": true,
23
"editor.formatOnSave": true,
3-
"editor.renderWhitespace": "all",
4-
"prettier.arrowParens": "avoid",
5-
"prettier.printWidth": 130,
6-
"editor.tabSize": 2,
7-
"files.trimTrailingWhitespace": true,
8-
"files.trimFinalNewlines": true,
4+
"editor.codeActionsOnSave": {
5+
"source.organizeImports": true
6+
},
97
"workbench.iconTheme": "material-icon-theme",
108
"editor.defaultFormatter": "esbenp.prettier-vscode",
119
"[javascript]": {
@@ -20,10 +18,24 @@
2018
"[yaml]": {
2119
"editor.defaultFormatter": "redhat.vscode-yaml"
2220
},
23-
"[typescript]": {
24-
"editor.defaultFormatter": "vscode.typescript-language-features"
25-
},
2621
"[scss]": {
2722
"editor.defaultFormatter": "vscode.css-language-features"
2823
},
29-
}
24+
"[html]": {
25+
"editor.defaultFormatter": "esbenp.prettier-vscode",
26+
"editor.codeActionsOnSave": {
27+
"source.fixAll.eslint": true
28+
},
29+
"editor.formatOnSave": true
30+
},
31+
"[typescript]": {
32+
"editor.defaultFormatter": "esbenp.prettier-vscode",
33+
"editor.codeActionsOnSave": {
34+
"source.fixAll.eslint": true
35+
},
36+
"editor.formatOnSave": true
37+
},
38+
"[xml]": {
39+
"editor.defaultFormatter": "redhat.vscode-xml"
40+
}
41+
}

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
# ng-mat-components
2-
Components for @angular/material
32

3+
Components for @angular/material
44

55
## Installation
66

77
add to your local `.npmrc` the following line to be able to use this package:
8+
89
```javascript
910
@fullstack-devops:registry=https://npm.pkg.github.com
1011
```
1112

1213
And install it:
13-
- yarn
14-
```javascript
15-
yarn add @fullstack-devops/ng-mat-components
16-
```
17-
- npm
18-
```javascript
19-
npm install @fullstack-devops/ng-mat-components
20-
```
14+
15+
- yarn
16+
```javascript
17+
yarn add @fullstack-devops/ng-mat-components
18+
```
19+
- npm
20+
```javascript
21+
npm install @fullstack-devops/ng-mat-components
22+
```
2123

2224
## Documentation
2325

0 commit comments

Comments
 (0)