fix(essentials): short naming #440
Errors 227, Warnings 3
Found 227 errors and 3 warnings
Annotations
Check failure on line 58 in code/code-format/src/formatter.ts
github-actions / Lint
(@typescript-eslint/ban-ts-comment): Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Raw output
55 | ...config,
56 | filepath: filename,
> 57 | // @ts-expect-error any
| ^
58 | plugins: [estree, yaml, markdown, graphql, babel, typescript, plugin],
59 | })
60 |
Check failure on line 6 in code/code-lint/src/linter.ts
github-actions / Lint
(n/no-sync): Unexpected sync method: 'readFileSync'.
Unexpected sync method: 'readFileSync'.
Raw output
3 |
4 | import EventEmitter from 'node:events'
> 5 | import { readFileSync } from 'node:fs'
| ^
6 | import { readFile } from 'node:fs/promises'
7 | import { writeFile } from 'node:fs/promises'
8 | import { relative } from 'node:path'
Check failure on line 6 in code/code-lint/src/linter.ts
github-actions / Lint
(n/no-sync): Unexpected sync method: 'readFileSync'.
Unexpected sync method: 'readFileSync'.
Raw output
3 |
4 | import EventEmitter from 'node:events'
> 5 | import { readFileSync } from 'node:fs'
| ^
6 | import { readFile } from 'node:fs/promises'
7 | import { writeFile } from 'node:fs/promises'
8 | import { relative } from 'node:path'
Check failure on line 114 in code/code-lint/src/linter.ts
github-actions / Lint
(n/no-sync): Unexpected sync method: 'readFileSync'.
Unexpected sync method: 'readFileSync'.
Raw output
111 |
112 | private getProjectIgnorePatterns(): Array<string> {
> 113 | const content = readFileSync(join(this.cwd, 'package.json'), 'utf-8')
| ^
114 |
115 | const { linterIgnorePatterns = [] } = JSON.parse(content)
116 |
Check failure on line 118 in code/code-lint/src/linter.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-return): Unsafe return of a value of type `any`.
Unsafe return of a value of type `any`.
Raw output
115 | const { linterIgnorePatterns = [] } = JSON.parse(content)
116 |
> 117 | return linterIgnorePatterns
| ^
118 | }
119 | }
120 |
Check failure on line 4 in code/code-pack/src/index.ts
github-actions / Lint
(@typescript-eslint/consistent-type-exports): All exports in the declaration are only used as types. Use `export type`.
All exports in the declaration are only used as types. Use `export type`.
Raw output
1 | import * as tagUtils from './tag.utils.js'
2 |
> 3 | export * from './pack.interfaces.js'
| ^
4 | export * from './tag.utils.js'
5 | export * from './pack.js'
6 |
Check failure on line 16 in code/code-pack/src/tag.utils.ts
github-actions / Lint
(@typescript-eslint/no-non-null-assertion): Forbidden non-null assertion.
Forbidden non-null assertion.
Raw output
13 | (event.after as string) ||
14 | (event.pull_request?.head?.sha as string) ||
> 15 | process.env.GITHUB_SHA!
| ^
16 | )
17 | }
18 |
Check failure on line 16 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/ban-ts-comment): Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Raw output
13 | import { SchematicMissingFieldsException } from '@angular-devkit/schematics/tools'
14 | import { NodePackageDoesNotSupportSchematics } from '@angular-devkit/schematics/tools'
> 15 | // @ts-expect-error any
| ^
16 | import { readJsonFile } from '@angular-devkit/schematics/tools/file-system-utility'
17 |
18 | // TODO: refactor
Check warning on line 55 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(security/detect-non-literal-require): Found non-literal argument in require
Found non-literal argument in require
Raw output
52 | const packageJsonPath = require.resolve(join(name, 'package.json'), resolveOptions)
53 |
> 54 | const { schematics } = require(packageJsonPath)
| ^
55 |
56 | if (!schematics || typeof schematics !== 'string') {
57 | throw new NodePackageDoesNotSupportSchematics(name)
Check failure on line 55 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/no-require-imports): A `require()` style import is forbidden.
A `require()` style import is forbidden.
Raw output
52 | const packageJsonPath = require.resolve(join(name, 'package.json'), resolveOptions)
53 |
> 54 | const { schematics } = require(packageJsonPath)
| ^
55 |
56 | if (!schematics || typeof schematics !== 'string') {
57 | throw new NodePackageDoesNotSupportSchematics(name)
Check failure on line 55 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/no-var-requires): Require statement not part of import statement.
Require statement not part of import statement.
Raw output
52 | const packageJsonPath = require.resolve(join(name, 'package.json'), resolveOptions)
53 |
> 54 | const { schematics } = require(packageJsonPath)
| ^
55 |
56 | if (!schematics || typeof schematics !== 'string') {
57 | throw new NodePackageDoesNotSupportSchematics(name)
Check failure on line 62 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
59 |
60 | collectionPath = this.resolve(schematics, packageJsonPath, references)
> 61 | } catch (e: any) {
| ^
62 | if (e.code !== 'MODULE_NOT_FOUND') {
63 | throw e
64 | }
Check failure on line 71 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/no-explicit-any): Unexpected any. Specify a different type.
Unexpected any. Specify a different type.
Raw output
68 | try {
69 | collectionPath = require.resolve(name, resolveOptions)
> 70 | } catch (e: any) {
| ^
71 | if (e.code !== 'MODULE_NOT_FOUND') {
72 | throw e
73 | }
Check failure on line 86 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/member-ordering): Member _resolveCollectionPath should be declared before all private instance method definitions.
Member _resolveCollectionPath should be declared before all private instance method definitions.
Raw output
83 |
84 | // eslint-disable-next-line no-underscore-dangle
> 85 | protected _resolveCollectionPath(name: string, requester?: string): string {
| ^
86 | const collectionPath = this.resolve(name, requester)
87 | readJsonFile(collectionPath)
88 |
Check failure on line 88 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/no-unsafe-call): Unsafe call of a(n) `error` type typed value.
Unsafe call of a(n) `error` type typed value.
Raw output
85 | protected _resolveCollectionPath(name: string, requester?: string): string {
86 | const collectionPath = this.resolve(name, requester)
> 87 | readJsonFile(collectionPath)
| ^
88 |
89 | return collectionPath
90 | }
Check failure on line 94 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/member-ordering): Member _resolveReferenceString should be declared before all private instance method definitions.
Member _resolveReferenceString should be declared before all private instance method definitions.
Raw output
91 |
92 | // eslint-disable-next-line no-underscore-dangle
> 93 | protected _resolveReferenceString(refString: string, parentPath: string) {
| ^
94 | const ref = new ExportStringRef<RuleFactory<{}>>(refString, parentPath)
95 | if (!ref.ref) {
96 | return null
Check failure on line 94 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
91 |
92 | // eslint-disable-next-line no-underscore-dangle
> 93 | protected _resolveReferenceString(refString: string, parentPath: string) {
| ^
94 | const ref = new ExportStringRef<RuleFactory<{}>>(refString, parentPath)
95 | if (!ref.ref) {
96 | return null
Check failure on line 94 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Missing return type on function.
Missing return type on function.
Raw output
91 |
92 | // eslint-disable-next-line no-underscore-dangle
> 93 | protected _resolveReferenceString(refString: string, parentPath: string) {
| ^
94 | const ref = new ExportStringRef<RuleFactory<{}>>(refString, parentPath)
95 | if (!ref.ref) {
96 | return null
Check failure on line 104 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/member-ordering): Member _transformCollectionDescription should be declared before all private instance method definitions.
Member _transformCollectionDescription should be declared before all private instance method definitions.
Raw output
101 |
102 | // eslint-disable-next-line no-underscore-dangle
> 103 | protected _transformCollectionDescription(
| ^
104 | name: string,
105 | desc: Partial<FileSystemCollectionDesc>
106 | ): FileSystemCollectionDesc {
Check failure on line 119 in code/code-schematics/src/node-pnp-engine.host.ts
github-actions / Lint
(@typescript-eslint/member-ordering): Member _transformSchematicDescription should be declared before all private instance method definitions.
Member _transformSchematicDescription should be declared before all private instance method definitions.
Raw output
116 |
117 | // eslint-disable-next-line no-underscore-dangle
> 118 | protected _transformSchematicDescription(
| ^
119 | name: string,
120 | _collection: FileSystemCollectionDesc,
121 | desc: Partial<FileSystemSchematicDesc>
Check failure on line 26 in code/code-schematics/src/schematics.ts
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
23 | ) {}
24 |
> 25 | async init(schematic: string, options = {}) {
| ^
26 | const host = new virtualFs.ScopedHost(new NodeJsSyncHost(), this.cwd as Path)
27 |
28 | // @ts-expect-error any
Check failure on line 26 in code/code-schematics/src/schematics.ts
github-actions / Lint
(@typescript-eslint/explicit-module-boundary-types): Missing return type on function.
Missing return type on function.
Raw output
23 | ) {}
24 |
> 25 | async init(schematic: string, options = {}) {
| ^
26 | const host = new virtualFs.ScopedHost(new NodeJsSyncHost(), this.cwd as Path)
27 |
28 | // @ts-expect-error any
Check failure on line 29 in code/code-schematics/src/schematics.ts
github-actions / Lint
(@typescript-eslint/ban-ts-comment): Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 10 characters or longer.
Raw output
26 | const host = new virtualFs.ScopedHost(new NodeJsSyncHost(), this.cwd as Path)
27 |
> 28 | // @ts-expect-error any
| ^
29 | const workflow = new NodeWorkflow(host, {
30 | force: this.force,
31 | dryRun: this.dryRun,
Check failure on line 35 in code/code-schematics/src/schematics.ts
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
32 | resolvePaths: [this.cwd],
33 | schemaValidation: true,
> 34 | engineHostCreator: ({ resolvePaths }) => new NodePnpEngineHost(resolvePaths),
| ^
35 | })
36 |
37 | const collection = resolveSchematics(this.cwd)
Check failure on line 62 in code/code-schematics/src/schematics.ts
github-actions / Lint
(@typescript-eslint/explicit-function-return-type): Missing return type on function.
Missing return type on function.
Raw output
59 | }
60 |
> 61 | async migrate(schematicName: string, migrationVersion: string, options = {}) {
| ^
62 | const host = new virtualFs.ScopedHost(new NodeJsSyncHost(), this.cwd as Path)
63 |
64 | // @ts-expect-error any