From 7bdbf08d86fe102e946a66c5c2c28bc23495d351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D1=8F=CE=B1voro=CE=B7=CE=B1?= Date: Sun, 7 Apr 2024 17:33:22 +0200 Subject: [PATCH 1/2] feature: Improve export --- README.md | 4 ++-- eslint.config.js | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b6eea7e..831f16d 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,10 @@ npm i --save-dev \ Set the shared configurations inside your [ESLint configuration](https://eslint.org/docs/user-guide/configuring) ```js -import config from '@ravorona/eslint' +import { configs } from '@ravorona/eslint' export default [ - config, + configs.all, { rules: { "no-unused-vars": "warn" diff --git a/eslint.config.js b/eslint.config.js index 1020954..25d0f48 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import js from '@eslint/js' +import { configs } from '@eslint/js' -const rules = { +const jsRules = { 'block-spacing': [ 'error', 'always' ], 'camelcase': [ 'error', { 'properties': 'never' } ], 'constructor-super': 'error', @@ -98,8 +98,8 @@ const rules = { 'yoda': [ 'error', 'never' ] } -const config = [ - js.configs.recommended, +const jsConfig = [ + configs.recommended, { ignores: [ 'node_modules', @@ -118,9 +118,14 @@ const config = [ linterOptions: { reportUnusedDisableDirectives: 'warn' }, - rules + jsRules } ] -export { rules } -export default config +export { jsRules } + +export default { + configs: { + all: jsConfig + } +} From 27e5047deff13acf918b1ce1363d5e49af89ad18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D1=8F=CE=B1voro=CE=B7=CE=B1?= Date: Sun, 7 Apr 2024 17:34:23 +0200 Subject: [PATCH 2/2] chore: Bumped --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96bac95..3068b02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [4.3.0](https://github.com/ravorona/eslint-config/compare/4.2.2...4.3.0) (2024-04-07) + + +### Features + +* Create rules export ([6e9b85e](https://github.com/ravorona/eslint-config/commit/6e9b85e114062f76926f6e8638dea88756e5aed8)) +* Improve export ([7bdbf08](https://github.com/ravorona/eslint-config/commit/7bdbf08d86fe102e946a66c5c2c28bc23495d351)) + ## [4.2.3](https://github.com/ravorona/eslint-config/compare/4.2.2...4.2.3) (2024-04-07) diff --git a/package.json b/package.json index a08710e..209d269 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ravorona/eslint-config", - "version": "4.2.3", + "version": "4.3.0", "description": "ESLint configuration", "main": "eslint.config.js", "repository": "git@github.com:ravorona/eslint-config.git",