Skip to content

Commit

Permalink
Merge pull request #360 from atls/sync/prettier
Browse files Browse the repository at this point in the history
Sync: prettier
  • Loading branch information
Nelfimov authored Aug 20, 2024
2 parents 546e5d3 + 308a2ea commit e983199
Show file tree
Hide file tree
Showing 28 changed files with 124 additions and 73 deletions.
14 changes: 11 additions & 3 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { JSX } from 'react'
import type { IndicatorProps } from 'ink-select-input'
import type { JSX } from 'react'

import { Text } from 'ink'
import { Box } from 'ink'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC } from 'react'
import type { DiagnosticMessageChain } from 'typescript'
import type { SourceFile } from 'typescript'
import type { FC } from 'react'

import { isAbsolute } from 'node:path'
import { relative } from 'node:path'
Expand Down
2 changes: 1 addition & 1 deletion code/code-configuration/src/workspace.configuration.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { WorkspaceConfigurationOptions } from './configuration.interfaces.js'

import { join } from 'node:path'
import { readFile } from 'node:fs/promises'
import { join } from 'node:path'

export class WorkspaceConfiguration {
static async find(cwd: string): Promise<WorkspaceConfigurationOptions> {
Expand Down
2 changes: 1 addition & 1 deletion code/code-format-worker/src/formatter.worker.content.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions code/code-format/src/formatter.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { readFileSync } from 'node:fs'
import { writeFile } from 'node:fs/promises'
import { readFile } from 'node:fs/promises'
import { readFileSync } from 'node:fs'
import { relative } from 'node:path'
import { join } from 'node:path'

import * as babel from 'prettier/plugins/babel'
import * as estree from 'prettier/plugins/estree'
import * as graphql from 'prettier/plugins/graphql'
import * as markdown from 'prettier/plugins/markdown'
import * as typescript from 'prettier/plugins/typescript'
import * as yaml from 'prettier/plugins/yaml'
import * as estree from 'prettier/plugins/estree'
import { globby } from 'globby'
import { format } from 'prettier/standalone'
import ignorer from 'ignore'
Expand Down
2 changes: 1 addition & 1 deletion code/code-icons-worker/src/icons.worker.content.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions code/code-icons/integration/compile.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { readFile } from 'node:fs/promises'
import { rmdir } from 'node:fs/promises'
import { join } from 'node:path'
import { fileURLToPath } from 'node:url'

import { afterAll } from '@jest/globals'
import { describe } from '@jest/globals'
Expand Down
2 changes: 1 addition & 1 deletion code/code-icons/src/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { readFile } from 'node:fs/promises'
import { readdir } from 'node:fs/promises'
import { writeFile } from 'node:fs/promises'
import { mkdir } from 'node:fs/promises'
import { join } from 'node:path'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { basename } from 'node:path'
import { extname } from 'node:path'

Expand Down
2 changes: 1 addition & 1 deletion code/code-icons/src/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { webpack } from '@atls/code-runtime/webpack'

import { writeFile } from 'node:fs/promises'
import { mkdtemp } from 'node:fs/promises'
import { join } from 'node:path'
import { tmpdir } from 'node:os'
import { join } from 'node:path'

import Config from 'webpack-chain-5'

Expand Down
2 changes: 1 addition & 1 deletion code/code-lint-worker/src/linter.worker.content.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/code-lint-worker/src/linter.worker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ESLint } from '@atls/code-runtime/eslint'
import type { LintOptions } from '@atls/code-lint'
import type { ESLint } from '@atls/code-runtime/eslint'

import { EvalWorker } from '@atls/code-worker-utils'

Expand Down
2 changes: 1 addition & 1 deletion code/code-lint/src/linter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ESLint } from '@atls/code-runtime/eslint'

import { readFile } from 'node:fs/promises'
import { readFileSync } from 'node:fs'
import { readFile } from 'node:fs/promises'
import { writeFile } from 'node:fs/promises'
import { relative } from 'node:path'
import { join } from 'node:path'
Expand Down
4 changes: 2 additions & 2 deletions code/code-service/src/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import type { WebpackEnvironment } from './webpack.interfaces.js'
import { readFile } from 'node:fs/promises'
import { writeFile } from 'node:fs/promises'
import { mkdtemp } from 'node:fs/promises'
import { join } from 'node:path'
import { tmpdir } from 'node:os'
import { join } from 'node:path'

import { webpack } from '@atls/code-runtime/webpack'
import { tsLoaderPath } from '@atls/code-runtime/webpack'
import { nodeLoaderPath } from '@atls/code-runtime/webpack'
import tsconfig from '@atls/config-typescript'

import { ModuleTypes } from './webpack.interfaces.js'
import { WebpackExternals } from './webpack.externals.js'
import { LAZY_IMPORTS } from './webpack.ignore.js'
import { ModuleTypes } from './webpack.interfaces.js'

