-
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.
feat(prettier-config-bananass): introduce
prettier-config-bananass
…
…package (#57) This pull request includes the creation and integration of a new Prettier configuration package named `prettier-config-bananass`. The main changes involve updating configuration files, adding dependencies, and creating the new package with its associated files and tests. ### Integration of `prettier-config-bananass`: * [`.prettierrc.js`](diffhunk://#diff-7312296367dd7c725b9beb500d7dab7bbeeb2aa03a1010a3fb2935f826d03fa6L1-R1): Changed to use the new `prettier-config-bananass` package. * [`package.json`](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R3-R4): Added `prettier-config-bananass` as a dependency and updated metadata. [[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R3-R4) [[2]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R45) ### Creation of `prettier-config-bananass` package: * [`packages/prettier-config-bananass/package.json`](diffhunk://#diff-0fdaf27a6fc3a9c98ce068e2f60dd6fa1d2a82cfc232695581bcae3256c32d76R1-R39): Added metadata, scripts, and configuration for the new package. * [`packages/prettier-config-bananass/src/index.js`](diffhunk://#diff-5704c175b00dfba9748074a44221d8bdeafc9a341ed6c6107bb94b85ee8394f5R1-R28): Defined the Prettier configuration settings. * [`packages/prettier-config-bananass/src/index.test.js`](diffhunk://#diff-b8873c5676cad2e44ca6ba4d5d8613a21d19ab0a1bb66f3548dfb45b20fdb8f7R1-R78): Added tests to ensure the configuration settings are correct.
- Loading branch information
1 parent
4c92a0b
commit 8026550
Showing
6 changed files
with
163 additions
and
11 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 |
---|---|---|
@@ -1,11 +1 @@ | ||
module.exports = { | ||
printWidth: 90, | ||
tabWidth: 2, | ||
useTabs: false, | ||
semi: true, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
bracketSpacing: true, | ||
arrowParens: 'avoid', | ||
proseWrap: 'never', | ||
}; | ||
module.exports = require('prettier-config-bananass'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "prettier-config-bananass", | ||
"version": "0.0.0", | ||
"description": "Prettier Config for Bananass Framework.🍌", | ||
"exports": "./src/index.js", | ||
"files": [ | ||
"src/index.js", | ||
"LICENSE.md", | ||
"README.md" | ||
], | ||
"keywords": [ | ||
"bananass", | ||
"baekjoon", | ||
"framework", | ||
"javascript", | ||
"prettier", | ||
"prettierconfig", | ||
"prettier-config", | ||
"config" | ||
], | ||
"author": "루밀LuMir <rpfos@naver.com> (https://github.com/lumirlumir)", | ||
"license": "MIT", | ||
"homepage": "https://github.com/lumirlumir/npm-bananass", | ||
"repository": { | ||
"type": "github", | ||
"url": "git+https://github.com/lumirlumir/npm-bananass.git", | ||
"directory": "packages/prettier-config-bananass" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/lumirlumir/npm-bananass/issues" | ||
}, | ||
"engines": { | ||
"node": ">=20.18.0" | ||
}, | ||
"scripts": { | ||
"build": "cp ../../LICENSE.md ../../README.md .", | ||
"test": "node --test" | ||
} | ||
} |
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,28 @@ | ||
/** | ||
* @fileoverview Entry file for the `prettier-config-bananass` package. | ||
* @module prettier-config-bananass | ||
* | ||
* All default values are based on `prettier@3`. | ||
*/ | ||
|
||
// -------------------------------------------------------------------------------- | ||
// Exports | ||
// -------------------------------------------------------------------------------- | ||
|
||
module.exports = { | ||
printWidth: 90, | ||
tabWidth: 2, // Default. | ||
useTabs: false, // Default. | ||
semi: true, // Default. | ||
singleQuote: true, | ||
quoteProps: 'as-needed', // Default. | ||
jsxSingleQuote: false, // Default. | ||
trailingComma: 'all', // Default. | ||
bracketSpacing: true, // Default. | ||
bracketSameLine: false, // Default. | ||
arrowParens: 'avoid', | ||
proseWrap: 'never', | ||
htmlWhitespaceSensitivity: 'css', // Default. | ||
endOfLine: 'lf', // Default. | ||
singleAttributePerLine: false, // Default. | ||
}; |
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,78 @@ | ||
/** | ||
* @fileoverview Test for `index.js`. | ||
*/ | ||
|
||
// -------------------------------------------------------------------------------- | ||
// Require | ||
// -------------------------------------------------------------------------------- | ||
|
||
const { strictEqual } = require('node:assert'); | ||
const { describe, it } = require('node:test'); | ||
|
||
const prettierConfig = require('./index'); | ||
|
||
// -------------------------------------------------------------------------------- | ||
// Test | ||
// -------------------------------------------------------------------------------- | ||
|
||
describe('index.js', () => { | ||
it('printWidth should be 90', () => { | ||
strictEqual(prettierConfig.printWidth, 90); | ||
}); | ||
|
||
it('tabWidth should be 2', () => { | ||
strictEqual(prettierConfig.tabWidth, 2); | ||
}); | ||
|
||
it('useTabs should be false', () => { | ||
strictEqual(prettierConfig.useTabs, false); | ||
}); | ||
|
||
it('semi should be true', () => { | ||
strictEqual(prettierConfig.semi, true); | ||
}); | ||
|
||
it('singleQuote should be true', () => { | ||
strictEqual(prettierConfig.singleQuote, true); | ||
}); | ||
|
||
it('quoteProps should be "as-needed"', () => { | ||
strictEqual(prettierConfig.quoteProps, 'as-needed'); | ||
}); | ||
|
||
it('jsxSingleQuote should be false', () => { | ||
strictEqual(prettierConfig.jsxSingleQuote, false); | ||
}); | ||
|
||
it('trailingComma should be "all"', () => { | ||
strictEqual(prettierConfig.trailingComma, 'all'); | ||
}); | ||
|
||
it('bracketSpacing should be true', () => { | ||
strictEqual(prettierConfig.bracketSpacing, true); | ||
}); | ||
|
||
it('bracketSameLine should be false', () => { | ||
strictEqual(prettierConfig.bracketSameLine, false); | ||
}); | ||
|
||
it('arrowParens should be "avoid"', () => { | ||
strictEqual(prettierConfig.arrowParens, 'avoid'); | ||
}); | ||
|
||
it('proseWrap should be "never"', () => { | ||
strictEqual(prettierConfig.proseWrap, 'never'); | ||
}); | ||
|
||
it('htmlWhitespaceSensitivity should be "css"', () => { | ||
strictEqual(prettierConfig.htmlWhitespaceSensitivity, 'css'); | ||
}); | ||
|
||
it('endOfLine should be "lf"', () => { | ||
strictEqual(prettierConfig.endOfLine, 'lf'); | ||
}); | ||
|
||
it('singleAttributePerLine should be false', () => { | ||
strictEqual(prettierConfig.singleAttributePerLine, false); | ||
}); | ||
}); |