-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: drop import assertions and inline prettierrcs
The Import Assertions proposal is superceded by the Import Attributes proposal. <https://github.com/tc39/proposal-import-attributes> So Node.js support for this syntax might be deprecated or even dropped in the future. Inlining these JSON objects is safer, though a bit less maintainable. But I think it's acceptable for those rarely touched configs.
- Loading branch information
1 parent
b68a1c1
commit 78bc3d6
Showing
4 changed files
with
40 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,47 @@ | ||
import defaultConfig from './prettierrc-default.json' assert { type: 'json' } | ||
const defaultConfig = { | ||
$schema: 'https://json.schemastore.org/prettierrc', | ||
semi: false, | ||
tabWidth: 2, | ||
singleQuote: true, | ||
printWidth: 100, | ||
trailingComma: 'none' | ||
} | ||
|
||
const airbnb = { | ||
$schema: 'https://json.schemastore.org/prettierrc', | ||
arrowParens: 'always', | ||
bracketSameLine: false, | ||
bracketSpacing: true, | ||
endOfLine: 'lf', | ||
jsxSingleQuote: false, | ||
printWidth: 100, | ||
proseWrap: 'preserve', | ||
quoteProps: 'as-needed', | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'all', | ||
useTabs: false | ||
} | ||
|
||
import airbnb from './prettierrc-airbnb.json' assert { type: 'json' } | ||
import standard from './prettierrc-standard.json' assert { type: 'json' } | ||
const standard = { | ||
$schema: 'https://json.schemastore.org/prettierrc', | ||
arrowParens: 'always', | ||
bracketSameLine: false, | ||
bracketSpacing: true, | ||
jsxSingleQuote: true, | ||
proseWrap: 'preserve', | ||
quoteProps: 'as-needed', | ||
semi: false, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'none', | ||
useTabs: false | ||
} | ||
|
||
export { | ||
defaultConfig as default, | ||
|
||
airbnb, | ||
standard, | ||
standard | ||
} |