Skip to content

Bump eslint-config-airbnb-base from 12.1.0 to 15.0.0 #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,18 @@ 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));

let preprocessPlugins = [];
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);
}

Expand Down Expand Up @@ -226,10 +226,8 @@ const factory = ({
},
});


const plugin = factory;
plugin.postcss = true;

module.exports = plugin;
exports.default = plugin;

17 changes: 8 additions & 9 deletions index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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); }',
);
});

Expand All @@ -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); }',
);
});

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"postcss-values-parser": "^6.0.2"
},
"devDependencies": {
"eslint": "^4.15.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.5.0",
"eslint": "^8.36.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.27.5",
"vitest": "^0.29.2"
},
"peerDependencies": {
Expand Down