Skip to content

Commit 281e6da

Browse files
authored
Merge pull request #371 from drola/master
chore: Updated to Angular 11, migrated to ESLint, fixed ng test
2 parents 0b27944 + 1d56acd commit 281e6da

14 files changed

+10467
-10715
lines changed

.eslintrc.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"parserOptions": {
8+
"project": ["tsconfig.json"],
9+
"createDefaultProgram": true
10+
},
11+
"extends": [
12+
"plugin:@angular-eslint/recommended",
13+
"plugin:@angular-eslint/template/process-inline-templates"
14+
],
15+
"rules": {
16+
"@typescript-eslint/explicit-member-accessibility": [
17+
"off",
18+
{
19+
"accessibility": "explicit"
20+
}
21+
],
22+
"@typescript-eslint/no-non-null-assertion": "off",
23+
"arrow-parens": ["off", "always"],
24+
"import/order": "off",
25+
"max-len": [
26+
"off",
27+
{
28+
"code": 140
29+
}
30+
],
31+
"@typescript-eslint/naming-convention": [
32+
"error",
33+
{
34+
"selector": ["typeLike", "enumMember"],
35+
"format": ["PascalCase"]
36+
}
37+
]
38+
}
39+
},
40+
{
41+
"files": ["*.html"],
42+
"extends": ["plugin:@angular-eslint/template/recommended"],
43+
"rules": {}
44+
}
45+
]
46+
}

angular.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,37 @@
44
"newProjectRoot": "projects",
55
"projects": {
66
"angular2-notifications": {
7-
"root": "/",
8-
"sourceRoot": "/src",
7+
"root": "",
8+
"sourceRoot": "src",
99
"projectType": "library",
1010
"prefix": "lib",
1111
"architect": {
1212
"build": {
13-
"builder": "@angular-devkit/build-ng-packagr:build",
13+
"builder": "@angular-devkit/build-angular:ng-packagr",
1414
"options": {
1515
"tsConfig": "src/lib/tsconfig.lib.json",
16-
"project": "./ng-package.json"
16+
"project": "ng-package.json"
1717
},
1818
"configurations": {
1919
"production": {
20-
"tsConfig": "tsconfig.lib.prod.json"
20+
"tsConfig": "src/lib/tsconfig.lib.prod.json"
2121
}
2222
}
2323
},
2424
"test": {
2525
"builder": "@angular-devkit/build-angular:karma",
2626
"options": {
27-
"main": "src/test.ts",
27+
"main": "src/lib/test.ts",
2828
"tsConfig": "src/lib/tsconfig.spec.json",
29-
"karmaConfig": "./karma.conf.js"
29+
"karmaConfig": "src/lib/karma.conf.js"
3030
}
3131
},
3232
"lint": {
33-
"builder": "@angular-devkit/build-angular:tslint",
33+
"builder": "@angular-eslint/builder:lint",
3434
"options": {
35-
"tsConfig": [
36-
"./tsconfig.lib.json",
37-
"./tsconfig.spec.json"
38-
],
39-
"exclude": [
40-
"**/node_modules/**"
35+
"lintFilePatterns": [
36+
"src/**/*.ts",
37+
"src/**/*.html"
4138
]
4239
}
4340
}
@@ -48,4 +45,4 @@
4845
"cli": {
4946
"analytics": "77332a81-cd25-487c-805b-f20186e07788"
5047
}
51-
}
48+
}

0 commit comments

Comments
 (0)