export class WebpackConfig {
constructor(private readonly cwd: string) {}
Expand Down
2 changes: 1 addition & 1 deletion code/code-test-worker/src/tester.worker.content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const getContent = (): string => {
if (typeof hook === `undefined`)
hook = brotliDecompressSync(
Buffer.from(
'Gy0WAJwF7t4J0S2Q5/idOTpd/y+X3XM5/SrQEFhRGFbMGONNaJc4kNE0DaJg1rd23BKkx8fvWyvVXYB1XnyMjjwjo9Rt/arfb6ADsxRAVtV9NLsBAM9GnpWJNvgYaq2Z5P4cICIQsW+3dqJ6AxApl4DUTuFARgnKsT9RIqGoRVq9kJ/jEQmDn2yQgZIy9obIZSJ9FfXIABiJSUYybkxcR/eoDM5+zFywMHMTwtjkUeaIfjOsm+cf3s7MIuglT0xfRc7CQ1lYN7VclBc29kjxiyPAK+J52MWeu8zAa2dq0bvMwQVPqlUXBv3bLZzOw1UB3eku99EhfGgERRW2SEBRJElQgYgSYZiy31PU/5sSAOfdXxVb+2h3UDW6coymVCN52YKK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u+jZOgHbzI3mQCu4tHPL9xThNmcHVwqTqgofxJQHFwZjtJ+qqPhtxvl9VgFV8+uxq6kQEUi5lS3b135RAaUXSZfCyxnNU/PwDl31OQStX9joOya0l4+r6sn4Na5G7OzqgdwGbKzV9r1zYvkEXHarl7Ljn3eZaKedsL+MYglEqRah+cpunL+D/veAFqP6ExmpFT3MaYQX1pSZW0ULrYXkfv5VzIbnsYlth4e+nc1In679LbEz7+5SfHYlsyyeLj/AQbGi/Sfxs6kNFJIC62Ztru6WAAe7W2bRNQRQAPWX3eWf1t/fo/bjr45rL3IIe+475JJ2PAKHWbst0HR6RLQLGKTI5r8H0YH3c9YKnj9z3ypWS6JCxT6MejCZbv3DqHM+65LeXRV+m7y0s106gK5wDdB45CNwdvypl5JXe80Xq9svwF6n+P8VGijFtAmnY7QEN9tnJ3cy6B0DmfkEg==',
'base64'
)
).toString()
Expand Down
4 changes: 2 additions & 2 deletions code/code-test-worker/src/tester.worker.source.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { exit } from 'node:process'
import { setTimeout } from 'node:timers/promises'
import { parentPort } from 'node:worker_threads'
import { workerData } from 'node:worker_threads'
import { setTimeout } from 'node:timers/promises'
import { exit } from 'node:process'

import { stringify } from 'flatted'
import { parse } from 'flatted'
Expand Down
8 changes: 4 additions & 4 deletions config/eslint/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import type { Linter } from 'eslint'

import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin'
import parser from '@typescript-eslint/parser'
// @ts-expect-error
import nextjsPlugin from '@next/eslint-plugin-next'
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin'
import parser from '@typescript-eslint/parser'
// @ts-expect-error
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'
// @ts-expect-error
import nodePlugin from 'eslint-plugin-n'
// @ts-expect-error
import reactPlugin from 'eslint-plugin-react'
// @ts-expect-error
import reactHooksPlugin from 'eslint-plugin-react-hooks'
// @ts-expect-error
import nodePlugin from 'eslint-plugin-n'
// @ts-expect-error
import securityPlugin from 'eslint-plugin-security'

import { typescript } from './rules/index.js'
Expand Down
18 changes: 9 additions & 9 deletions prettier/plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"globby": "^13.2.2",
"import-sort": "^6.0.0",
"import-sort-parser": "^6.0.0",
"import-sort-parser-typescript": "^6.0.0",
"import-sort-style": "^6.0.0",
"prettier": "^3.0.0",
"globby": "13.2.2",
"import-sort": "6.0.0",
"import-sort-parser": "6.0.0",
"import-sort-parser-typescript": "6.0.0",
"import-sort-style": "6.0.0",
"prettier": "3.3.3",
"sort-package-json": "^2.4.1"
},
"devDependencies": {
"@babel/types": "^7.22.5",
"@types/node": "^20.14.9",
"@types/prettier": "^2.7.3"
"@babel/types": "7.25.2",
"@types/node": "22.4.1",
"@types/prettier": "3.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable @typescript-eslint/no-unsafe-call */

import type { Node } from '@babel/types'
import type { Comment } from '@babel/types'
import type { ImportDeclaration } from '@babel/types'
import type { IImport } from 'import-sort-parser'
import type { IParser } from 'import-sort-parser'
import type { NamedMember } from 'import-sort-parser'
import type { AST } from 'prettier'
import type { Node } from '@babel/types'
import type { Comment } from '@babel/types'
import type { ImportDeclaration } from '@babel/types'

export class ImportSortTypeScriptParser implements IParser {
constructor(private readonly program: AST) {}
Expand Down
Loading

0 comments on commit e983199

Please sign in to comment.