Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsconfig.json updates #1000

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ export class JssTranslationServerLoaderService implements TranslateLoader {
@Inject('JSS_SERVER_VIEWBAG')
private serverViewBag: { [key: string]: unknown; dictionary: { [key: string]: string } }
) {}

getTranslation(lang: string) {
getTranslation(_lang: string) {
// read initial dictionary from data injected via server.bundle wrapper
const dictionary = this.serverViewBag.dictionary;
if (dictionary) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ export class JssContextServerSideService extends JssContextService {
protected layoutService: JssLayoutService,
protected dataFetcher: JssDataFetcherService,
// this initial state from sitecore is injected by server.bundle for "integrated" mode
@Inject('JSS_SERVER_LAYOUT_DATA') private serverToSsrState: JssState,
@Inject('JSS_SERVER_LAYOUT_DATA') private serverToSsrState: JssState
) {
super(transferState, layoutService);
}

changeRoute(route: string, language: string): Observable<JssState> {
changeRoute(_route: string, _language: string): Observable<JssState> {
// console.log('Server route change to ' + route);

// if the route is null we signal the JSS routing setup that a 'fetch error'
Expand Down
17 changes: 7 additions & 10 deletions packages/create-sitecore-jss/src/templates/angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,17 @@
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"noUnusedLocals": true,
"noImplicitAny": true,
"skipLibCheck": true,
"target": "es5",
"module": "es2020",
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"newLine": "LF",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom",
"esnext.asynciterable"
],
"typeRoots": ["node_modules/@types"],
"lib": ["es2018", "dom", "esnext.asynciterable"],
"paths": {
"@angular/*": ["../node_modules/@angular/*"],
"rxjs": ["node_modules/rxjs", "../node_modules/rxjs"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Scripts = (): JSX.Element => {
const Scripts = (): JSX.Element | null => {
return null;
};

Expand Down
18 changes: 5 additions & 13 deletions packages/create-sitecore-jss/src/templates/nextjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
"assets/*": ["src/assets/*"]
},
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -28,15 +24,11 @@
"jsx": "preserve",
"allowSyntheticDefaultImports": true,
"noImplicitReturns": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
],
"exclude": [
"node_modules"
]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
27 changes: 5 additions & 22 deletions packages/create-sitecore-jss/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"newLine": "LF",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"lib": [
"es2017",
],
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"typeRoots": [
"node_modules/@types"
],
"lib": ["es2017"],
"typeRoots": ["node_modules/@types"],
"outDir": "dist",
"declaration": true,
"declarationDir": "./types",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"resolveJsonModule": true
"declarationDir": "./types"
},
"exclude": [
"node_modules",
Expand All @@ -33,6 +16,6 @@
"src/templates/**/*",
"src/test",
"src/**/*.test.ts",
"src/**/test-data/**/*",
"src/**/test-data/**/*"
]
}
29 changes: 6 additions & 23 deletions packages/sitecore-jss-angular-schematics/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"target": "es6",
"baseUrl": "tsconfig",
"lib": [
"es2017",
"dom"
],
"newLine": "LF",
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"rootDir": "src/",
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"sourceMap": true,
"strictNullChecks": true,
"target": "es6",
"types": [
"jasmine",
"node"
]
"types": ["jasmine", "node"],
"typeRoots": ["node_modules/@types"]
},
"include": [
"src/**/*"
],
"exclude": [
"src/*/component-files/**/*",
"src/*/manifest-files/**/*"
]
"include": ["src/**/*"],
"exclude": ["src/*/component-files/**/*", "src/*/manifest-files/**/*"]
}
21 changes: 2 additions & 19 deletions packages/sitecore-jss-angular/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"target": "es5",
"module": "es2020",
"newLine": "LF",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"lib": [
"es2017",
"dom"
],
"moduleResolution": "node",
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictPropertyInitialization": false,
"strict": true,
"typeRoots": [
"./node_modules/@types",
"./typings",
]
"typeRoots": ["./node_modules/@types", "./typings"]
}
}
31 changes: 4 additions & 27 deletions packages/sitecore-jss-cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,12 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"newLine": "LF",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"lib": [
"es2017",
"dom"
],
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"typeRoots": [
"node_modules/@types"
],
"outDir": "dist/cjs",
"declaration": true,
"declarationDir": "./types",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"typeRoots": ["node_modules/@types"],
"declarationDir": "./types"
},
"exclude": [
"node_modules",
"types",
"dist",
"src/test",
"src/**/*.test.ts",
]
"exclude": ["node_modules", "types", "dist", "src/test", "src/**/*.test.ts"]
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading