eslint-config-bananass 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2024-present 루밀LuMir(lumirlumir)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,146 @@
1
+ # bananass
2
+
3
+ <kbd>한국어</kbd> | <kbd>[English](README.en.md)</kbd>
4
+
5
+ 바나나<sup>Bananass, 🍌🍌🍌🍌</sup>: <kbd>명사</kbd> 자바스크립트를 위한 백준 프레임워크.
6
+
7
+ > [!IMPORTANT]
8
+ >
9
+ > ```js
10
+ > const whyBananass = {
11
+ > banana: '🍌',
12
+ > bananas: '🍌🍌',
13
+ > bananass: '🍌🍌🍌🍌',
14
+ > }
15
+ > ```
16
+ >
17
+ > ```js
18
+ > console.log(('b' + 'a' + +'a' + 'a').toLowerCase() + (!(1/0) + [])[3].repeat(2));
19
+ > ```
20
+
21
+ <!-- markdownlint-disable-next-line md026 -->
22
+ ## 안녕, 바나나!
23
+
24
+ 바나나<sup>Bananass, 🍌🍌🍌🍌</sup> 프레임워크에 오신 것을 환영합니다.🎉
25
+
26
+ 바나나 프레임워크는 [루밀<sup>LuMir</sup>](https://github.com/lumirlumir)이 제작한 **자바스크립트<sup>JavaScript</sup>를 위한 백준 프레임워크**로, 백준 Node.js 환경에서의 보다 편리한 문제풀이를 위해 설계되었습니다.
27
+
28
+ 이제 더 이상 `readline` 혹은 `fs` 모듈을 이용한 템플릿<sup>Template</sup> 코드를 작성한 후, 일일이 복사 붙여넣기할 필요가 없습니다! 바나나 프레임워크를 통해 [**프로그래머스**](https://programmers.co.kr/)에서 하나의 솔루션 함수<sup>`function solution() {}`</sup>를 작성하듯 더욱 간편한 문제 풀이를 경험해보세요.
29
+
30
+ 그런데, 백준 문제 풀이를 하는데 굳이 프레임워크까지 알아야 할까요? 아래에서 그 이유를 찾아보죠!
31
+
32
+ ## 왜 바나나일까요?
33
+
34
+ 왜 자바스크립트<sup>JavaScript</sup> 생태계의 수 많은 프레임워크 중 문제 풀이에 특화된 프레임워크는 없었을까요? 함께 자바스크립트를 이용한 [백준 1000번: A+B](https://www.acmicpc.net/problem/1000) 문제 풀이 예제를 살펴보죠!
35
+
36
+ - 전<sup>Before</sup>: 기존 방법을 통한 문제 풀이.
37
+
38
+ ```js
39
+ const readline = require('node:readline');
40
+ const { EOL } = require('node:os');
41
+
42
+ let inputStr = '';
43
+
44
+ const rl = readline.createInterface({
45
+ input: process.stdin,
46
+ output: process.stdout,
47
+ });
48
+
49
+ rl.on('line', line => {
50
+ inputStr = `${inputStr}${line}${EOL}`;
51
+
52
+ }).on('close', () => {
53
+ console.log(solution(inputStr));
54
+
55
+ process.exit(0);
56
+ });
57
+
58
+ function solution(inputStr) {
59
+ const input = inputStr
60
+ .trim()
61
+ .split(' ')
62
+ .map(val => Number(val));
63
+
64
+ const [a, b] = input;
65
+
66
+ return a + b;
67
+ }
68
+ ```
69
+
70
+ - 후<sup>After</sup>: 바나나 프레임워크를 이용한 문제 풀이.
71
+
72
+ ```js
73
+ function solution(input) {
74
+ const [a, b] = input
75
+ .trim()
76
+ .split(' ')
77
+ .map(Number);
78
+
79
+ console.log(a + b);
80
+ }
81
+
82
+ module.exports = solution;
83
+ ```
84
+
85
+ 와우!😲 놀랍지 않나요? 이제 여러분들은 단순해진 코드와 더불어 알고리즘 로직에만 집중할 수 있습니다.
86
+
87
+ 근데, 이게 전부냐고요? 물론 아닙니다!
88
+
89
+ - 백준 Node.js 환경에 구애받지 않는 ES2025 등 최신 문법의 사용
90
+ - 사용자 정의 모듈 및 `lodash` 등 외부 라이브러리의 사용
91
+ - ESLint 및 Prettier 자체 지원
92
+ - 풍부한 문서 및 커뮤니티 지원
93
+ - ...
94
+
95
+ 어떤가요? 바나나 프레임워크를 통해 더욱 편리한 문제 풀이를 경험해보고 싶지 않으신가요?🤔
96
+
97
+ ## 바나나로 시작하기
98
+
99
+ React의 `create-react-app`, Next.js의 `create-next-app` 처럼,
100
+
101
+ **바나나 프레임워크에서 제공하는 `create-bananass-app`으로 지금 바로 새로운 문제 풀이 패러다임을 경험해보세요!**
102
+
103
+ 바나나 프레임워크는 `create-bananass-app`을 통해 즉시 설치하고 사용할 수 있습니다! (사실 앱<sup>App</sup>은 아니지만, 그건 중요한게 아닙니다...🤔)
104
+
105
+ ```bash
106
+ npx create-bananass-app my-bananass-app --no-install
107
+ ```
108
+
109
+ 더욱 자세한 사용법은 [바나나 프레임워크 문서](https://bananass.lumir.page)를 참고해주세요.
110
+
111
+ ## 바나나 프레임워크 문서
112
+
113
+ > <https://bananass.lumir.page>
114
+
115
+ 바나나 프레임워크는 문서화를 가장 큰 가치로 여깁니다. 바나나 프레임워크의 모든 사용법과 기능은 [바나나 프레임워크 문서](https://bananass.lumir.page)에서 확인하실 수 있습니다.
116
+
117
+ ## 기여(이슈<sup>Issue</sup>, 끌어오기 요청<sup>Pull Request</sup>, 토론<sup>Discussion</sup>)
118
+
119
+ 바나나 프레임워크에 관심을 가져주셔서 감사합니다.🙇‍♂️ 저희는 여러분들의 소중한 시간을 바나나 프레임워크에 투자해주신 것에 대해 고마움을 가지고 있습니다.
120
+
121
+ 모든 버그<sup>Bug</sup> 및 제안<sup>Suggestion</sup> 등 여러 주제에 대한 이슈<sup>Issue</sup>, 끌어오기 요청<sup>Pull Request</sup> 및 토론<sup>Discussion</sup> 등을 환영합니다.
122
+
123
+ 다만, 올바른 커뮤니티 환경을 준수하고 더 나은 오픈소스를 만들기 위해, 바나나 프레임워크에 기여하기 전 반드시 아래 내용들을 확인해주세요.
124
+
125
+ - [기여자 행동 강령 규약](CODE_OF_CONDUCT.md)
126
+ - [기여하기](CONTRIBUTING.md)
127
+
128
+ ## 버전 정책<sup>Versioning</sup>
129
+
130
+ 바나나 프레임워크는 [유의적 버전 정책<sup>Sementic Versioning</sup>](https://semver.org/lang/ko/)을 따릅니다. 모든 릴리즈 버전은 `주(MAJOR).부(MINOR).수(PATCH)` 형식을 따릅니다.
131
+
132
+ ## 기여자 행동 강령 규약<sup>Code of Conduct</sup>
133
+
134
+ 커뮤니티에 기여하기 전, [기여자 행동 강령 규약](CODE_OF_CONDUCT.md)을 참고해주세요.
135
+
136
+ ## 변경 사항<sup>Change Log</sup>
137
+
138
+ 변경 사항에 대한 상세한 내용을 확인하려면, [변경 사항](CHANGELOG.md)을 참고해주세요.
139
+
140
+ ## 보안<sup>Security</sup>
141
+
142
+ 보안 문제를 발견하셨나요? [보안](SECURITY.md) 문서를 참고해주세요.
143
+
144
+ ## 라이센스<sup>License</sup>
145
+
146
+ 바나나 프레임워크는 MIT 라이센스를 따릅니다. [라이센스](LICENSE.md) 문서를 참고해주세요.
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "eslint-config-bananass",
3
+ "version": "0.0.0",
4
+ "description": "ESLint Config for Bananass Framework.🍌",
5
+ "exports": "./src/index.js",
6
+ "files": [
7
+ "src",
8
+ "LICENSE.md",
9
+ "README.md"
10
+ ],
11
+ "keywords": [
12
+ "bananass",
13
+ "baekjoon",
14
+ "framework",
15
+ "javascript",
16
+ "eslint",
17
+ "eslintconfig",
18
+ "eslint-config",
19
+ "config",
20
+ "flat",
21
+ "flat-config"
22
+ ],
23
+ "author": "루밀LuMir <rpfos@naver.com> (https://github.com/lumirlumir)",
24
+ "license": "MIT",
25
+ "homepage": "https://github.com/lumirlumir/npm-bananass",
26
+ "repository": {
27
+ "type": "github",
28
+ "url": "git+https://github.com/lumirlumir/npm-bananass.git",
29
+ "directory": "packages/eslint-config-bananass"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/lumirlumir/npm-bananass/issues"
33
+ },
34
+ "scripts": {
35
+ "prepublishOnly": "npm run build",
36
+ "build": "cp ../../LICENSE.md ../../README.md .",
37
+ "test": "node --test"
38
+ },
39
+ "peerDependencies": {
40
+ "eslint": "^9.0.0"
41
+ },
42
+ "dependencies": {
43
+ "@stylistic/eslint-plugin-js": "^2.12.1",
44
+ "eslint-plugin-import": "^2.31.0",
45
+ "eslint-plugin-n": "^17.15.1",
46
+ "globals": "^15.14.0"
47
+ }
48
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @fileoverview Configuration applied when a user configuration extends from `recommended`.
3
+ *
4
+ * - Values not explicitly defined on the object will use their default values.
5
+ * - Use the config inspector (`--inspect-config` in the CLI) to test which config objects apply to a specific file.
6
+ */
7
+
8
+ // --------------------------------------------------------------------------------
9
+ // Require
10
+ // --------------------------------------------------------------------------------
11
+
12
+ const { browser, builtin, es2025, node, jest, vitest, mocha } = require('globals');
13
+
14
+ const nodePlugin = require('eslint-plugin-n');
15
+ const importPlugin = require('eslint-plugin-import');
16
+ const stylisticJsPlugin = require('@stylistic/eslint-plugin-js');
17
+
18
+ const eslintLayoutFormatting = require('../rules/eslint-layout-formatting');
19
+ const eslintPossibleProblems = require('../rules/eslint-possible-problems');
20
+ const eslintSuggestions = require('../rules/eslint-suggestions');
21
+ const n = require('../rules/node');
22
+ const importHelpfulWarnings = require('../rules/import-helpful-warnings');
23
+ const importModuleSystems = require('../rules/import-module-systems');
24
+ const importStaticAnalysis = require('../rules/import-static-analysis');
25
+ const importStyleGuide = require('../rules/import-style-guide');
26
+ const stylisticJs = require('../rules/stylistic-js');
27
+
28
+ // --------------------------------------------------------------------------------
29
+ // Exports
30
+ // --------------------------------------------------------------------------------
31
+
32
+ module.exports = {
33
+ name: 'bananass/recommended',
34
+ languageOptions: {
35
+ globals: {
36
+ ...browser,
37
+ ...builtin,
38
+ ...es2025,
39
+ ...node,
40
+ ...jest,
41
+ ...vitest,
42
+ ...mocha,
43
+ },
44
+ },
45
+ plugins: {
46
+ n: nodePlugin,
47
+ import: importPlugin,
48
+ '@stylistic/js': stylisticJsPlugin,
49
+ },
50
+ rules: {
51
+ ...eslintLayoutFormatting,
52
+ ...eslintPossibleProblems,
53
+ ...eslintSuggestions,
54
+ ...n,
55
+ ...importHelpfulWarnings,
56
+ ...importModuleSystems,
57
+ ...importStaticAnalysis,
58
+ ...importStyleGuide,
59
+ ...stylisticJs,
60
+ },
61
+ };
package/src/index.js ADDED
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @fileoverview Entry file for the `eslint-config-bananass` package.
3
+ * @module eslint-config-bananass
4
+ */
5
+
6
+ // --------------------------------------------------------------------------------
7
+ // Require
8
+ // --------------------------------------------------------------------------------
9
+
10
+ const recommended = require('./configs/recommended');
11
+ const { name, version } = require('../package.json');
12
+
13
+ // --------------------------------------------------------------------------------
14
+ // Exports
15
+ // --------------------------------------------------------------------------------
16
+
17
+ module.exports = {
18
+ meta: {
19
+ name,
20
+ version,
21
+ },
22
+ configs: {
23
+ recommended,
24
+ },
25
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @fileoverview This file follows:
3
+ *
4
+ * - The order of the rules listed in the 'Layout & Formatting' section on eslint.org.
5
+ * - See, {@link https://eslint.org/docs/latest/rules#layout--formatting}.
6
+ *
7
+ * - The best practices outlined in `eslint-config-airbnb-base@19.0.4`.
8
+ * - See, {@link https://github.com/airbnb/javascript/tree/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules}.
9
+ */
10
+
11
+ // --------------------------------------------------------------------------------
12
+ // Exports
13
+ // --------------------------------------------------------------------------------
14
+
15
+ module.exports = {
16
+ /**
17
+ * Require or disallow Unicode byte order mark (BOM).
18
+ *
19
+ * @link eslint: {@link https://eslint.org/docs/latest/rules/unicode-bom}
20
+ * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L521}
21
+ */
22
+ 'unicode-bom': ['error', 'never'],
23
+ };