-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
292e4fb
commit 31940e1
Showing
22 changed files
with
147 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@bfra.me/eslint-config": patch | ||
--- | ||
|
||
Export missing type definitions. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@bfra.me/prettier-config": minor | ||
--- | ||
|
||
Ship a bundled config as the default; simplify everything. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
import {defineConfig} from '@bfra.me/eslint-config' | ||
import {composeConfig} from '../eslint-config/src' | ||
import {config} from '../../eslint.config' | ||
|
||
export default defineConfig({ | ||
name: '@bfra.me/api-core', | ||
ignores: ['test-utils'], | ||
rules: { | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
name: 'fs/promises', | ||
message: "Please use `fs` instead as some client frameworks don't polyfill `fs/promises`.", | ||
}, | ||
], | ||
|
||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
export default composeConfig( | ||
config, | ||
{ | ||
name: '@bfra.me/api-core', | ||
ignores: ['test-utils'], | ||
}, | ||
typescript: { | ||
parserOptions: { | ||
project: ['./tsconfig.json', './tsconfig.eslint.json'], | ||
projectService: false, | ||
{ | ||
name: '@bfra.me/eslint-config', | ||
files: ['src/**/*.ts'], | ||
rules: { | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
name: 'fs/promises', | ||
message: | ||
"Please use `fs` instead as some client frameworks don't polyfill `fs/promises`.", | ||
}, | ||
], | ||
|
||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
}, | ||
tsconfigPath: './tsconfig.json', | ||
}, | ||
vitest: true, | ||
}) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import {defineConfig} from './define-config' | ||
|
||
export * from './compose-config' | ||
export * from './config.d' | ||
export * from './configs' | ||
export * from './define-config' | ||
export * from './env' | ||
export * from './globs' | ||
export * from './options' | ||
export * from './rules.d' | ||
|
||
export const config = defineConfig() | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
test/fixtures/ | ||
prettier.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {composeConfig} from '../eslint-config/src' | ||
import config from '../../eslint.config' | ||
|
||
export default composeConfig(config, { | ||
name: '@bfra.me/prettier-config/bundled', | ||
ignores: ['prettier.config.js'], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"./index.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
import defaultConfig, {type DefaultConfig} from './prettier.config.js' | ||
|
||
/** | ||
* Shared Prettier configuration for bfra.me projects with `printWidth` set to 120 characters. | ||
*/ | ||
export interface $120ProofConfig extends DefaultConfig { | ||
/** @default 120 */ | ||
printWidth: 120 | DefaultConfig['printWidth'] | ||
} | ||
import defaultConfig, {type Writable} from './prettier.config.js' | ||
|
||
const $120ProofConfig = { | ||
...defaultConfig, | ||
printWidth: 120, | ||
semi: new URL(import.meta.url).searchParams.has('semi', 'true') || defaultConfig.semi, | ||
} as $120ProofConfig | ||
} as const | ||
|
||
/** | ||
* Shared Prettier configuration for bfra.me projects with `printWidth` set to 120 characters. | ||
*/ | ||
type $120ProofConfig = Writable<typeof $120ProofConfig> | ||
|
||
export default $120ProofConfig | ||
export default $120ProofConfig as $120ProofConfig |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,28 @@ | ||
import {defineConfig} from 'tsup' | ||
|
||
export default defineConfig({ | ||
bundle: false, | ||
clean: true, | ||
dts: 'src/index.ts', | ||
entry: ['./src/*.ts'], | ||
format: ['esm'], | ||
outDir: 'lib', | ||
sourcemap: true, | ||
// Splitting can place code using `import.meta` into a separate chunk, which breaks the preset export mappings. | ||
splitting: false, | ||
}) | ||
export default defineConfig([ | ||
{ | ||
bundle: false, | ||
clean: true, | ||
dts: true, | ||
entry: ['./src/*.ts'], | ||
format: ['esm'], | ||
minify: true, | ||
outDir: 'lib', | ||
sourcemap: true, | ||
// Splitting can place code using `import.meta` into a separate chunk, which breaks the preset export mappings. | ||
splitting: false, | ||
target: 'es2022', | ||
}, | ||
{ | ||
entry: ['./src/prettier.config.ts'], | ||
format: ['esm'], | ||
minify: true, | ||
// Bundle the config and dependencies into a single file. | ||
noExternal: [/^@bfra.me\//], | ||
outDir: '.', | ||
sourcemap: true, | ||
target: 'es2022', | ||
treeshake: 'smallest', | ||
}, | ||
]) |
Oops, something went wrong.