From 14d7cfb06242fe63506725a3a052733d282b0c03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 00:17:39 +0000 Subject: [PATCH 1/2] Bump eslint-config-airbnb-base from 12.1.0 to 15.0.0 Bumps [eslint-config-airbnb-base](https://github.com/airbnb/javascript) from 12.1.0 to 15.0.0. - [Release notes](https://github.com/airbnb/javascript/releases) - [Commits](https://github.com/airbnb/javascript/compare/eslint-config-airbnb-base-v12.1.0...eslint-config-airbnb-base-v15.0.0) --- updated-dependencies: - dependency-name: eslint-config-airbnb-base dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b7beeea..91c5b5d 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "eslint": "^4.15.0", - "eslint-config-airbnb-base": "^12.1.0", + "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.5.0", "vitest": "^0.29.2" }, From 56dbe7dfe6e228137de339abaff2974828201610 Mon Sep 17 00:00:00 2001 From: Eugene Datsky Date: Thu, 16 Mar 2023 11:20:36 +1100 Subject: [PATCH 2/2] Fix eslint update --- index.js | 12 +++++------- index.test.js | 17 ++++++++--------- package.json | 4 ++-- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/index.js b/index.js index e887cb4..db66cc4 100644 --- a/index.js +++ b/index.js @@ -156,10 +156,10 @@ const factory = ({ return { async Once(root) { - const resolver = ResolverFactory.createResolver(Object.assign( - { fileSystem }, - resolveOptions, - )); + const resolver = ResolverFactory.createResolver({ + fileSystem, + ...resolveOptions, + }); const resolve = promisify(resolver.resolve.bind(resolver)); const readFile = promisify(fileSystem.readFile.bind(fileSystem)); @@ -167,7 +167,7 @@ const factory = ({ if (preprocessValues) { const rootPlugins = rootResult.processor.plugins; const oursPluginIndex = rootPlugins - .findIndex(plugin => plugin.postcssPlugin === PLUGIN); + .findIndex((plugin) => plugin.postcssPlugin === PLUGIN); preprocessPlugins = rootPlugins.slice(0, oursPluginIndex); } @@ -226,10 +226,8 @@ const factory = ({ }, }); - const plugin = factory; plugin.postcss = true; module.exports = plugin; exports.default = plugin; - diff --git a/index.test.js b/index.test.js index e42904d..f4c0d9d 100644 --- a/index.test.js +++ b/index.test.js @@ -153,7 +153,6 @@ test('should replace a constant and an import with same name within the file and ); }); - test('should replace an import from several files', async (t) => { await run( t, @@ -283,10 +282,10 @@ test('should allow custom-property-style names', async (t) => { test('should allow all colour types', async (t) => { await run( t, - '@value named: red; @value hex3char #0f0; @value hex6char #00ff00; @value rgba rgba(34, 12, 64, 0.3); @value hsla hsla(220, 13.0%, 18.0%, 1);\n' + - '.foo { color: named; background-color: hex3char; border-top-color: hex6char; border-bottom-color: rgba; outline-color: hsla; }', - '@value named: red; @value hex3char #0f0; @value hex6char #00ff00; @value rgba rgba(34, 12, 64, 0.3); @value hsla hsla(220, 13.0%, 18.0%, 1);\n' + - '.foo { color: red; background-color: #0f0; border-top-color: #00ff00; border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); }', + '@value named: red; @value hex3char #0f0; @value hex6char #00ff00; @value rgba rgba(34, 12, 64, 0.3); @value hsla hsla(220, 13.0%, 18.0%, 1);\n' + + '.foo { color: named; background-color: hex3char; border-top-color: hex6char; border-bottom-color: rgba; outline-color: hsla; }', + '@value named: red; @value hex3char #0f0; @value hex6char #00ff00; @value rgba rgba(34, 12, 64, 0.3); @value hsla hsla(220, 13.0%, 18.0%, 1);\n' + + '.foo { color: red; background-color: #0f0; border-top-color: #00ff00; border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); }', ); }); @@ -311,10 +310,10 @@ test('should import multiple from a single file on multiple lines', async (t) => test('should allow definitions with commas in them', async (t) => { await run( t, - '@value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ;\n' + - '.foo { box-shadow: coolShadow; }', - '@value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ;\n' + - '.foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); }', + '@value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ;\n' + + '.foo { box-shadow: coolShadow; }', + '@value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ;\n' + + '.foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); }', ); }); diff --git a/package.json b/package.json index 91c5b5d..4275a2e 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,9 @@ "postcss-values-parser": "^6.0.2" }, "devDependencies": { - "eslint": "^4.15.0", + "eslint": "^8.36.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-plugin-import": "^2.5.0", + "eslint-plugin-import": "^2.27.5", "vitest": "^0.29.2" }, "peerDependencies": {