@w0s/tsconfig 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -4
  3. package/__tests__/@types/types.d.ts +0 -22
  4. package/__tests__/invalid/compilerOptions/typeChecking/01 allowUnreachableCode.ts +0 -8
  5. package/__tests__/invalid/compilerOptions/typeChecking/02 allowUnusedLabels.ts +0 -6
  6. package/__tests__/invalid/compilerOptions/typeChecking/04 exactOptionalPropertyTypes.ts +0 -4
  7. package/__tests__/invalid/compilerOptions/typeChecking/05 noFallthroughCasesInSwitch.ts +0 -10
  8. package/__tests__/invalid/compilerOptions/typeChecking/06 noImplicitAny.ts +0 -7
  9. package/__tests__/invalid/compilerOptions/typeChecking/07 noImplicitOverride.ts +0 -11
  10. package/__tests__/invalid/compilerOptions/typeChecking/08 noImplicitReturns.ts +0 -7
  11. package/__tests__/invalid/compilerOptions/typeChecking/09 noImplicitThis.ts +0 -15
  12. package/__tests__/invalid/compilerOptions/typeChecking/10 noPropertyAccessFromIndexSignature.ts +0 -9
  13. package/__tests__/invalid/compilerOptions/typeChecking/11 noUncheckedIndexedAccess.ts +0 -11
  14. package/__tests__/invalid/compilerOptions/typeChecking/12 noUnusedLocals.ts +0 -5
  15. package/__tests__/invalid/compilerOptions/typeChecking/13 noUnusedParameters.ts +0 -5
  16. package/__tests__/tsconfig-invalid.json +0 -11
  17. package/__tests__/tsconfig-valid.json +0 -11
  18. package/__tests__/valid/compilerOptions/typeChecking/01 allowUnreachableCode.ts +0 -7
  19. package/__tests__/valid/compilerOptions/typeChecking/02 allowUnusedLabels.ts +0 -7
  20. package/__tests__/valid/compilerOptions/typeChecking/04 exactOptionalPropertyTypes.ts +0 -4
  21. package/__tests__/valid/compilerOptions/typeChecking/05 noFallthroughCasesInSwitch.ts +0 -11
  22. package/__tests__/valid/compilerOptions/typeChecking/06 noImplicitAny.ts +0 -7
  23. package/__tests__/valid/compilerOptions/typeChecking/07 noImplicitOverride.ts +0 -11
  24. package/__tests__/valid/compilerOptions/typeChecking/08 noImplicitReturns.ts +0 -8
  25. package/__tests__/valid/compilerOptions/typeChecking/09 noImplicitThis.ts +0 -15
  26. package/__tests__/valid/compilerOptions/typeChecking/10 noPropertyAccessFromIndexSignature.ts +0 -7
  27. package/__tests__/valid/compilerOptions/typeChecking/11 noUncheckedIndexedAccess.ts +0 -8
  28. package/__tests__/valid/compilerOptions/typeChecking/12 noUnusedLocals.ts +0 -3
  29. package/__tests__/valid/compilerOptions/typeChecking/13 noUnusedParameters.ts +0 -5
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # tsconfig
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/%40w0s%2Ftsconfig.svg)](https://www.npmjs.com/package/@w0s/tsconfig)
4
- [![test status](https://github.com/SaekiTominaga/w0s/actions/workflows/ts-test.yml/badge.svg)](https://github.com/SaekiTominaga/w0s/actions/workflows/ts-test.yml)
4
+ [![test status](https://github.com/SaekiTominaga/w0s/actions/workflows/typescript-test.yml/badge.svg)](https://github.com/SaekiTominaga/w0s/actions/workflows/typescript-test.yml)
5
5
 
6
6
  [TSConfig](https://www.typescriptlang.org/tsconfig) file used on [w0s.jp](https://w0s.jp/)
7
7
 
package/package.json CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "@w0s/tsconfig",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "TSConfig file used on w0s.jp",
5
5
  "keywords": [
6
6
  "tsconfig"
7
7
  ],
8
8
  "license": "MIT",
9
9
  "author": "Saeki Tominaga",
10
- "files": [
11
- ""
12
- ],
10
+ "files": [],
13
11
  "type": "module",
14
12
  "main": "tsconfig.json",
15
13
  "repository": {
@@ -1,22 +0,0 @@
1
- interface UserDefaults {
2
- // The absence of a value represents 'system'
3
- colorThemeOverride?: 'dark' | 'light';
4
- }
5
-
6
- interface GameSettings {
7
- // Known up-front properties
8
- speed: 'fast' | 'medium' | 'slow';
9
- quality: 'high' | 'low';
10
- // Assume anything unknown to the interface
11
- // is a string.
12
- [key: string]: string;
13
- }
14
-
15
- interface EnvironmentVars {
16
- NAME: string;
17
- OS: string;
18
- // Unknown properties are covered by this index signature.
19
- [propName: string]: string;
20
- }
21
-
22
- declare const env: EnvironmentVars;
@@ -1,8 +0,0 @@
1
- export const fn = function (n: number) {
2
- if (n > 5) {
3
- return true;
4
- } else {
5
- return false;
6
- }
7
- return true;
8
- };
@@ -1,6 +0,0 @@
1
- export const verifyAge = function (age: number) {
2
- // Forgot 'return' statement
3
- if (age > 18) {
4
- verified: true;
5
- }
6
- };
@@ -1,4 +0,0 @@
1
- {
2
- const settings: UserDefaults = {};
3
- settings.colorThemeOverride = undefined;
4
- }
@@ -1,10 +0,0 @@
1
- {
2
- const a: number = 6;
3
- switch (a) {
4
- case 0:
5
- console.log('even');
6
- case 1:
7
- console.log('odd');
8
- break;
9
- }
10
- }
@@ -1,7 +0,0 @@
1
- {
2
- const fn = function (s) {
3
- // No error?
4
- console.log(s.substr(3));
5
- };
6
- fn(42);
7
- }
@@ -1,11 +0,0 @@
1
- export class Album {
2
- setup() {}
3
- }
4
-
5
- export class MLAlbum extends Album {
6
- override setup() {}
7
- }
8
-
9
- export class SharedAlbum extends Album {
10
- setup() {}
11
- }
@@ -1,7 +0,0 @@
1
- export const lookupHeadphonesManufacturer = function (color: 'blue' | 'black'): string {
2
- if (color === 'blue') {
3
- return 'beats';
4
- } else {
5
- ('bose');
6
- }
7
- };
@@ -1,15 +0,0 @@
1
- export class Rectangle {
2
- width: number;
3
- height: number;
4
-
5
- constructor(width: number, height: number) {
6
- this.width = width;
7
- this.height = height;
8
- }
9
-
10
- getAreaFunction() {
11
- return function () {
12
- return this.width * this.height;
13
- };
14
- }
15
- }
@@ -1,9 +0,0 @@
1
- {
2
- const settings: GameSettings = { speed: 'fast', quality: 'high' };
3
- settings.speed;
4
- settings.quality;
5
-
6
- // Unknown key accessors are allowed on
7
- // this object, and are `string`
8
- settings.username;
9
- }
@@ -1,11 +0,0 @@
1
- {
2
- // Declared as existing
3
- const sysName = env.NAME;
4
- const os = env.OS;
5
-
6
- // Not declared, but because of the index
7
- // signature, then it is considered a string
8
- const nodeEnv = env['NODE_ENV'];
9
-
10
- console.debug(sysName.trim(), os.trim(), nodeEnv.trim());
11
- }
@@ -1,5 +0,0 @@
1
- (modelID: number) => {
2
- const defaultModelID = 23;
3
-
4
- return { type: 'keyboard', modelID };
5
- };
@@ -1,5 +0,0 @@
1
- (modelID: number) => {
2
- const defaultModelID = 23;
3
-
4
- return { type: 'keyboard', modelID: defaultModelID };
5
- };
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../tsconfig.json",
3
- "include": ["@types/*.d.ts", "invalid/**/*.ts"],
4
- "compilerOptions": {
5
- /* Emit */
6
- "noEmit": true,
7
-
8
- /* Projects */
9
- "incremental": false
10
- }
11
- }
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../tsconfig.json",
3
- "include": ["@types/*.d.ts", "valid/**/*.ts"],
4
- "compilerOptions": {
5
- /* Emit */
6
- "noEmit": true,
7
-
8
- /* Projects */
9
- "incremental": false
10
- }
11
- }
@@ -1,7 +0,0 @@
1
- export const fn = function (n: number) {
2
- if (n > 5) {
3
- return true;
4
- } else {
5
- return false;
6
- }
7
- };
@@ -1,7 +0,0 @@
1
- export const verifyAge = function (age: number) {
2
- // Forgot 'return' statement
3
- if (age > 18) {
4
- return true;
5
- }
6
- return;
7
- };
@@ -1,4 +0,0 @@
1
- {
2
- const settings: UserDefaults = {};
3
- settings.colorThemeOverride = 'dark';
4
- }
@@ -1,11 +0,0 @@
1
- {
2
- const a: number = 6;
3
- switch (a) {
4
- case 0:
5
- console.log('even');
6
- break;
7
- case 1:
8
- console.log('odd');
9
- break;
10
- }
11
- }
@@ -1,7 +0,0 @@
1
- {
2
- const fn = function (s: string) {
3
- // No error?
4
- console.log(s.substr(3));
5
- };
6
- fn('42');
7
- }
@@ -1,11 +0,0 @@
1
- export class Album {
2
- setup() {}
3
- }
4
-
5
- export class MLAlbum extends Album {
6
- override setup() {}
7
- }
8
-
9
- export class SharedAlbum extends Album {
10
- override setup() {}
11
- }
@@ -1,8 +0,0 @@
1
- export const lookupHeadphonesManufacturer = function (color: 'blue' | 'black'): string {
2
- if (color === 'blue') {
3
- return 'beats';
4
- } else {
5
- ('bose');
6
- }
7
- return '';
8
- };
@@ -1,15 +0,0 @@
1
- export class Rectangle {
2
- width: number;
3
- height: number;
4
-
5
- constructor(width: number, height: number) {
6
- this.width = width;
7
- this.height = height;
8
- }
9
-
10
- getAreaFunction() {
11
- return () => {
12
- return this.width * this.height;
13
- };
14
- }
15
- }
@@ -1,7 +0,0 @@
1
- {
2
- const settings: GameSettings = { speed: 'fast', quality: 'high' };
3
- settings.speed;
4
- settings.quality;
5
-
6
- settings['username'];
7
- }
@@ -1,8 +0,0 @@
1
-
2
- {
3
- // Declared as existing
4
- const sysName = env.NAME;
5
- const os = env.OS;
6
-
7
- console.debug(sysName.trim(), os.trim());
8
- }
@@ -1,3 +0,0 @@
1
- (modelID: number) => {
2
- return { type: 'keyboard', modelID };
3
- };
@@ -1,5 +0,0 @@
1
- () => {
2
- const defaultModelID = 23;
3
-
4
- return { type: 'keyboard', modelID: defaultModelID };
5
- };