From b676fdc3dc0268e4fd29a66edf52237b276e025c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 2 Dec 2024 00:12:09 +0900 Subject: [PATCH 01/22] chore: delete `.gitkeep` and create `package.json` --- packages/eslint-config-bananass/.gitkeep | 0 packages/eslint-config-bananass/package.json | 36 ++++++++++++++++++++ 2 files changed, 36 insertions(+) delete mode 100644 packages/eslint-config-bananass/.gitkeep create mode 100644 packages/eslint-config-bananass/package.json diff --git a/packages/eslint-config-bananass/.gitkeep b/packages/eslint-config-bananass/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/packages/eslint-config-bananass/package.json b/packages/eslint-config-bananass/package.json new file mode 100644 index 0000000..0a26b66 --- /dev/null +++ b/packages/eslint-config-bananass/package.json @@ -0,0 +1,36 @@ +{ + "name": "eslint-config-bananass", + "version": "0.0.0", + "description": "ESLint config for Bananass framework.", + "exports": "./build/index.js", + "files": [ + "build", + "LICENSE.md", + "README.md" + ], + "keywords": [ + "eslint", + "eslintconfig", + "config", + "bananass", + "framework", + "javascript" + ], + "author": "루밀LuMir (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/eslint-config-bananass" + }, + "bugs": { + "url": "https://github.com/lumirlumir/npm-bananass/issues" + }, + "engines": { + "node": ">=18" + }, + "scripts": { + "test": "node --test" + } +} From a28ba00adf396def7564e0e13e5d778382ee98ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 2 Dec 2024 00:15:07 +0900 Subject: [PATCH 02/22] chore: update `package-lock.json` --- package-lock.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package-lock.json b/package-lock.json index 1203121..6b1771f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6165,6 +6165,10 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-config-bananass": { + "resolved": "packages/eslint-config-bananass", + "link": true + }, "node_modules/eslint-config-prettier": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", @@ -15948,6 +15952,13 @@ "packages/bananass": { "version": "0.0.0", "license": "MIT" + }, + "packages/eslint-config-bananass": { + "version": "0.0.0", + "license": "MIT", + "engines": { + "node": ">=18" + } } } } From 8d655635b937f389d40c438373f86d75c9ff7e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 2 Dec 2024 00:52:34 +0900 Subject: [PATCH 03/22] wip: create `eslint-possible-problems.js` --- .../src/rules/eslint-possible-problems.js | 488 ++++++++++++++++++ 1 file changed, 488 insertions(+) create mode 100644 packages/eslint-config-bananass/src/rules/eslint-possible-problems.js diff --git a/packages/eslint-config-bananass/src/rules/eslint-possible-problems.js b/packages/eslint-config-bananass/src/rules/eslint-possible-problems.js new file mode 100644 index 0000000..34d30bb --- /dev/null +++ b/packages/eslint-config-bananass/src/rules/eslint-possible-problems.js @@ -0,0 +1,488 @@ +/** + * This file follows: + * + * - The order of the rules listed in the 'Possible Problems' section on eslint.org. + * - See, {@link https://eslint.org/docs/latest/rules#possible-problems}. + * + * - The best practices outlined in `eslint-config-airbnb-base@19.0.4`. + * - See, {@link https://github.com/airbnb/javascript/tree/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules}. + */ +module.exports = { + /** + * Enforce `return` statements in callbacks of array methods. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/array-callback-return} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L9} + */ + 'array-callback-return': ['error', { allowImplicit: true }], + + /** + * Require `super()` calls in constructors. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/constructor-super} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L31} + */ + 'constructor-super': 'error', + + /** + * Enforce `for` loop update clause moving the counter in the right direction. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/for-direction} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L5} + */ + 'for-direction': 'error', + + /** + * Enforce return statements in getters. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/getter-return} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L9} + */ + 'getter-return': ['error', { allowImplicit: true }], + + /** + * Disallow using an async function as a Promise executor. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-async-promise-executor} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L13} + */ + 'no-async-promise-executor': 'error', + + /** + * Disallow `await` inside of loops. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-await-in-loop} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L17} + */ + 'no-await-in-loop': 'error', + + /** + * Disallow reassigning class members. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-class-assign} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L39} + */ + 'no-class-assign': 'error', + + /** + * Disallow comparing against `-0`. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-compare-neg-zero} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L21} + */ + 'no-compare-neg-zero': 'error', + + /** + * Disallow assignment operators in conditional expressions. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-cond-assign} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L24} + */ + 'no-cond-assign': ['error', 'always'], + + /** + * Disallow reassigning `const` variables. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-const-assign} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L48} + */ + 'no-const-assign': 'error', + + /** + * Disallow expressions where the operation doesn't affect the value. + * + * @description This option is not included in `airbnb-base`. + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-constant-binary-expression} + * @link airbnb-base: {@link } + */ + 'no-constant-binary-expression': 'error', + + /** + * Disallow constant expressions in conditions. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-constant-condition} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L30} + */ + 'no-constant-condition': 'warn', + + /** + * Disallow returning value from constructor. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-constructor-return} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L82} + */ + 'no-constructor-return': 'error', + + /** + * Disallow control characters in regular expressions. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-control-regex} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L33} + */ + 'no-control-regex': 'error', + + /** + * Disallow the use of debugger. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-debugger} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L36} + */ + 'no-debugger': 'error', + + /** + * Disallow duplicate arguments in function definitions. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-dupe-args} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L39} + */ + 'no-dupe-args': 'error', + + /** + * Disallow duplicate class members. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-dupe-class-members} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L52} + */ + 'no-dupe-class-members': 'error', + + /** + * Disallow duplicate conditions in if-else-if chains. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-dupe-else-if} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L43} + */ + 'no-dupe-else-if': 'error', + + /** + * Disallow duplicate keys in object literals. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-dupe-keys} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L46} + */ + 'no-dupe-keys': 'error', + + /** + * Disallow duplicate case labels. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-duplicate-case} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L49} + */ + 'no-duplicate-case': 'error', + + /** + * Disallow duplicate module imports. + * + * @description Replaced by [import/no-duplicates](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md). Note that it's `'off'`. + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-duplicate-imports} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L57} + */ + 'no-duplicate-imports': 'off', + + /** + * Disallow empty character classes in regular expressions. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-empty-character-class} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L55} + */ + 'no-empty-character-class': 'error', + + /** + * Disallow empty destructuring patterns. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-empty-pattern} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L104} + */ + 'no-empty-pattern': 'error', + + /** + * Disallow reassigning exceptions in `catch` clauses. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-ex-assign} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L58} + */ + 'no-ex-assign': 'error', + + /** + * Disallow fallthrough of `case` statements. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-fallthrough} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L128} + */ + 'no-fallthrough': 'error', + + /** + * Disallow reassigning `function` declarations. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-func-assign} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L78} + */ + 'no-func-assign': 'error', + + /** + * Disallow assigning to imported bindings. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-import-assign} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L81} + */ + 'no-import-assign': 'error', + + /** + * Disallow variable or `function` declarations in nested blocks. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-inner-declarations} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L84} + */ + 'no-inner-declarations': 'error', + + /** + * Disallow invalid regular expression strings in `RegExp` constructors. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-invalid-regexp} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L87} + */ + 'no-invalid-regexp': 'error', + + /** + * Disallow irregular whitespace. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-irregular-whitespace} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L90} + */ + 'no-irregular-whitespace': 'error', + + /** + * Disallow literal numbers that lose precision. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-loss-of-precision} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L94} + */ + 'no-loss-of-precision': 'error', + + /** + * Disallow characters which are made with multiple code points in character class syntax. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-misleading-character-class} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L98} + */ + 'no-misleading-character-class': 'error', + + /** + * Disallow `new` operators with global non-constructor functions. + * + * @description This option is not included in `airbnb-base`. + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-new-native-nonconstructor} + * @link airbnb-base: {@link } + */ + 'no-new-native-nonconstructor': 'error', + + /** + * Disallow calling global object properties as functions. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-obj-calls} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L101} + */ + 'no-obj-calls': 'error', + + /** + * Disallow returning values from Promise executor functions. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-promise-executor-return} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L105} + */ + 'no-promise-executor-return': 'error', + + /** + * Disallow calling some `Object.prototype` methods directly on objects. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-prototype-builtins} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L109} + */ + 'no-prototype-builtins': 'error', + + /** + * Disallow assignments where both sides are exactly the same. + * - `props` - if this is `true`, `no-self-assign` rule warns self-assignments of properties. Default is `true`. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-self-assign} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L307-L309} + */ + 'no-self-assign': 'error', + + /** + * Disallow comparisons where both sides are exactly the same. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-self-compare} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L313} + */ + 'no-self-compare': 'error', + + /** + * Disallow returning values from setters. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-setter-return} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L116} + */ + 'no-setter-return': 'error', + + /** + * Disallow sparse arrays. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-sparse-arrays} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L119} + */ + 'no-sparse-arrays': 'error', + + /** + * Disallow template literal placeholder syntax in regular strings. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-template-curly-in-string} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L123} + */ + 'no-template-curly-in-string': 'error', + + /** + * Disallow `this`/`super` before calling `super()` in constructors. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-this-before-super} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L81} + */ + 'no-this-before-super': 'error', + + /** + * Disallow the use of undeclared variables unless mentioned in global comments. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-undef} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L40} + */ + 'no-undef': 'error', + + /** + * Disallow confusing multiline expressions. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unexpected-multiline} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L127} + */ + 'no-unexpected-multiline': 'error', + + /** + * Disallow unmodified loop conditions. + * + * @description Note that it's `'off'`. + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unmodified-loop-condition} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L325} + */ + 'no-unmodified-loop-condition': 'off', + + /** + * Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unreachable} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L130} + */ + 'no-unreachable': 'error', + + /** + * Disallow loops with a body that allows only one iteration. + * - "ignore" - an optional array of loop types that will be ignored by this rule. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unreachable-loop} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L134-L136} + */ + 'no-unreachable-loop': 'error', + + /** + * Disallow control flow statements in `finally` blocks. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unsafe-finally} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L140} + */ + 'no-unsafe-finally': 'error', + + /** + * Disallow negating the left operand of relational operators. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unsafe-negation} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L144} + */ + 'no-unsafe-negation': 'error', + + /** + * Disallow use of optional chaining in contexts where the `undefined` value is not allowed. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L148} + */ + 'no-unsafe-optional-chaining': ['error', { disallowArithmeticOperators: true }], + + /** + * Disallow unused private class members. + * + * @description See `todo` comments in airbnb-base. original: `'off'`. + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unused-private-class-members} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L153} + */ + 'no-unused-private-class-members': 'error', + + /** + * Disallow unused variables. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unused-vars} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L51} + */ + 'no-unused-vars': [ + 'error', + { vars: 'all', args: 'after-used', ignoreRestSiblings: true }, + ], + + /** + * Disallow the use of variables before they are defined. + * + * @description I used the default value for this option, so its format is not same with `airbnb-base`. + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-use-before-define} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L54} + */ + 'no-use-before-define': 'error', + + /** + * Disallow variable assignments when the value is not used. + * + * @description This option is not included in `airbnb-base`. + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-assignment} + * @link airbnb-base: {@link } + */ + 'no-useless-assignment': 'error', + + /** + * Disallow useless backreferences in regular expressions. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-backreference} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L157} + */ + 'no-useless-backreference': 'error', + + /** + * Disallow assignments that can lead to race conditions due to usage of `await` or `yield`. + * + * @description Note that it's `'off'`. (`airbnb-base` says "not enabled because it is very buggy".) + * @link eslint: {@link https://eslint.org/docs/latest/rules/require-atomic-updates} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L166} + */ + 'require-atomic-updates': 'off', + + /** + * Require calls to `isNaN()` when checking for `NaN`. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/use-isnan} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L169} + */ + 'use-isnan': 'error', + + /** + * Enforce comparing typeof expressions against `valid` strings + * - `"requireStringLiterals"`: `true` allows the comparison of `typeof` expressions with only string literals or other `typeof` expressions, and disallows comparisons to any other value. Default is `false`. + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/valid-typeof} + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L177} + */ + 'valid-typeof': ['error', { requireStringLiterals: true }], +}; From a9df4b428b8bc653c1216ef6f31d2c4f7a6507e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 2 Dec 2024 01:01:47 +0900 Subject: [PATCH 04/22] wip: create `src/rules/index.js` --- packages/eslint-config-bananass/src/rules/index.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/eslint-config-bananass/src/rules/index.js diff --git a/packages/eslint-config-bananass/src/rules/index.js b/packages/eslint-config-bananass/src/rules/index.js new file mode 100644 index 0000000..cc5a573 --- /dev/null +++ b/packages/eslint-config-bananass/src/rules/index.js @@ -0,0 +1,5 @@ +const eslintPossibleProblems = require('./eslint-possible-problems'); + +module.exports = { + ...eslintPossibleProblems, +}; From 96a877db08cd10b57707f90973cd9700935d9066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 2 Dec 2024 01:14:19 +0900 Subject: [PATCH 05/22] wip: create `src/index.js` --- packages/eslint-config-bananass/src/index.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 packages/eslint-config-bananass/src/index.js diff --git a/packages/eslint-config-bananass/src/index.js b/packages/eslint-config-bananass/src/index.js new file mode 100644 index 0000000..aef143f --- /dev/null +++ b/packages/eslint-config-bananass/src/index.js @@ -0,0 +1,7 @@ +const rules = require('./rules'); + +module.exports = [ + { + rules, + }, +]; From c1c3474f294e72e50522c4c63879596c7e276830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 2 Dec 2024 19:42:44 +0900 Subject: [PATCH 06/22] wip: create `templates/jsdoc.md` --- .../eslint-config-bananass/templates/jsdoc.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 packages/eslint-config-bananass/templates/jsdoc.md diff --git a/packages/eslint-config-bananass/templates/jsdoc.md b/packages/eslint-config-bananass/templates/jsdoc.md new file mode 100644 index 0000000..f1183a7 --- /dev/null +++ b/packages/eslint-config-bananass/templates/jsdoc.md @@ -0,0 +1,25 @@ +# JSDoc Template + +Every file under `eslint-config-bananass/src/rules` directory, except `index.js`, should follow the format below. + +```javascript +/** + * This file follows: + * + * - The order of the rules listed in the 'XXX' section on XXX. + * - See, {@link link-to-the-website}. + * + * - The best practices outlined in `XXX`. + * - See, {@link link-to-the-website}. + */ +module.exports = { + /** + * Descriptions from the official documentation. + * + * @description Additional descriptions provided by the maintainers if needed. + * @link eslint: {@link link-to-the-website} + * @link airbnb-base: {@link link-to-the-website} + */ + 'rule-name': 'value', +}; +``` From 23046539f28693457e4aefba8f4e66ea47df3439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 2 Dec 2024 20:46:05 +0900 Subject: [PATCH 07/22] wip: create `eslint-layout-formatting.js` --- .../src/rules/eslint-layout-formatting.js | 18 ++++++++++++++++++ .../eslint-config-bananass/src/rules/index.js | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js diff --git a/packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js b/packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js new file mode 100644 index 0000000..5118fcd --- /dev/null +++ b/packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js @@ -0,0 +1,18 @@ +/** + * This file follows: + * + * - The order of the rules listed in the 'Layout & Formatting' section on eslint.org. + * - See, {@link https://eslint.org/docs/latest/rules#layout--formatting}. + * + * - The best practices outlined in `eslint-config-airbnb-base@19.0.4`. + * - See, {@link https://github.com/airbnb/javascript/tree/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules}. + */ +module.exports = { + /** + * Require or disallow Unicode byte order mark (BOM). + * + * @link eslint: {@link https://eslint.org/docs/latest/rules/unicode-bom} + * @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} + */ + 'unicode-bom': ['error', 'never'], +}; diff --git a/packages/eslint-config-bananass/src/rules/index.js b/packages/eslint-config-bananass/src/rules/index.js index cc5a573..f93d739 100644 --- a/packages/eslint-config-bananass/src/rules/index.js +++ b/packages/eslint-config-bananass/src/rules/index.js @@ -1,5 +1,7 @@ +const eslintLayoutFormatting = require('./eslint-layout-formatting'); const eslintPossibleProblems = require('./eslint-possible-problems'); module.exports = { + ...eslintLayoutFormatting, ...eslintPossibleProblems, }; From 6f49dcde7213745b02ed7bafacebcb529a284a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Tue, 3 Dec 2024 01:14:06 +0900 Subject: [PATCH 08/22] wip --- .../src/rules/eslint-suggestions.js | 1272 +++++++++++++++++ 1 file changed, 1272 insertions(+) create mode 100644 packages/eslint-config-bananass/src/rules/eslint-suggestions.js diff --git a/packages/eslint-config-bananass/src/rules/eslint-suggestions.js b/packages/eslint-config-bananass/src/rules/eslint-suggestions.js new file mode 100644 index 0000000..01a0b02 --- /dev/null +++ b/packages/eslint-config-bananass/src/rules/eslint-suggestions.js @@ -0,0 +1,1272 @@ +/** + * This file follows: + * + * - The order of the rules listed in the 'Suggestions' section on eslint.org. + * - See, {@link https://eslint.org/docs/latest/rules#suggestions}. + * + * - The best practices outlined in `eslint-config-airbnb-base@19.0.4`. + * - See, {@link https://github.com/airbnb/javascript/tree/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules}. + */ +module.exports = { + /** + * Enforce getter and setter pairs in objects and classes. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/accessor-pairs} + * @link airbnb-base: {@link } + */ + 'accessor-pairs': '', + + /** + * Require braces around arrow function bodies. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/arrow-body-style} + * @link airbnb-base: {@link } + */ + 'arrow-body-style': '', + + /** + * Enforce the use of variables within the scope they are defined. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/block-scoped-var} + * @link airbnb-base: {@link } + */ + 'block-scoped-var': '', + + /** + * Enforce camelcase naming convention. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/camelcase} + * @link airbnb-base: {@link } + */ + camelcase: '', + + /** + * Enforce or disallow capitalization of the first letter of a comment. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/capitalized-comments} + * @link airbnb-base: {@link } + */ + 'capitalized-comments': '', + + /** + * Enforce that class methods utilize `this`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/class-methods-use-this} + * @link airbnb-base: {@link } + */ + 'class-methods-use-this': '', + + /** + * Enforce a maximum cyclomatic complexity allowed in a program. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/complexity} + * @link airbnb-base: {@link } + */ + complexity: '', + + /** + * Require `return` statements to either always or never specify values. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/consistent-return} + * @link airbnb-base: {@link } + */ + 'consistent-return': '', + + /** + * Enforce consistent naming when capturing the current execution context. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/consistent-this} + * @link airbnb-base: {@link } + */ + 'consistent-this': '', + + /** + * Enforce consistent brace style for all control statements. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/curly} + * @link airbnb-base: {@link } + */ + curly: '', + + /** + * Require `default` cases in `switch` statements. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/default-case} + * @link airbnb-base: {@link } + */ + 'default-case': '', + + /** + * Enforce `default` clauses in switch statements to be last. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/default-case-last} + * @link airbnb-base: {@link } + */ + 'default-case-last': '', + + /** + * Enforce default parameters to be last. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/default-param-last} + * @link airbnb-base: {@link } + */ + 'default-param-last': '', + + /** + * Enforce dot notation whenever possible. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/dot-notation} + * @link airbnb-base: {@link } + */ + 'dot-notation': '', + + /** + * Require the use of `===` and `!==`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/eqeqeq} + * @link airbnb-base: {@link } + */ + eqeqeq: '', + + /** + * Require function names to match the name of the variable or property to which they are assigned. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/func-name-matching} + * @link airbnb-base: {@link } + */ + 'func-name-matching': '', + + /** + * Require or disallow named `function` expressions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/func-names} + * @link airbnb-base: {@link } + */ + 'func-names': '', + + /** + * Enforce the consistent use of either `function` declarations or expressions assigned to variables. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/func-style} + * @link airbnb-base: {@link } + */ + 'func-style': '', + + /** + * Require grouped accessor pairs in object literals and classes. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/grouped-accessor-pairs} + * @link airbnb-base: {@link } + */ + 'grouped-accessor-pairs': '', + + /** + * Require `for`-`in` loops to include an `if` statement. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/guard-for-in} + * @link airbnb-base: {@link } + */ + 'guard-for-in': '', + + /** + * Disallow specified identifiers. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/id-denylist} + * @link airbnb-base: {@link } + */ + 'id-denylist': '', + + /** + * Enforce minimum and maximum identifier lengths. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/id-length} + * @link airbnb-base: {@link } + */ + 'id-length': '', + + /** + * Require identifiers to match a specified regular expression. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/id-match} + * @link airbnb-base: {@link } + */ + 'id-match': '', + + /** + * Require or disallow initialization in variable declarations. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/init-declarations} + * @link airbnb-base: {@link } + */ + 'init-declarations': '', + + /** + * Require or disallow logical assignment operator shorthand. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/logical-assignment-operators} + * @link airbnb-base: {@link } + */ + 'logical-assignment-operators': '', + + /** + * Enforce a maximum number of classes per file. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/max-classes-per-file} + * @link airbnb-base: {@link } + */ + 'max-classes-per-file': '', + + /** + * Enforce a maximum depth that blocks can be nested. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/max-depth} + * @link airbnb-base: {@link } + */ + 'max-depth': '', + + /** + * Enforce a maximum number of lines per file. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/max-lines} + * @link airbnb-base: {@link } + */ + 'max-lines': '', + + /** + * Enforce a maximum number of lines of code in a function. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/max-lines-per-function} + * @link airbnb-base: {@link } + */ + 'max-lines-per-function': '', + + /** + * Enforce a maximum depth that callbacks can be nested. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/max-nested-callbacks} + * @link airbnb-base: {@link } + */ + 'max-nested-callbacks': '', + + /** + * Enforce a maximum number of parameters in function definitions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/max-params} + * @link airbnb-base: {@link } + */ + 'max-params': '', + + /** + * Enforce a maximum number of statements allowed in function blocks. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/max-statements} + * @link airbnb-base: {@link } + */ + 'max-statements': '', + + /** + * Require constructor names to begin with a capital letter. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/new-cap} + * @link airbnb-base: {@link } + */ + 'new-cap': '', + + /** + * Disallow the use of `alert`, `confirm`, and `prompt`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-alert} + * @link airbnb-base: {@link } + */ + 'no-alert': '', + + /** + * Disallow `Array` constructors. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-array-constructor} + * @link airbnb-base: {@link } + */ + 'no-array-constructor': '', + + /** + * Disallow bitwise operators. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-bitwise} + * @link airbnb-base: {@link } + * + * @todo Disable it on bananass. + */ + 'no-bitwise': '', + + /** + * Disallow the use of `arguments.caller` or `arguments.callee`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-caller} + * @link airbnb-base: {@link } + */ + 'no-caller': '', + + /** + * Disallow lexical declarations in `case` clauses. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-case-declarations} + * @link airbnb-base: {@link } + */ + 'no-case-declarations': '', + + /** + * Disallow the use of `console`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-console} + * @link airbnb-base: {@link } + * + * @todo Disable it on bananass. + */ + 'no-console': '', + + /** + * Disallow `continue` statements. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-continue} + * @link airbnb-base: {@link } + * + * @todo Disable it on bananass. + */ + 'no-continue': '', + + /** + * Disallow deleting variables. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-delete-var} + * @link airbnb-base: {@link } + */ + 'no-delete-var': '', + + /** + * Disallow equal signs explicitly at the beginning of regular expressions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-div-regex} + * @link airbnb-base: {@link } + */ + 'no-div-regex': '', + + /** + * Disallow `else` blocks after `return` statements in `if` statements. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-else-return} + * @link airbnb-base: {@link } + */ + 'no-else-return': '', + + /** + * Disallow empty block statements. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-empty} + * @link airbnb-base: {@link } + */ + 'no-empty': '', + + /** + * Disallow empty functions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-empty-function} + * @link airbnb-base: {@link } + */ + 'no-empty-function': '', + + /** + * Disallow empty `static` blocks. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-empty-static-block} + * @link airbnb-base: {@link } + */ + 'no-empty-static-block': '', + + /** + * Disallow `null` comparisons without type-checking operators. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-eq-null} + * @link airbnb-base: {@link } + */ + 'no-eq-null': '', + + /** + * Disallow the use of `eval()`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-eval} + * @link airbnb-base: {@link } + */ + 'no-eval': '', + + /** + * Disallow extending native types. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-extend-native} + * @link airbnb-base: {@link } + */ + 'no-extend-native': '', + + /** + * Disallow unnecessary calls to `.bind()`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-extra-bind} + * @link airbnb-base: {@link } + */ + 'no-extra-bind': '', + + /** + * Disallow unnecessary boolean casts. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-extra-boolean-cast} + * @link airbnb-base: {@link } + */ + 'no-extra-boolean-cast': '', + + /** + * Disallow unnecessary labels. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-extra-label} + * @link airbnb-base: {@link } + */ + 'no-extra-label': '', + + /** + * Disallow assignments to native objects or read-only global variables. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-global-assign} + * @link airbnb-base: {@link } + */ + 'no-global-assign': '', + + /** + * Disallow shorthand type conversions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-implicit-coercion} + * @link airbnb-base: {@link } + */ + 'no-implicit-coercion': '', + + /** + * Disallow declarations in the global scope. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-implicit-globals} + * @link airbnb-base: {@link } + */ + 'no-implicit-globals': '', + + /** + * Disallow the use of `eval()`-like methods. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-implied-eval} + * @link airbnb-base: {@link } + */ + 'no-implied-eval': '', + + /** + * Disallow inline comments after code. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-inline-comments} + * @link airbnb-base: {@link } + * + * @todo Disable it on bananass. + */ + 'no-inline-comments': '', + + /** + * Disallow use of `this` in contexts where the value of `this` is `undefined`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-invalid-this} + * @link airbnb-base: {@link } + */ + 'no-invalid-this': '', + + /** + * Disallow the use of the `__iterator__` property. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-iterator} + * @link airbnb-base: {@link } + */ + 'no-iterator': '', + + /** + * Disallow labels that share a name with a variable. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-label-var} + * @link airbnb-base: {@link } + */ + 'no-label-var': '', + + /** + * Disallow labeled statements. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-labels} + * @link airbnb-base: {@link } + */ + 'no-labels': '', + + /** + * Disallow unnecessary nested blocks. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-lone-blocks} + * @link airbnb-base: {@link } + */ + 'no-lone-blocks': '', + + /** + * Disallow `if` statements as the only statement in `else` blocks. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-lonely-if} + * @link airbnb-base: {@link } + */ + 'no-lonely-if': '', + + /** + * Disallow function declarations that contain unsafe references inside loop statements. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-loop-func} + * @link airbnb-base: {@link } + */ + 'no-loop-func': '', + + /** + * Disallow magic numbers. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-magic-numbers} + * @link airbnb-base: {@link } + */ + 'no-magic-numbers': '', + + /** + * Disallow use of chained assignment expressions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-multi-assign} + * @link airbnb-base: {@link } + * + * @todo Disable it on bananass. + */ + 'no-multi-assign': '', + + /** + * Disallow multiline strings. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-multi-str} + * @link airbnb-base: {@link } + */ + 'no-multi-str': '', + + /** + * Disallow negated conditions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-negated-condition} + * @link airbnb-base: {@link } + */ + 'no-negated-condition': '', + + /** + * Disallow nested ternary expressions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-nested-ternary} + * @link airbnb-base: {@link } + */ + 'no-nested-ternary': '', + + /** + * Disallow `new` operators outside of assignments or comparisons. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-new} + * @link airbnb-base: {@link } + */ + 'no-new': '', + + /** + * Disallow `new` operators with the `Function` object. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-new-func} + * @link airbnb-base: {@link } + */ + 'no-new-func': '', + + /** + * Disallow `new` operators with the `String`, `Number`, and `Boolean` objects. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-new-wrappers} + * @link airbnb-base: {@link } + */ + 'no-new-wrappers': '', + + /** + * Disallow `\8` and `\9` escape sequences in string literals. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape} + * @link airbnb-base: {@link } + */ + 'no-nonoctal-decimal-escape': '', + + /** + * Disallow calls to the `Object` constructor without an argument. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-object-constructor} + * @link airbnb-base: {@link } + */ + 'no-object-constructor': '', + + /** + * Disallow octal literals. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-octal} + * @link airbnb-base: {@link } + * + * @description Disable it on bananass. + */ + 'no-octal': '', + + /** + * Disallow octal escape sequences in string literals. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-octal-escape} + * @link airbnb-base: {@link } + */ + 'no-octal-escape': '', + + /** + * Disallow reassigning `function` parameters. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-param-reassign} + * @link airbnb-base: {@link } + */ + 'no-param-reassign': '', + + /** + * Disallow the unary operators `++` and `--`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-plusplus} + * @link airbnb-base: {@link } + * + * @description Disable it on bananass. + */ + 'no-plusplus': '', + + /** + * Disallow the use of the `__proto__` property. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-proto} + * @link airbnb-base: {@link } + */ + 'no-proto': '', + + /** + * Disallow variable redeclaration. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-redeclare} + * @link airbnb-base: {@link } + */ + 'no-redeclare': '', + + /** + * Disallow multiple spaces in regular expressions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-regex-spaces} + * @link airbnb-base: {@link } + */ + 'no-regex-spaces': '', + + /** + * Disallow specified names in exports. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-restricted-exports} + * @link airbnb-base: {@link } + */ + 'no-restricted-exports': '', + + /** + * Disallow specified global variables. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-restricted-globals} + * @link airbnb-base: {@link } + */ + 'no-restricted-globals': '', + + /** + * Disallow specified modules when loaded by import. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-restricted-imports} + * @link airbnb-base: {@link } + */ + 'no-restricted-imports': '', + + /** + * Disallow certain properties on certain objects. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-restricted-properties} + * @link airbnb-base: {@link } + */ + 'no-restricted-properties': '', + + /** + * Disallow specified syntax. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-restricted-syntax} + * @link airbnb-base: {@link } + */ + 'no-restricted-syntax': '', + + /** + * Disallow assignment operators in `return` statements. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-return-assign} + * @link airbnb-base: {@link } + */ + 'no-return-assign': '', + + /** + * Disallow `javascript:` URLs. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-script-url} + * @link airbnb-base: {@link } + */ + 'no-script-url': '', + + /** + * Disallow comma operators. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-sequences} + * @link airbnb-base: {@link } + */ + 'no-sequences': '', + + /** + * Disallow variable declarations from shadowing variables declared in the outer scope. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-shadow} + * @link airbnb-base: {@link } + */ + 'no-shadow': '', + + /** + * Disallow identifiers from shadowing restricted names. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-shadow-restricted-names} + * @link airbnb-base: {@link } + */ + 'no-shadow-restricted-names': '', + + /** + * Disallow ternary operators. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-ternary} + * @link airbnb-base: {@link } + * + * @todo Disable it on bananass. + */ + 'no-ternary': '', + + /** + * Disallow throwing literals as exceptions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-throw-literal} + * @link airbnb-base: {@link } + */ + 'no-throw-literal': '', + + /** + * Disallow initializing variables to `undefined`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-undef-init} + * @link airbnb-base: {@link } + */ + 'no-undef-init': '', + + /** + * Disallow the use of `undefined` as an identifier. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-undefined} + * @link airbnb-base: {@link } + */ + 'no-undefined': '', + + /** + * Disallow dangling underscores in identifiers. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-underscore-dangle} + * @link airbnb-base: {@link } + * + * @todo Disable it on bananass. + */ + 'no-underscore-dangle': '', + + /** + * Disallow ternary operators when simpler alternatives exist. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unneeded-ternary} + * @link airbnb-base: {@link } + */ + 'no-unneeded-ternary': '', + + /** + * Disallow unused expressions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unused-expressions} + * @link airbnb-base: {@link } + */ + 'no-unused-expressions': '', + + /** + * Disallow unused labels. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unused-labels} + * @link airbnb-base: {@link } + */ + 'no-unused-labels': '', + + /** + * Disallow unnecessary calls to `.call()` and `.apply()`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-call} + * @link airbnb-base: {@link } + */ + 'no-useless-call': '', + + /** + * Disallow unnecessary `catch` clauses. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-catch} + * @link airbnb-base: {@link } + */ + 'no-useless-catch': '', + + /** + * Disallow unnecessary computed property keys in objects and classes. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-computed-key} + * @link airbnb-base: {@link } + */ + 'no-useless-computed-key': '', + + /** + * Disallow unnecessary concatenation of literals or template literals. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-concat} + * @link airbnb-base: {@link } + */ + 'no-useless-concat': '', + + /** + * Disallow unnecessary constructors. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-constructor} + * @link airbnb-base: {@link } + */ + 'no-useless-constructor': '', + + /** + * Disallow unnecessary escape characters. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-escape} + * @link airbnb-base: {@link } + */ + 'no-useless-escape': '', + + /** + * Disallow renaming import, export, and destructured assignments to the same name. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-rename} + * @link airbnb-base: {@link } + */ + 'no-useless-rename': '', + + /** + * Disallow redundant return statements. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-return} + * @link airbnb-base: {@link } + */ + 'no-useless-return': '', + + /** + * Require `let` or `const` instead of `var`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-var} + * @link airbnb-base: {@link } + */ + 'no-var': '', + + /** + * Disallow `void` operators. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-void} + * @link airbnb-base: {@link } + */ + 'no-void': '', + + /** + * Disallow specified warning terms in comments. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-warning-comments} + * @link airbnb-base: {@link } + */ + 'no-warning-comments': '', + + /** + * Disallow `with` statements. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/no-with} + * @link airbnb-base: {@link } + */ + 'no-with': '', + + /** + * Require or disallow method and property shorthand syntax for object literals. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/object-shorthand} + * @link airbnb-base: {@link } + */ + 'object-shorthand': '', + + /** + * Enforce variables to be declared either together or separately in functions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/one-var} + * @link airbnb-base: {@link } + */ + 'one-var': '', + + /** + * Require or disallow assignment operator shorthand where possible. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/operator-assignment} + * @link airbnb-base: {@link } + * + * @todo consider to disable this option in bananass. + */ + 'operator-assignment': '', + + /** + * Require using arrow functions for callbacks. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-arrow-callback} + * @link airbnb-base: {@link } + */ + 'prefer-arrow-callback': '', + + /** + * Require `const` declarations for variables that are never reassigned after declared. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-const} + * @link airbnb-base: {@link } + */ + 'prefer-const': '', + + /** + * Require destructuring from arrays and/or objects. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-destructuring} + * @link airbnb-base: {@link } + */ + 'prefer-destructuring': '', + + /** + * Disallow the use of `Math.pow` in favor of the `**` operator. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-exponentiation-operator} + * @link airbnb-base: {@link } + */ + 'prefer-exponentiation-operator': '', + + /** + * Enforce using named capture group in regular expression. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-named-capture-group} + * @link airbnb-base: {@link } + */ + 'prefer-named-capture-group': '', + + /** + * Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-numeric-literals} + * @link airbnb-base: {@link } + */ + 'prefer-numeric-literals': '', + + /** + * Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-object-has-own} + * @link airbnb-base: {@link } + */ + 'prefer-object-has-own': '', + + /** + * Disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-object-spread} + * @link airbnb-base: {@link } + */ + 'prefer-object-spread': '', + + /** + * Require using `Error` objects as `Promise` rejection reasons. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-promise-reject-errors} + * @link airbnb-base: {@link } + */ + 'prefer-promise-reject-errors': '', + + /** + * Disallow use of the `RegExp` constructor in favor of regular expression literals. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-regex-literals} + * @link airbnb-base: {@link } + */ + 'prefer-regex-literals': '', + + /** + * Require rest parameters instead of `arguments`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-rest-params} + * @link airbnb-base: {@link } + */ + 'prefer-rest-params': '', + + /** + * Require spread operators instead of `.apply()`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-spread} + * @link airbnb-base: {@link } + */ + 'prefer-spread': '', + + /** + * Require template literals instead of string concatenation. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-template} + * @link airbnb-base: {@link } + */ + 'prefer-template': '', + + /** + * Enforce the consistent use of the radix argument when using `parseInt()`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/radix} + * @link airbnb-base: {@link } + */ + radix: '', + + /** + * Disallow async functions which have no `await` expression. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/require-await} + * @link airbnb-base: {@link } + */ + 'require-await': '', + + /** + * Enforce the use of `u` or `v` flag on `RegExp`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/require-unicode-regexp} + * @link airbnb-base: {@link } + */ + 'require-unicode-regexp': '', + + /** + * Require generator functions to contain `yield`. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/require-yield} + * @link airbnb-base: {@link } + */ + 'require-yield': '', + + /** + * Enforce sorted `import` declarations within modules. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/sort-imports} + * @link airbnb-base: {@link } + */ + 'sort-imports': '', + + /** + * Require object keys to be sorted. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/sort-keys} + * @link airbnb-base: {@link } + */ + 'sort-keys': '', + + /** + * Require variables within the same declaration block to be sorted. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/sort-vars} + * @link airbnb-base: {@link } + */ + 'sort-vars': '', + + /** + * Require or disallow strict mode directives. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/strict} + * @link airbnb-base: {@link } + */ + strict: '', + + /** + * Require symbol descriptions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/symbol-description} + * @link airbnb-base: {@link } + */ + 'symbol-description': '', + + /** + * Require `var` declarations be placed at the top of their containing scope. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/vars-on-top} + * @link airbnb-base: {@link } + */ + 'vars-on-top': '', + + /** + * Require or disallow "Yoda" conditions. + * + * @description + * @link eslint: {@link https://eslint.org/docs/latest/rules/yoda} + * @link airbnb-base: {@link } + */ + yoda: '', +}; From 01e490017a126717f8b5935d98b7607494c94442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sat, 7 Dec 2024 13:29:39 +0900 Subject: [PATCH 09/22] wip --- packages/eslint-config-bananass/src/rules/eslint-suggestions.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/eslint-config-bananass/src/rules/eslint-suggestions.js b/packages/eslint-config-bananass/src/rules/eslint-suggestions.js index 01a0b02..04139ab 100644 --- a/packages/eslint-config-bananass/src/rules/eslint-suggestions.js +++ b/packages/eslint-config-bananass/src/rules/eslint-suggestions.js @@ -95,6 +95,8 @@ module.exports = { * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/curly} * @link airbnb-base: {@link } + * + * @todo disable it on bananass. */ curly: '', From cfb02b0d2ac90c6b44bdec75962e624041ff1e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sat, 7 Dec 2024 20:04:59 +0900 Subject: [PATCH 10/22] wip --- packages/eslint-config-bananass/package.json | 4 ++++ packages/eslint-config-bananass/src/index.js | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/eslint-config-bananass/package.json b/packages/eslint-config-bananass/package.json index 0a26b66..f9f6429 100644 --- a/packages/eslint-config-bananass/package.json +++ b/packages/eslint-config-bananass/package.json @@ -11,6 +11,7 @@ "keywords": [ "eslint", "eslintconfig", + "eslint-config", "config", "bananass", "framework", @@ -32,5 +33,8 @@ }, "scripts": { "test": "node --test" + }, + "peerDependencies": { + "eslint": ">=9.16.0" } } diff --git a/packages/eslint-config-bananass/src/index.js b/packages/eslint-config-bananass/src/index.js index aef143f..6803ab1 100644 --- a/packages/eslint-config-bananass/src/index.js +++ b/packages/eslint-config-bananass/src/index.js @@ -2,6 +2,7 @@ const rules = require('./rules'); module.exports = [ { + // languageOptions: {}, rules, }, ]; From 638140fac4f0bd140457c352a29429f71203f330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sat, 7 Dec 2024 20:07:22 +0900 Subject: [PATCH 11/22] wip --- .../package.json | 2 +- .../src/index.js | 0 .../src/rules/eslint-layout-formatting.js | 0 .../src/rules/eslint-possible-problems.js | 0 .../src/rules/eslint-suggestions.js | 0 .../src/rules/index.js | 0 .../templates/jsdoc.md | 0 7 files changed, 1 insertion(+), 1 deletion(-) rename packages/{eslint-config-bananass => eslint-config-airbnb-base-flat}/package.json (95%) rename packages/{eslint-config-bananass => eslint-config-airbnb-base-flat}/src/index.js (100%) rename packages/{eslint-config-bananass => eslint-config-airbnb-base-flat}/src/rules/eslint-layout-formatting.js (100%) rename packages/{eslint-config-bananass => eslint-config-airbnb-base-flat}/src/rules/eslint-possible-problems.js (100%) rename packages/{eslint-config-bananass => eslint-config-airbnb-base-flat}/src/rules/eslint-suggestions.js (100%) rename packages/{eslint-config-bananass => eslint-config-airbnb-base-flat}/src/rules/index.js (100%) rename packages/{eslint-config-bananass => eslint-config-airbnb-base-flat}/templates/jsdoc.md (100%) diff --git a/packages/eslint-config-bananass/package.json b/packages/eslint-config-airbnb-base-flat/package.json similarity index 95% rename from packages/eslint-config-bananass/package.json rename to packages/eslint-config-airbnb-base-flat/package.json index f9f6429..dc51f24 100644 --- a/packages/eslint-config-bananass/package.json +++ b/packages/eslint-config-airbnb-base-flat/package.json @@ -1,5 +1,5 @@ { - "name": "eslint-config-bananass", + "name": "eslint-config-airbnb-base-flat", "version": "0.0.0", "description": "ESLint config for Bananass framework.", "exports": "./build/index.js", diff --git a/packages/eslint-config-bananass/src/index.js b/packages/eslint-config-airbnb-base-flat/src/index.js similarity index 100% rename from packages/eslint-config-bananass/src/index.js rename to packages/eslint-config-airbnb-base-flat/src/index.js diff --git a/packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js b/packages/eslint-config-airbnb-base-flat/src/rules/eslint-layout-formatting.js similarity index 100% rename from packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js rename to packages/eslint-config-airbnb-base-flat/src/rules/eslint-layout-formatting.js diff --git a/packages/eslint-config-bananass/src/rules/eslint-possible-problems.js b/packages/eslint-config-airbnb-base-flat/src/rules/eslint-possible-problems.js similarity index 100% rename from packages/eslint-config-bananass/src/rules/eslint-possible-problems.js rename to packages/eslint-config-airbnb-base-flat/src/rules/eslint-possible-problems.js diff --git a/packages/eslint-config-bananass/src/rules/eslint-suggestions.js b/packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js similarity index 100% rename from packages/eslint-config-bananass/src/rules/eslint-suggestions.js rename to packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js diff --git a/packages/eslint-config-bananass/src/rules/index.js b/packages/eslint-config-airbnb-base-flat/src/rules/index.js similarity index 100% rename from packages/eslint-config-bananass/src/rules/index.js rename to packages/eslint-config-airbnb-base-flat/src/rules/index.js diff --git a/packages/eslint-config-bananass/templates/jsdoc.md b/packages/eslint-config-airbnb-base-flat/templates/jsdoc.md similarity index 100% rename from packages/eslint-config-bananass/templates/jsdoc.md rename to packages/eslint-config-airbnb-base-flat/templates/jsdoc.md From 76eddad966f4192aee652d81c4b05d84a6bc45ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sat, 7 Dec 2024 20:17:23 +0900 Subject: [PATCH 12/22] wip: update `package.json` --- packages/eslint-config-airbnb-base-flat/package.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/eslint-config-airbnb-base-flat/package.json b/packages/eslint-config-airbnb-base-flat/package.json index dc51f24..c14e0c2 100644 --- a/packages/eslint-config-airbnb-base-flat/package.json +++ b/packages/eslint-config-airbnb-base-flat/package.json @@ -1,7 +1,7 @@ { "name": "eslint-config-airbnb-base-flat", "version": "0.0.0", - "description": "ESLint config for Bananass framework.", + "description": "ESLint config for airbnb base to support ESLint v9 flat config.", "exports": "./build/index.js", "files": [ "build", @@ -13,9 +13,13 @@ "eslintconfig", "eslint-config", "config", + "flat", + "flat-config", + "airbnb", + "styleguide", + "javascript", "bananass", - "framework", - "javascript" + "framework" ], "author": "루밀LuMir (https://github.com/lumirlumir)", "license": "MIT", @@ -23,7 +27,7 @@ "repository": { "type": "github", "url": "git+https://github.com/lumirlumir/npm-bananass.git", - "directory": "packages/eslint-config-bananass" + "directory": "packages/eslint-config-airbnb-base-flat" }, "bugs": { "url": "https://github.com/lumirlumir/npm-bananass/issues" From 12a5b5bb55ee78cd562bcc72df9fe5069483e214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sat, 7 Dec 2024 20:18:43 +0900 Subject: [PATCH 13/22] wip: update `jsdoc.md` --- packages/eslint-config-airbnb-base-flat/templates/jsdoc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config-airbnb-base-flat/templates/jsdoc.md b/packages/eslint-config-airbnb-base-flat/templates/jsdoc.md index f1183a7..22bbae1 100644 --- a/packages/eslint-config-airbnb-base-flat/templates/jsdoc.md +++ b/packages/eslint-config-airbnb-base-flat/templates/jsdoc.md @@ -1,6 +1,6 @@ # JSDoc Template -Every file under `eslint-config-bananass/src/rules` directory, except `index.js`, should follow the format below. +Every file under `eslint-config-airbnb-base-flat/src/rules` directory should follow the format below. ```javascript /** From 96a53b51358f417b4325d4461ceb1ad4bc1cb2d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sat, 7 Dec 2024 20:24:45 +0900 Subject: [PATCH 14/22] wip: update `index.js` --- packages/eslint-config-airbnb-base-flat/src/index.js | 10 ++++++++-- .../eslint-config-airbnb-base-flat/src/rules/index.js | 7 ------- 2 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 packages/eslint-config-airbnb-base-flat/src/rules/index.js diff --git a/packages/eslint-config-airbnb-base-flat/src/index.js b/packages/eslint-config-airbnb-base-flat/src/index.js index 6803ab1..9937b54 100644 --- a/packages/eslint-config-airbnb-base-flat/src/index.js +++ b/packages/eslint-config-airbnb-base-flat/src/index.js @@ -1,8 +1,14 @@ -const rules = require('./rules'); +const eslintLayoutFormatting = require('./rules/eslint-layout-formatting'); +const eslintPossibleProblems = require('./rules/eslint-possible-problems'); +const eslintSuggestions = require('./rules/eslint-suggestions'); module.exports = [ { // languageOptions: {}, - rules, + rules: { + ...eslintLayoutFormatting, + ...eslintPossibleProblems, + ...eslintSuggestions, + }, }, ]; diff --git a/packages/eslint-config-airbnb-base-flat/src/rules/index.js b/packages/eslint-config-airbnb-base-flat/src/rules/index.js deleted file mode 100644 index f93d739..0000000 --- a/packages/eslint-config-airbnb-base-flat/src/rules/index.js +++ /dev/null @@ -1,7 +0,0 @@ -const eslintLayoutFormatting = require('./eslint-layout-formatting'); -const eslintPossibleProblems = require('./eslint-possible-problems'); - -module.exports = { - ...eslintLayoutFormatting, - ...eslintPossibleProblems, -}; From c232b11cd3306c16983e625cb3e3ab71c2a8ec58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sat, 7 Dec 2024 21:16:30 +0900 Subject: [PATCH 15/22] wip --- .../src/rules/eslint-suggestions.js | 132 +++++++++++------- 1 file changed, 82 insertions(+), 50 deletions(-) diff --git a/packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js b/packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js index 04139ab..391f553 100644 --- a/packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js +++ b/packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js @@ -13,99 +13,131 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/accessor-pairs} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L5} */ - 'accessor-pairs': '', + 'accessor-pairs': 'off', /** * Require braces around arrow function bodies. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/arrow-body-style} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L18-L20} */ - 'arrow-body-style': '', + 'arrow-body-style': [ + 'error', + 'as-needed', + { + requireReturnForObjectLiteral: false, + }, + ], /** * Enforce the use of variables within the scope they are defined. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/block-scoped-var} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L13} */ - 'block-scoped-var': '', + 'block-scoped-var': 'error', /** * Enforce camelcase naming convention. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/camelcase} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L24} */ - camelcase: '', + camelcase: [ + 'error', + { + properties: 'never', + ignoreDestructuring: false, + }, + ], /** * Enforce or disallow capitalization of the first letter of a comment. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/capitalized-comments} - * @link airbnb-base: {@link } - */ - 'capitalized-comments': '', + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L28-L39} + */ + 'capitalized-comments': [ + 'off', + 'never', + { + line: { + ignorePattern: '.*', + ignoreInlineComments: true, + ignoreConsecutiveComments: true, + }, + block: { + ignorePattern: '.*', + ignoreInlineComments: true, + ignoreConsecutiveComments: true, + }, + }, + ], /** * Enforce that class methods utilize `this`. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/class-methods-use-this} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L21-L23} */ - 'class-methods-use-this': '', + 'class-methods-use-this': [ + 'error', + { + exceptMethods: [], + }, + ], /** * Enforce a maximum cyclomatic complexity allowed in a program. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/complexity} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L17} */ - complexity: '', + complexity: ['off', 20], /** * Require `return` statements to either always or never specify values. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/consistent-return} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L27} */ - 'consistent-return': '', + 'consistent-return': 'error', /** * Enforce consistent naming when capturing the current execution context. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/consistent-this} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L74} */ - 'consistent-this': '', + 'consistent-this': 'off', /** * Enforce consistent brace style for all control statements. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/curly} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L31} * * @todo disable it on bananass. */ - curly: '', + curly: ['error', 'multi-line'], /** * Require `default` cases in `switch` statements. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/default-case} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L35} */ 'default-case': '', @@ -114,7 +146,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/default-case-last} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L39} */ 'default-case-last': '', @@ -123,7 +155,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/default-param-last} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L42} */ 'default-param-last': '', @@ -132,7 +164,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/dot-notation} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L46} */ 'dot-notation': '', @@ -141,7 +173,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/eqeqeq} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L54} */ eqeqeq: '', @@ -150,7 +182,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/func-name-matching} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L89-L92} */ 'func-name-matching': '', @@ -159,7 +191,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/func-names} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L96} */ 'func-names': '', @@ -168,14 +200,14 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/func-style} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L101} */ 'func-style': '', /** * Require grouped accessor pairs in object literals and classes. * - * @description + * @description This rule is not included in airbnb-base. * @link eslint: {@link https://eslint.org/docs/latest/rules/grouped-accessor-pairs} * @link airbnb-base: {@link } */ @@ -186,7 +218,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/guard-for-in} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L62} */ 'guard-for-in': '', @@ -195,41 +227,41 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/id-denylist} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L109} */ - 'id-denylist': '', + 'id-denylist': 'off', /** * Enforce minimum and maximum identifier lengths. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/id-length} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L113} */ - 'id-length': '', + 'id-length': 'off', /** * Require identifiers to match a specified regular expression. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/id-match} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L116} */ - 'id-match': '', + 'id-match': 'off', /** * Require or disallow initialization in variable declarations. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/init-declarations} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L6} */ 'init-declarations': '', /** * Require or disallow logical assignment operator shorthand. * - * @description + * @description This rule is not included in `airbnb-base`. * @link eslint: {@link https://eslint.org/docs/latest/rules/logical-assignment-operators} * @link airbnb-base: {@link } */ @@ -240,7 +272,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/max-classes-per-file} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L66} */ 'max-classes-per-file': '', @@ -249,7 +281,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/max-depth} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L195} */ 'max-depth': '', @@ -258,7 +290,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/max-lines} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L209-L213} */ 'max-lines': '', @@ -267,7 +299,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/max-lines-per-function} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L217-L222} */ 'max-lines-per-function': '', @@ -276,7 +308,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/max-nested-callbacks} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L225} */ 'max-nested-callbacks': '', @@ -285,7 +317,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/max-params} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L228} */ 'max-params': '', @@ -294,7 +326,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/max-statements} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L231} */ 'max-statements': '', @@ -303,7 +335,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/new-cap} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L247-L252} */ 'new-cap': '', @@ -312,7 +344,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-alert} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L70} */ 'no-alert': '', @@ -321,7 +353,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-array-constructor} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L270} */ 'no-array-constructor': '', @@ -330,7 +362,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-bitwise} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L274} * * @todo Disable it on bananass. */ From ffcf980886bc7ff53bca0a8859549239c542064a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Sat, 7 Dec 2024 23:45:38 +0900 Subject: [PATCH 16/22] wip: update `eslint-suggestions.js` --- .../src/rules/eslint-suggestions.js | 184 +++++++++--------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js b/packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js index 391f553..9441813 100644 --- a/packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js +++ b/packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js @@ -373,7 +373,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-caller} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L74} */ 'no-caller': '', @@ -382,7 +382,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-case-declarations} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L78} */ 'no-case-declarations': '', @@ -391,7 +391,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-console} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L27} * * @todo Disable it on bananass. */ @@ -402,7 +402,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-continue} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L278} * * @todo Disable it on bananass. */ @@ -413,7 +413,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-delete-var} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L12} */ 'no-delete-var': '', @@ -422,7 +422,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-div-regex} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L86} */ 'no-div-regex': '', @@ -431,7 +431,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-else-return} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L90} */ 'no-else-return': '', @@ -440,7 +440,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-empty} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L52} */ 'no-empty': '', @@ -449,14 +449,14 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-empty-function} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L94-L100} */ 'no-empty-function': '', /** * Disallow empty `static` blocks. * - * @description + * @description This rule is not included in `airbnb-base` * @link eslint: {@link https://eslint.org/docs/latest/rules/no-empty-static-block} * @link airbnb-base: {@link } */ @@ -467,7 +467,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-eq-null} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L108} */ 'no-eq-null': '', @@ -476,7 +476,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-eval} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L112} */ 'no-eval': '', @@ -485,7 +485,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-extend-native} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L116} */ 'no-extend-native': '', @@ -494,7 +494,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-extra-bind} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L120} */ 'no-extra-bind': '', @@ -503,7 +503,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-extra-boolean-cast} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L62} */ 'no-extra-boolean-cast': '', @@ -512,7 +512,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-extra-label} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L124} */ 'no-extra-label': '', @@ -521,7 +521,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-global-assign} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L136} */ 'no-global-assign': '', @@ -530,7 +530,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-implicit-coercion} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L144-L149} */ 'no-implicit-coercion': '', @@ -539,7 +539,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-implicit-globals} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L153} */ 'no-implicit-globals': '', @@ -548,7 +548,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-implied-eval} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L157} */ 'no-implied-eval': '', @@ -557,7 +557,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-inline-comments} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L281} * * @todo Disable it on bananass. */ @@ -568,7 +568,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-invalid-this} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L161} */ 'no-invalid-this': '', @@ -577,7 +577,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-iterator} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L165} */ 'no-iterator': '', @@ -586,7 +586,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-label-var} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L16} */ 'no-label-var': '', @@ -595,7 +595,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-labels} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L169} */ 'no-labels': '', @@ -604,7 +604,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-lone-blocks} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L173} */ 'no-lone-blocks': '', @@ -613,7 +613,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-lonely-if} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L285} */ 'no-lonely-if': '', @@ -622,7 +622,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-loop-func} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L177} */ 'no-loop-func': '', @@ -631,7 +631,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-magic-numbers} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L181-L186} */ 'no-magic-numbers': '', @@ -640,7 +640,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-multi-assign} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L311} * * @todo Disable it on bananass. */ @@ -651,7 +651,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-multi-str} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L196} */ 'no-multi-str': '', @@ -660,7 +660,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-negated-condition} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L319} */ 'no-negated-condition': '', @@ -669,7 +669,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-nested-ternary} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L322} */ 'no-nested-ternary': '', @@ -678,63 +678,63 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-new} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L200} */ - 'no-new': '', + 'no-new': 'error', /** * Disallow `new` operators with the `Function` object. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-new-func} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L204} */ - 'no-new-func': '', + 'no-new-func': 'error', /** * Disallow `new` operators with the `String`, `Number`, and `Boolean` objects. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-new-wrappers} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L208} */ - 'no-new-wrappers': '', + 'no-new-wrappers': 'error', /** * Disallow `\8` and `\9` escape sequences in string literals. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L212} */ - 'no-nonoctal-decimal-escape': '', + 'no-nonoctal-decimal-escape': 'error', /** * Disallow calls to the `Object` constructor without an argument. * - * @description + * @description This rule is not included in `airbnb-base@19.0.4`. * @link eslint: {@link https://eslint.org/docs/latest/rules/no-object-constructor} * @link airbnb-base: {@link } */ - 'no-object-constructor': '', + 'no-object-constructor': 'off', /** * Disallow octal literals. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-octal} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L216} * * @description Disable it on bananass. */ - 'no-octal': '', + 'no-octal': 'error', /** * Disallow octal escape sequences in string literals. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-octal-escape} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L221} */ 'no-octal-escape': '', @@ -743,7 +743,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-param-reassign} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L226-L241} */ 'no-param-reassign': '', @@ -752,45 +752,45 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-plusplus} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L329} * * @description Disable it on bananass. */ - 'no-plusplus': '', + 'no-plusplus': 'error', /** * Disallow the use of the `__proto__` property. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-proto} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L245} */ - 'no-proto': '', + 'no-proto': 'error', /** * Disallow variable redeclaration. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-redeclare} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L249} */ - 'no-redeclare': '', + 'no-redeclare': 'error', /** * Disallow multiple spaces in regular expressions. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-regex-spaces} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L112} */ - 'no-regex-spaces': '', + 'no-regex-spaces': 'error', /** * Disallow specified names in exports. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-restricted-exports} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L65-L70} */ 'no-restricted-exports': '', @@ -799,7 +799,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-restricted-globals} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L19-L31} */ 'no-restricted-globals': '', @@ -808,7 +808,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-restricted-imports} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L74-L77} */ 'no-restricted-imports': '', @@ -817,7 +817,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-restricted-properties} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L253-L291} */ 'no-restricted-properties': '', @@ -826,7 +826,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-restricted-syntax} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L333-L351} */ 'no-restricted-syntax': '', @@ -835,7 +835,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-return-assign} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L295} */ 'no-return-assign': '', @@ -844,72 +844,72 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-script-url} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L303} */ - 'no-script-url': '', + 'no-script-url': 'error', /** * Disallow comma operators. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-sequences} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L317} */ - 'no-sequences': '', + 'no-sequences': 'error', /** * Disallow variable declarations from shadowing variables declared in the outer scope. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-shadow} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L34} */ - 'no-shadow': '', + 'no-shadow': 'error', /** * Disallow identifiers from shadowing restricted names. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-shadow-restricted-names} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L37} */ - 'no-shadow-restricted-names': '', + 'no-shadow-restricted-names': 'error', /** * Disallow ternary operators. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-ternary} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L360} * * @todo Disable it on bananass. */ - 'no-ternary': '', + 'no-ternary': 'off', /** * Disallow throwing literals as exceptions. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-throw-literal} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L321} */ - 'no-throw-literal': '', + 'no-throw-literal': 'error', /** * Disallow initializing variables to `undefined`. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-undef-init} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L43} */ - 'no-undef-init': '', + 'no-undef-init': 'error', /** * Disallow the use of `undefined` as an identifier. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-undefined} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L48} */ 'no-undefined': '', @@ -918,7 +918,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-underscore-dangle} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L370-L375} * * @todo Disable it on bananass. */ @@ -929,7 +929,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unneeded-ternary} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L380} */ 'no-unneeded-ternary': '', @@ -938,7 +938,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unused-expressions} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L329-L333} */ 'no-unused-expressions': '', @@ -947,16 +947,16 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-unused-labels} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L337} */ - 'no-unused-labels': '', + 'no-unused-labels': 'error', /** * Disallow unnecessary calls to `.call()` and `.apply()`. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-call} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L341} */ 'no-useless-call': '', @@ -965,45 +965,45 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-catch} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L345} */ - 'no-useless-catch': '', + 'no-useless-catch': 'error', /** * Disallow unnecessary computed property keys in objects and classes. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-computed-key} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L85} */ - 'no-useless-computed-key': '', + 'no-useless-computed-key': 'error', /** * Disallow unnecessary concatenation of literals or template literals. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-concat} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L349} */ - 'no-useless-concat': '', + 'no-useless-concat': 'error', /** * Disallow unnecessary constructors. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-constructor} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L89} */ - 'no-useless-constructor': '', + 'no-useless-constructor': 'error', /** * Disallow unnecessary escape characters. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-escape} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L353} */ - 'no-useless-escape': '', + 'no-useless-escape': 'error', /** * Disallow renaming import, export, and destructured assignments to the same name. From 4ee9c4687b32e6ca8f9dfa0b27eb17dc862a3d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Tue, 24 Dec 2024 18:58:03 +0900 Subject: [PATCH 17/22] chore: update ESLint config package and dependencies --- package-lock.json | 15 +++++++++++---- .../eslint-config-airbnb-base-flat/package.json | 6 ++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2140bd..69a31af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6434,6 +6434,10 @@ "eslint-plugin-import": "^2.25.2" } }, + "node_modules/eslint-config-airbnb-base-flat": { + "resolved": "packages/eslint-config-airbnb-base-flat", + "link": true + }, "node_modules/eslint-config-airbnb-base/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -6444,10 +6448,6 @@ "semver": "bin/semver.js" } }, - "node_modules/eslint-config-bananass": { - "resolved": "packages/eslint-config-bananass", - "link": true - }, "node_modules/eslint-config-prettier": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", @@ -15921,6 +15921,13 @@ "node": ">=18" } }, + "packages/eslint-config-airbnb-base-flat": { + "version": "0.0.0", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "website": { "version": "0.0.0" } diff --git a/packages/eslint-config-airbnb-base-flat/package.json b/packages/eslint-config-airbnb-base-flat/package.json index c14e0c2..c4b89a1 100644 --- a/packages/eslint-config-airbnb-base-flat/package.json +++ b/packages/eslint-config-airbnb-base-flat/package.json @@ -33,12 +33,10 @@ "url": "https://github.com/lumirlumir/npm-bananass/issues" }, "engines": { - "node": ">=18" + "node": ">=20.18.0" }, "scripts": { "test": "node --test" }, - "peerDependencies": { - "eslint": ">=9.16.0" - } + "peerDependencies": {} } From d1649086f1372620cf9782ee5312b97de762ea7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Tue, 24 Dec 2024 19:02:39 +0900 Subject: [PATCH 18/22] refactor: rename eslint config package and update paths --- .../package.json | 4 ++-- .../src/index.js | 0 .../src/rules/eslint-layout-formatting.js | 0 .../src/rules/eslint-possible-problems.js | 0 .../src/rules/eslint-suggestions.js | 0 .../templates/jsdoc.md | 2 +- 6 files changed, 3 insertions(+), 3 deletions(-) rename packages/{eslint-config-airbnb-base-flat => eslint-config-bananass}/package.json (89%) rename packages/{eslint-config-airbnb-base-flat => eslint-config-bananass}/src/index.js (100%) rename packages/{eslint-config-airbnb-base-flat => eslint-config-bananass}/src/rules/eslint-layout-formatting.js (100%) rename packages/{eslint-config-airbnb-base-flat => eslint-config-bananass}/src/rules/eslint-possible-problems.js (100%) rename packages/{eslint-config-airbnb-base-flat => eslint-config-bananass}/src/rules/eslint-suggestions.js (100%) rename packages/{eslint-config-airbnb-base-flat => eslint-config-bananass}/templates/jsdoc.md (84%) diff --git a/packages/eslint-config-airbnb-base-flat/package.json b/packages/eslint-config-bananass/package.json similarity index 89% rename from packages/eslint-config-airbnb-base-flat/package.json rename to packages/eslint-config-bananass/package.json index c4b89a1..88f77aa 100644 --- a/packages/eslint-config-airbnb-base-flat/package.json +++ b/packages/eslint-config-bananass/package.json @@ -1,5 +1,5 @@ { - "name": "eslint-config-airbnb-base-flat", + "name": "eslint-config-bananass", "version": "0.0.0", "description": "ESLint config for airbnb base to support ESLint v9 flat config.", "exports": "./build/index.js", @@ -27,7 +27,7 @@ "repository": { "type": "github", "url": "git+https://github.com/lumirlumir/npm-bananass.git", - "directory": "packages/eslint-config-airbnb-base-flat" + "directory": "packages/eslint-config-bananass" }, "bugs": { "url": "https://github.com/lumirlumir/npm-bananass/issues" diff --git a/packages/eslint-config-airbnb-base-flat/src/index.js b/packages/eslint-config-bananass/src/index.js similarity index 100% rename from packages/eslint-config-airbnb-base-flat/src/index.js rename to packages/eslint-config-bananass/src/index.js diff --git a/packages/eslint-config-airbnb-base-flat/src/rules/eslint-layout-formatting.js b/packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js similarity index 100% rename from packages/eslint-config-airbnb-base-flat/src/rules/eslint-layout-formatting.js rename to packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js diff --git a/packages/eslint-config-airbnb-base-flat/src/rules/eslint-possible-problems.js b/packages/eslint-config-bananass/src/rules/eslint-possible-problems.js similarity index 100% rename from packages/eslint-config-airbnb-base-flat/src/rules/eslint-possible-problems.js rename to packages/eslint-config-bananass/src/rules/eslint-possible-problems.js diff --git a/packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js b/packages/eslint-config-bananass/src/rules/eslint-suggestions.js similarity index 100% rename from packages/eslint-config-airbnb-base-flat/src/rules/eslint-suggestions.js rename to packages/eslint-config-bananass/src/rules/eslint-suggestions.js diff --git a/packages/eslint-config-airbnb-base-flat/templates/jsdoc.md b/packages/eslint-config-bananass/templates/jsdoc.md similarity index 84% rename from packages/eslint-config-airbnb-base-flat/templates/jsdoc.md rename to packages/eslint-config-bananass/templates/jsdoc.md index 22bbae1..737f691 100644 --- a/packages/eslint-config-airbnb-base-flat/templates/jsdoc.md +++ b/packages/eslint-config-bananass/templates/jsdoc.md @@ -1,6 +1,6 @@ # JSDoc Template -Every file under `eslint-config-airbnb-base-flat/src/rules` directory should follow the format below. +Every file under `eslint-config-bananass/src/rules` directory should follow the format below. ```javascript /** From 4923144d7d8bf3e3be0b6094190bdf4a995ef52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Tue, 24 Dec 2024 19:10:16 +0900 Subject: [PATCH 19/22] wip: update `package.json` --- package-lock.json | 16 ++++++++++++---- packages/eslint-config-bananass/package.json | 17 ++++++++--------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 69a31af..4a7e02d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6434,10 +6434,6 @@ "eslint-plugin-import": "^2.25.2" } }, - "node_modules/eslint-config-airbnb-base-flat": { - "resolved": "packages/eslint-config-airbnb-base-flat", - "link": true - }, "node_modules/eslint-config-airbnb-base/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -6448,6 +6444,10 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-config-bananass": { + "resolved": "packages/eslint-config-bananass", + "link": true + }, "node_modules/eslint-config-prettier": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", @@ -15923,11 +15923,19 @@ }, "packages/eslint-config-airbnb-base-flat": { "version": "0.0.0", + "extraneous": true, "license": "MIT", "engines": { "node": ">=18" } }, + "packages/eslint-config-bananass": { + "version": "0.0.0", + "license": "MIT", + "engines": { + "node": ">=20.18.0" + } + }, "website": { "version": "0.0.0" } diff --git a/packages/eslint-config-bananass/package.json b/packages/eslint-config-bananass/package.json index 88f77aa..3e2020d 100644 --- a/packages/eslint-config-bananass/package.json +++ b/packages/eslint-config-bananass/package.json @@ -1,25 +1,24 @@ { "name": "eslint-config-bananass", "version": "0.0.0", - "description": "ESLint config for airbnb base to support ESLint v9 flat config.", - "exports": "./build/index.js", + "description": "ESLint Config for Bananass Framework.🍌", + "exports": "./src/index.js", "files": [ - "build", + "src", "LICENSE.md", "README.md" ], "keywords": [ + "bananass", + "baekjoon", + "framework", + "javascript", "eslint", "eslintconfig", "eslint-config", "config", "flat", - "flat-config", - "airbnb", - "styleguide", - "javascript", - "bananass", - "framework" + "flat-config" ], "author": "루밀LuMir (https://github.com/lumirlumir)", "license": "MIT", From 911ca910271ece9a386ca36f190eb919a4502158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Tue, 24 Dec 2024 19:11:26 +0900 Subject: [PATCH 20/22] docs: update code block syntax from `javascript` to `js` --- packages/eslint-config-bananass/templates/jsdoc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config-bananass/templates/jsdoc.md b/packages/eslint-config-bananass/templates/jsdoc.md index 737f691..0b05e49 100644 --- a/packages/eslint-config-bananass/templates/jsdoc.md +++ b/packages/eslint-config-bananass/templates/jsdoc.md @@ -2,7 +2,7 @@ Every file under `eslint-config-bananass/src/rules` directory should follow the format below. -```javascript +```js /** * This file follows: * From b80a9f9d88a33a9f41ff8b8a51a2c0a25a9e6a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Tue, 24 Dec 2024 19:17:24 +0900 Subject: [PATCH 21/22] refactor: update JSDoc comments to use `@fileoverview` and add `exports` section --- .../src/rules/eslint-layout-formatting.js | 7 ++++++- .../src/rules/eslint-possible-problems.js | 7 ++++++- .../eslint-config-bananass/src/rules/eslint-suggestions.js | 7 ++++++- packages/eslint-config-bananass/templates/jsdoc.md | 7 ++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js b/packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js index 5118fcd..5699bad 100644 --- a/packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js +++ b/packages/eslint-config-bananass/src/rules/eslint-layout-formatting.js @@ -1,5 +1,5 @@ /** - * This file follows: + * @fileoverview This file follows: * * - The order of the rules listed in the 'Layout & Formatting' section on eslint.org. * - See, {@link https://eslint.org/docs/latest/rules#layout--formatting}. @@ -7,6 +7,11 @@ * - The best practices outlined in `eslint-config-airbnb-base@19.0.4`. * - See, {@link https://github.com/airbnb/javascript/tree/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules}. */ + +// -------------------------------------------------------------------------------- +// Exports +// -------------------------------------------------------------------------------- + module.exports = { /** * Require or disallow Unicode byte order mark (BOM). diff --git a/packages/eslint-config-bananass/src/rules/eslint-possible-problems.js b/packages/eslint-config-bananass/src/rules/eslint-possible-problems.js index 34d30bb..75cbf70 100644 --- a/packages/eslint-config-bananass/src/rules/eslint-possible-problems.js +++ b/packages/eslint-config-bananass/src/rules/eslint-possible-problems.js @@ -1,5 +1,5 @@ /** - * This file follows: + * @fileoverview This file follows: * * - The order of the rules listed in the 'Possible Problems' section on eslint.org. * - See, {@link https://eslint.org/docs/latest/rules#possible-problems}. @@ -7,6 +7,11 @@ * - The best practices outlined in `eslint-config-airbnb-base@19.0.4`. * - See, {@link https://github.com/airbnb/javascript/tree/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules}. */ + +// -------------------------------------------------------------------------------- +// Exports +// -------------------------------------------------------------------------------- + module.exports = { /** * Enforce `return` statements in callbacks of array methods. diff --git a/packages/eslint-config-bananass/src/rules/eslint-suggestions.js b/packages/eslint-config-bananass/src/rules/eslint-suggestions.js index 9441813..950991d 100644 --- a/packages/eslint-config-bananass/src/rules/eslint-suggestions.js +++ b/packages/eslint-config-bananass/src/rules/eslint-suggestions.js @@ -1,5 +1,5 @@ /** - * This file follows: + * @fileoverview This file follows: * * - The order of the rules listed in the 'Suggestions' section on eslint.org. * - See, {@link https://eslint.org/docs/latest/rules#suggestions}. @@ -7,6 +7,11 @@ * - The best practices outlined in `eslint-config-airbnb-base@19.0.4`. * - See, {@link https://github.com/airbnb/javascript/tree/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules}. */ + +// -------------------------------------------------------------------------------- +// Exports +// -------------------------------------------------------------------------------- + module.exports = { /** * Enforce getter and setter pairs in objects and classes. diff --git a/packages/eslint-config-bananass/templates/jsdoc.md b/packages/eslint-config-bananass/templates/jsdoc.md index 0b05e49..4f06eba 100644 --- a/packages/eslint-config-bananass/templates/jsdoc.md +++ b/packages/eslint-config-bananass/templates/jsdoc.md @@ -4,7 +4,7 @@ Every file under `eslint-config-bananass/src/rules` directory should follow the ```js /** - * This file follows: + * @fileoverview This file follows: * * - The order of the rules listed in the 'XXX' section on XXX. * - See, {@link link-to-the-website}. @@ -12,6 +12,11 @@ Every file under `eslint-config-bananass/src/rules` directory should follow the * - The best practices outlined in `XXX`. * - See, {@link link-to-the-website}. */ + +// -------------------------------------------------------------------------------- +// Exports +// -------------------------------------------------------------------------------- + module.exports = { /** * Descriptions from the official documentation. From 81662df88dde36ef9714fa1158c7afff84c635d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Tue, 24 Dec 2024 21:40:20 +0900 Subject: [PATCH 22/22] wip: update airbnb-base link comments --- .../src/rules/eslint-suggestions.js | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/packages/eslint-config-bananass/src/rules/eslint-suggestions.js b/packages/eslint-config-bananass/src/rules/eslint-suggestions.js index 950991d..045ec97 100644 --- a/packages/eslint-config-bananass/src/rules/eslint-suggestions.js +++ b/packages/eslint-config-bananass/src/rules/eslint-suggestions.js @@ -1015,7 +1015,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-rename} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L93-L97} */ 'no-useless-rename': '', @@ -1024,34 +1024,34 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-useless-return} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L357} */ - 'no-useless-return': '', + 'no-useless-return': 'error', /** * Require `let` or `const` instead of `var`. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-var} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L100} */ - 'no-var': '', + 'no-var': 'error', /** * Disallow `void` operators. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-void} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L361} */ - 'no-void': '', + 'no-void': 'error', /** * Disallow specified warning terms in comments. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-warning-comments} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L365} */ 'no-warning-comments': '', @@ -1060,16 +1060,16 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/no-with} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L369} */ - 'no-with': '', + 'no-with': 'error', /** * Require or disallow method and property shorthand syntax for object literals. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/object-shorthand} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L104-L107} */ 'object-shorthand': '', @@ -1078,7 +1078,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/one-var} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L409} */ 'one-var': '', @@ -1087,7 +1087,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/operator-assignment} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L417} * * @todo consider to disable this option in bananass. */ @@ -1098,7 +1098,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-arrow-callback} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L110-L113} */ 'prefer-arrow-callback': '', @@ -1107,7 +1107,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-const} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L116-L119} */ 'prefer-const': '', @@ -1116,7 +1116,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-destructuring} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L123-L134} */ 'prefer-destructuring': '', @@ -1125,16 +1125,16 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-exponentiation-operator} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L438} */ - 'prefer-exponentiation-operator': '', + 'prefer-exponentiation-operator': 'error', /** * Enforce using named capture group in regular expression. * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-named-capture-group} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L377} */ 'prefer-named-capture-group': '', @@ -1143,7 +1143,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-numeric-literals} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L138} */ 'prefer-numeric-literals': '', @@ -1152,7 +1152,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-object-has-own} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L382} */ 'prefer-object-has-own': '', @@ -1161,7 +1161,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-object-spread} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L442} */ 'prefer-object-spread': '', @@ -1170,7 +1170,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-promise-reject-errors} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L373} */ 'prefer-promise-reject-errors': '', @@ -1179,7 +1179,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-regex-literals} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L385-L387} */ 'prefer-regex-literals': '', @@ -1188,7 +1188,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-rest-params} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L146} */ 'prefer-rest-params': '', @@ -1197,7 +1197,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-spread} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L150} */ 'prefer-spread': '', @@ -1206,7 +1206,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/prefer-template} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L154} */ 'prefer-template': '', @@ -1215,7 +1215,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/radix} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L391} */ radix: '', @@ -1224,7 +1224,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/require-await} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L395} */ 'require-await': '', @@ -1233,7 +1233,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/require-unicode-regexp} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L399} */ 'require-unicode-regexp': '', @@ -1242,7 +1242,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/require-yield} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L158} */ 'require-yield': '', @@ -1251,7 +1251,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/sort-imports} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L166-L171} */ 'sort-imports': '', @@ -1260,7 +1260,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/sort-keys} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L466} */ 'sort-keys': '', @@ -1269,7 +1269,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/sort-vars} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L469} */ 'sort-vars': '', @@ -1278,7 +1278,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/strict} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/strict.js#L4} */ strict: '', @@ -1287,7 +1287,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/symbol-description} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L175} */ 'symbol-description': '', @@ -1296,7 +1296,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/vars-on-top} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L403} */ 'vars-on-top': '', @@ -1305,7 +1305,7 @@ module.exports = { * * @description * @link eslint: {@link https://eslint.org/docs/latest/rules/yoda} - * @link airbnb-base: {@link } + * @link airbnb-base: {@link https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/best-practices.js#L411} */ yoda: '', };