├── .editorconfig ├── .github └── ISSUE_TEMPLATE │ ├── Bug_report.md │ ├── Feature_request.md │ └── Support_request.md ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── angular.json ├── package-lock.json ├── package.json ├── projects └── ngx-translate │ └── http-loader │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── src │ ├── lib │ │ └── http-loader.ts │ └── public_api.ts │ ├── test.ts │ ├── tests │ └── http-loader.spec.ts │ ├── tsconfig.lib.json │ ├── tsconfig.lib.prod.json │ ├── tsconfig.spec.json │ └── tslint.json ├── tsconfig.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "⚠️ Bug report" 3 | about: Report a bug for this library. Please check the FAQ and search github/stackoverflow 4 | for a similar issue before submitting 5 | 6 | --- 7 | 8 | 13 | 14 | ## Current behavior 15 | 16 | 17 | 18 | ## Expected behavior 19 | 20 | 21 | 22 | ## How do you think that we should fix this? 23 | 24 | 25 | 26 | ## Minimal reproduction of the problem with instructions 27 | 31 | 32 | 33 | ## Environment 34 | 35 |

36 | ngx-translate version: X.Y.Z
37 | Angular version: X.Y.Z
38 | 
39 | 
40 | Browser:
41 | - [ ] Chrome (desktop) version XX
42 | - [ ] Chrome (Android) version XX
43 | - [ ] Chrome (iOS) version XX
44 | - [ ] Firefox version XX
45 | - [ ] Safari (desktop) version XX
46 | - [ ] Safari (iOS) version XX
47 | - [ ] IE version XX
48 | - [ ] Edge version XX
49 |  
50 | For Tooling issues:
51 | - Node version: XX  
52 | - Platform:  
53 | 
54 | Others:
55 | 
56 | 
57 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "✨ Feature request" 3 | about: Suggesting new features for this library. Please check if a similar feature 4 | request exists before submitting 5 | 6 | --- 7 | 8 | 13 | 14 | ## Current behavior 15 | 16 | 17 | 18 | ## Expected behavior 19 | 20 | 21 | 22 | ## What is the motivation / use case for changing the behavior? 23 | 24 | 25 | 26 | ## How do you think that we should implement this? 27 | 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Support_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: ℹ️ Other / Support request 3 | about: Please check the FAQ and search github/stackoverflow for a similar issue before 4 | submitting 5 | 6 | --- 7 | 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 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 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | 20 | # IDE - VSCode 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | 27 | # misc 28 | /.sass-cache 29 | /connect.lock 30 | /coverage 31 | /libpeerconnection.log 32 | npm-debug.log 33 | yarn-error.log 34 | testem.log 35 | /typings 36 | 37 | # System Files 38 | .DS_Store 39 | Thumbs.db 40 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: required 3 | notifications: 4 | email: false 5 | node_js: 6 | - '10' 7 | before_install: 8 | - if [[ `npm -v` != 6* ]]; then npm i -g npm@6; fi 9 | services: 10 | - xvfb 11 | addons: 12 | chrome: stable 13 | after_success: 14 | - npm run build 15 | - cp .git dist/@ngx-translate/http-loader/ -r # required by semantic release 16 | - cp README.md dist/@ngx-translate/http-loader/ 17 | - cd dist/@ngx-translate/http-loader/ 18 | - npm install semantic-release@8.2.3 --no-save 19 | - npm run semantic-release 20 | branches: 21 | except: 22 | - /^v\d+\.\d+\.\d+$/ 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Olivier Combe 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @ngx-translate/http-loader [![Build Status](https://travis-ci.org/ngx-translate/http-loader.svg?branch=master)](https://travis-ci.org/ngx-translate/http-loader) [![npm version](https://badge.fury.io/js/%40ngx-translate%2Fhttp-loader.svg)](https://badge.fury.io/js/%40ngx-translate%2Fhttp-loader) 2 | 3 | A loader for [ngx-translate](https://github.com/ngx-translate/core) that loads translations using http. 4 | 5 | ---------- 6 | 7 | **⚠️ The content of this repository was moved to the main [ngx-translate repository](https://github.com/ngx-translate/core)** 8 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "@ngx-translate/http-loader": { 7 | "root": "projects/ngx-translate/http-loader", 8 | "sourceRoot": "projects/ngx-translate/http-loader/src", 9 | "projectType": "library", 10 | "prefix": "lib", 11 | "architect": { 12 | "build": { 13 | "builder": "@angular-devkit/build-ng-packagr:build", 14 | "options": { 15 | "tsConfig": "projects/ngx-translate/http-loader/tsconfig.lib.json", 16 | "project": "projects/ngx-translate/http-loader/ng-package.json" 17 | }, 18 | "configurations": { 19 | "production": { 20 | "tsConfig": "projects/ngx-translate/http-loader/tsconfig.lib.prod.json" 21 | } 22 | } 23 | }, 24 | "test": { 25 | "builder": "@angular-devkit/build-angular:karma", 26 | "options": { 27 | "main": "projects/ngx-translate/http-loader/test.ts", 28 | "tsConfig": "projects/ngx-translate/http-loader/tsconfig.spec.json", 29 | "karmaConfig": "projects/ngx-translate/http-loader/karma.conf.js" 30 | } 31 | }, 32 | "lint": { 33 | "builder": "@angular-devkit/build-angular:tslint", 34 | "options": { 35 | "tsConfig": [ 36 | "projects/ngx-translate/http-loader/tsconfig.lib.json", 37 | "projects/ngx-translate/http-loader/tsconfig.spec.json" 38 | ], 39 | "exclude": [ 40 | "**/node_modules/**" 41 | ] 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "defaultProject": "@ngx-translate/http-loader" 48 | } 49 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@ngx-translate/http-loader", 3 | "description": "A loader for ngx-translate that loads translations using http", 4 | "scripts": { 5 | "build": "ng build", 6 | "commit": "git-cz", 7 | "lint": "ng lint", 8 | "ng": "ng", 9 | "start": "ng serve", 10 | "test": "ng test" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/common": "^10.0.0", 15 | "@angular/compiler": "^10.0.0", 16 | "@angular/core": "^10.0.0", 17 | "@angular/platform-browser": "^10.0.0", 18 | "@angular/platform-browser-dynamic": "^10.0.0", 19 | "@ngx-translate/core": ">=12.0.0", 20 | "core-js": "^3.6.5", 21 | "rxjs": "^6.5.5", 22 | "tslib": "^2.0.0", 23 | "zone.js": "~0.10.3" 24 | }, 25 | "devDependencies": { 26 | "@angular-devkit/build-angular": "~0.1000.0", 27 | "@angular-devkit/build-ng-packagr": "~0.1000.0", 28 | "@angular/cli": "^10.0.0", 29 | "@angular/compiler-cli": "^10.0.0", 30 | "@angular/language-service": "^10.0.0", 31 | "@types/jasmine": "^2.8.9", 32 | "@types/jasminewd2": "^2.0.5", 33 | "@types/node": "^12.11.1", 34 | "codelyzer": "^5.1.2", 35 | "commitizen": "2.9.6", 36 | "cz-conventional-changelog": "2.1.0", 37 | "jasmine-core": "~2.99.1", 38 | "jasmine-spec-reporter": "^4.2.1", 39 | "karma": "^3.1.1", 40 | "karma-chrome-launcher": "^2.2.0", 41 | "karma-coverage-istanbul-reporter": "^2.0.4", 42 | "karma-jasmine": "^1.1.2", 43 | "karma-jasmine-html-reporter": "^1.3.1", 44 | "karma-mocha-reporter": "^2.2.5", 45 | "lerna": "^2.11.0", 46 | "ng-packagr": "^10.0.0", 47 | "ts-node": "^8.10.2", 48 | "tslint": "^6.1.2", 49 | "typescript": "^3.9.5" 50 | }, 51 | "config": { 52 | "commitizen": { 53 | "path": "./node_modules/cz-conventional-changelog" 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | var configuration = { 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | 'karma-jasmine', 10 | 'karma-chrome-launcher', 11 | 'karma-mocha-reporter', 12 | 'karma-coverage-istanbul-reporter', 13 | '@angular-devkit/build-angular/plugins/karma' 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../../../coverage'), 20 | reports: ['html', 'lcovonly'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['mocha'], 24 | mochaReporter: { 25 | ignoreSkipped: true 26 | }, 27 | port: 9876, 28 | colors: true, 29 | logLevel: config.LOG_INFO, 30 | autoWatch: !process.env.TRAVIS, 31 | browsers: ['Chrome'], 32 | customLaunchers: { 33 | ChromeTravisCi: { 34 | base: 'Chrome', 35 | flags: ['--no-sandbox'] 36 | } 37 | }, 38 | singleRun: process.env.TRAVIS 39 | }; 40 | 41 | if (process.env.TRAVIS){ 42 | config.browsers = [ 43 | 'ChromeTravisCi' 44 | ]; 45 | } 46 | 47 | config.set(configuration); 48 | }; 49 | -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../../dist/@ngx-translate/http-loader", 4 | "deleteDestPath": false, 5 | "keepLifecycleScripts": true, 6 | "lib": { 7 | "entryFile": "src/public_api.ts" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@ngx-translate/http-loader", 3 | "description": "A loader for ngx-translate that loads translations using http", 4 | "author": "Olivier Combe", 5 | "keywords": [ 6 | "angular", 7 | "angular 2", 8 | "i18n", 9 | "translate", 10 | "ngx-translate" 11 | ], 12 | "license": "MIT", 13 | "homepage": "https://github.com/ngx-translate/http-loader", 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/ngx-translate/http-loader.git" 17 | }, 18 | "bugs": { 19 | "url": "https://github.com/ngx-translate/http-loader/issues" 20 | }, 21 | "peerDependencies": { 22 | "@ngx-translate/core": ">=13.0.0", 23 | "@angular/common": ">=10.0.0", 24 | "rxjs": ">=6.5.3" 25 | }, 26 | "scripts": { 27 | "semantic-release": "semantic-release pre && npm publish && semantic-release post" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/src/lib/http-loader.ts: -------------------------------------------------------------------------------- 1 | import {HttpClient} from "@angular/common/http"; 2 | import {TranslateLoader} from "@ngx-translate/core"; 3 | import {Observable} from 'rxjs'; 4 | 5 | export class TranslateHttpLoader implements TranslateLoader { 6 | constructor(private http: HttpClient, public prefix: string = "/assets/i18n/", public suffix: string = ".json") {} 7 | 8 | /** 9 | * Gets the translations from the server 10 | */ 11 | public getTranslation(lang: string): Observable { 12 | return this.http.get(`${this.prefix}${lang}${this.suffix}`); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/src/public_api.ts: -------------------------------------------------------------------------------- 1 | export * from "./lib/http-loader"; 2 | -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone'; 4 | import 'zone.js/dist/zone-testing'; 5 | import { getTestBed } from '@angular/core/testing'; 6 | import { 7 | BrowserDynamicTestingModule, 8 | platformBrowserDynamicTesting 9 | } from '@angular/platform-browser-dynamic/testing'; 10 | 11 | declare const require: any; 12 | 13 | // First, initialize the Angular testing environment. 14 | getTestBed().initTestEnvironment( 15 | BrowserDynamicTestingModule, 16 | platformBrowserDynamicTesting() 17 | ); 18 | // Then we find all the tests. 19 | const context = require.context('./tests/', true, /\.spec\.ts$/); 20 | // And load the modules. 21 | context.keys().map(context); 22 | -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/tests/http-loader.spec.ts: -------------------------------------------------------------------------------- 1 | import {HttpClient} from "@angular/common/http"; 2 | import {HttpClientTestingModule, HttpTestingController} from "@angular/common/http/testing"; 3 | import {TestBed} from "@angular/core/testing"; 4 | import {TranslateLoader, TranslateModule, TranslateService} from "@ngx-translate/core"; 5 | import {TranslateHttpLoader} from "../src/public_api"; 6 | 7 | describe('TranslateLoader', () => { 8 | let translate: TranslateService; 9 | let http: HttpTestingController; 10 | 11 | beforeEach(() => { 12 | TestBed.configureTestingModule({ 13 | imports: [ 14 | HttpClientTestingModule, 15 | TranslateModule.forRoot({ 16 | loader: { 17 | provide: TranslateLoader, 18 | useFactory: (httpClient: HttpClient) => new TranslateHttpLoader(httpClient), 19 | deps: [HttpClient] 20 | } 21 | }) 22 | ], 23 | providers: [TranslateService] 24 | }); 25 | translate = TestBed.get(TranslateService); 26 | http = TestBed.get(HttpTestingController); 27 | }); 28 | 29 | afterEach(() => { 30 | translate = undefined; 31 | http = undefined; 32 | }); 33 | 34 | it('should be able to provide TranslateHttpLoader', () => { 35 | expect(TranslateHttpLoader).toBeDefined(); 36 | expect(translate.currentLoader).toBeDefined(); 37 | expect(translate.currentLoader instanceof TranslateHttpLoader).toBeTruthy(); 38 | }); 39 | 40 | it('should be able to get translations', () => { 41 | translate.use('en'); 42 | 43 | // this will request the translation from the backend because we use a static files loader for TranslateService 44 | translate.get('TEST').subscribe((res: string) => { 45 | expect(res).toEqual('This is a test'); 46 | }); 47 | 48 | // mock response after the xhr request, otherwise it will be undefined 49 | http.expectOne('/assets/i18n/en.json').flush({ 50 | "TEST": "This is a test", 51 | "TEST2": "This is another test" 52 | }); 53 | 54 | // this will request the translation from downloaded translations without making a request to the backend 55 | translate.get('TEST2').subscribe((res: string) => { 56 | expect(res).toEqual('This is another test'); 57 | }); 58 | }); 59 | 60 | it('should be able to reload a lang', () => { 61 | translate.use('en'); 62 | 63 | // this will request the translation from the backend because we use a static files loader for TranslateService 64 | translate.get('TEST').subscribe((res: string) => { 65 | expect(res).toEqual('This is a test'); 66 | 67 | // reset the lang as if it was never initiated 68 | translate.reloadLang('en').subscribe((res2: string) => { 69 | expect(translate.instant('TEST')).toEqual('This is a test 2'); 70 | }); 71 | 72 | http.expectOne('/assets/i18n/en.json').flush({"TEST": "This is a test 2"}); 73 | }); 74 | 75 | // mock response after the xhr request, otherwise it will be undefined 76 | http.expectOne('/assets/i18n/en.json').flush({"TEST": "This is a test"}); 77 | }); 78 | 79 | it('should be able to reset a lang', (done: Function) => { 80 | translate.use('en'); 81 | spyOn(http, 'expectOne').and.callThrough(); 82 | 83 | // this will request the translation from the backend because we use a static files loader for TranslateService 84 | translate.get('TEST').subscribe((res: string) => { 85 | expect(res).toEqual('This is a test'); 86 | expect(http.expectOne).toHaveBeenCalledTimes(1); 87 | 88 | // reset the lang as if it was never initiated 89 | translate.resetLang('en'); 90 | 91 | expect(translate.instant('TEST')).toEqual('TEST'); 92 | 93 | // use set timeout because no request is really made and we need to trigger zone to resolve the observable 94 | setTimeout(() => { 95 | translate.get('TEST').subscribe((res2: string) => { 96 | expect(res2).toEqual('TEST'); // because the loader is "pristine" as if it was never called 97 | expect(http.expectOne).toHaveBeenCalledTimes(1); 98 | done(); 99 | }); 100 | }, 10); 101 | }); 102 | 103 | // mock response after the xhr request, otherwise it will be undefined 104 | http.expectOne('/assets/i18n/en.json').flush({"TEST": "This is a test"}); 105 | }); 106 | }); 107 | -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../out-tsc/lib", 5 | "target": "es2015", 6 | "module": "es2015", 7 | "moduleResolution": "node", 8 | "declaration": true, 9 | "sourceMap": true, 10 | "inlineSources": true, 11 | "emitDecoratorMetadata": true, 12 | "experimentalDecorators": true, 13 | "importHelpers": true, 14 | "types": [], 15 | "lib": [ 16 | "dom", 17 | "es2015" 18 | ] 19 | }, 20 | "angularCompilerOptions": { 21 | "skipTemplateCodegen": true, 22 | "strictMetadataEmit": true, 23 | "fullTemplateTypeCheck": true, 24 | "strictInjectionParameters": true, 25 | "flatModuleId": "AUTOGENERATED", 26 | "flatModuleOutFile": "AUTOGENERATED", 27 | "enableIvy": false 28 | }, 29 | "exclude": [ 30 | "./tests", 31 | "**/*.spec.ts" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/tsconfig.lib.prod.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.lib.json", 3 | "angularCompilerOptions": { 4 | "enableIvy": false 5 | } 6 | } -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts" 12 | ], 13 | "include": [ 14 | "**/*.spec.ts", 15 | "**/*.d.ts" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /projects/ngx-translate/http-loader/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "lib", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "lib", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "downlevelIteration": true, 6 | "importHelpers": true, 7 | "module": "esnext", 8 | "outDir": "./dist/out-tsc", 9 | "sourceMap": true, 10 | "declaration": false, 11 | "moduleResolution": "node", 12 | "emitDecoratorMetadata": true, 13 | "experimentalDecorators": true, 14 | "target": "es2015", 15 | "typeRoots": [ 16 | "node_modules/@types" 17 | ], 18 | "lib": [ 19 | "es2017", 20 | "dom" 21 | ], 22 | "paths": { 23 | "@ngx-translate/http-loader": [ 24 | "dist/@ngx-translate/http-loader" 25 | ] 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/codelyzer" 4 | ], 5 | "rules": { 6 | "class-name": true, 7 | "curly": true, 8 | "forin": true, 9 | "indent": [ 10 | true, 11 | "spaces" 12 | ], 13 | "label-position": true, 14 | "member-access": false, 15 | "no-arg": true, 16 | "no-bitwise": true, 17 | "no-console": [ 18 | true, 19 | "debug", 20 | "info", 21 | "time", 22 | "timeEnd", 23 | "trace" 24 | ], 25 | "no-construct": true, 26 | "no-duplicate-variable": true, 27 | "no-empty": false, 28 | "no-eval": true, 29 | "no-inferrable-types": false, 30 | "no-shadowed-variable": true, 31 | "no-string-literal": false, 32 | "no-unused-expression": true, 33 | "object-literal-sort-keys": false, 34 | "one-line": [ 35 | true, 36 | "check-open-brace", 37 | "check-catch", 38 | "check-else", 39 | "check-whitespace" 40 | ], 41 | "radix": true, 42 | "semicolon": [ 43 | "always" 44 | ], 45 | "triple-equals": [ 46 | true, 47 | "allow-null-check" 48 | ], 49 | "typedef-whitespace": [ 50 | true, 51 | { 52 | "call-signature": "nospace", 53 | "index-signature": "nospace", 54 | "parameter": "nospace", 55 | "property-declaration": "nospace", 56 | "variable-declaration": "nospace" 57 | } 58 | ], 59 | "variable-name": false, 60 | "no-inputs-metadata-property": true, 61 | "no-outputs-metadata-property": true, 62 | "no-host-metadata-property": false, 63 | "use-pipe-transform-interface": true 64 | } 65 | } 66 | --------------------------------------------------------------------------------