Skip to content

Commit

Permalink
feat: update to angular 14 with some minor changes (#173)
Browse files Browse the repository at this point in the history
* feat: update Angular and deps to latest

* chore: move lint-staged in a separate file, change a pre commit hook

* chore: create models and tokens folders to move entities into appropriate folders

* chore: change subscription handling logic, remove underscore for private variables and config some new eslint rules

* docs: update version compatibility section

* chore(release): 14.0.1
  • Loading branch information
ddubrava committed Jul 3, 2022
1 parent ba36fd3 commit 780efbe
Show file tree
Hide file tree
Showing 45 changed files with 5,224 additions and 3,741 deletions.
19 changes: 5 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,26 @@ module.exports = {
{
files: ['*.ts'],
parserOptions: {
project: ['tsconfig.json', 'e2e/tsconfig.json'],
createDefaultProgram: true,
project: ['tsconfig.eslint.json'],
},
plugins: ['simple-import-sort'],
extends: [
'plugin:@angular-eslint/recommended',
'plugin:@angular-eslint/template/process-inline-templates',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'airbnb-base',
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'class-methods-use-this': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-underscore-dangle': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',

'@typescript-eslint/naming-convention': [
'error',
{
selector: 'memberLike',
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require',
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/prefer-readonly': ['error'],
Expand All @@ -40,7 +32,6 @@ module.exports = {
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {},
},
],
};
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run pre-commit
npx lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js,ts,json,md,html,css}": "prettier --write",
"*.{js,ts}": "eslint --fix"
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [14.0.1](https://github.com/ddubrava/angular8-yandex-maps/compare/v13.2.0...v14.0.1) (2022-07-03)

### Features

- update Angular and deps to latest ([724452e](https://github.com/ddubrava/angular8-yandex-maps/commit/724452e1bc152eb95b224d02d8a037f475b4d209))

## [13.2.0](https://github.com/ddubrava/angular8-yandex-maps/compare/v13.1.0...v13.2.0) (2022-02-25)

### Features
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ npm install angular8-yandex-maps

| Angular version | Library version |
| ---------------------- | --------------- |
| v14 | v14.x |
| v9, v10, v11, v12, v13 | v13.x |
| v8 | v8.x |
| v7 | v7.x |
Expand Down
5 changes: 4 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,8 @@
}
}
},
"defaultProject": "angular-yandex-maps"
"defaultProject": "angular-yandex-maps",
"cli": {
"analytics": "4732e9ba-8f7f-45a5-a678-8f649ccc81cb"
}
}
2 changes: 2 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ import { YaApiLoaderService } from 'angular8-yandex-maps';

export class AppComponent {
constructor(private yaApiLoaderService: YaApiLoaderService) {
// Don't forget to unsubscribe
this.yaApiLoaderService.load().subscribe((v) => console.log(v));
}
}
Expand All @@ -98,6 +99,7 @@ import { YaGeocoderService } from 'angular8-yandex-maps';

export class AppComponent {
constructor(private yaGeocoderService: YaGeocoderService) {
// Don't forget to unsubscribe
this.yaGeocoderService.geocode('Moscow').subscribe((v) => console.log(v));
}
}
Expand Down

0 comments on commit 780efbe

Please sign in to comment.