gilbarbara / codeclimate-stylelint

A Code Climate engine for the mighty, modern CSS linter
24 stars 18 forks source link

Error: Could not find "stylelint-config-recess-order". Do you need a `configBasedir`? #50

Open starikcetin opened 3 years ago

starikcetin commented 3 years ago

I am getting the following error:

•• Timing: .engineConfig: 0.025s
Error: Could not find "stylelint-config-recess-order". Do you need a `configBasedir`?
See our documentation at https://docs.codeclimate.com/docs/stylelint for more information.

This is my stylelint.config.js file:

const rootNodeModulesPath = require('path').resolve(
  __dirname,
  '..',
  'node_modules'
);

const getAbsolutePath = (name) => `${rootNodeModulesPath}/${name}`;

const extendsNames = [
  'stylelint-config-standard',
  'stylelint-config-sass-guidelines',
  'stylelint-config-recess-order',
];

const extendsPaths = extendsNames.map(getAbsolutePath);

module.exports = {
  extends: extendsPaths,
  plugins: [],
  rules: {
    'order/properties-alphabetical-order': null,
    'max-nesting-depth': null,
    'selector-max-id': null,
  },
};

Everything works fine when I run stylelint locally via CLI.

Any ideas on how to fix this? Thanks.


This is the extend that the error message mentions: https://github.com/stormwarning/stylelint-config-recess-order

gilbarbara commented 3 years ago

Hey @starikcetin

stylelint-config-recess-order isn't included in this engine dependencies. Codeclimate doesn't install your dependencies, that's why it works locally.

starikcetin commented 3 years ago

Hey @starikcetin

stylelint-config-recess-order isn't included in this engine dependencies. Codeclimate doesn't install your dependencies, that's why it works locally.

So, is there any way of fixing this? How can I tell CodeClimate to install my dependencies?