diff --git a/frontend/stylelint.config.js b/frontend/stylelint.config.js index 890544b6..3bc417eb 100644 --- a/frontend/stylelint.config.js +++ b/frontend/stylelint.config.js @@ -1,9 +1,23 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ + +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: [ - 'stylelint-config-standard', - 'stylelint-config-sass-guidelines', - 'stylelint-config-recess-order', - ], + extends: extendsPaths, plugins: [], rules: { 'order/properties-alphabetical-order': null, // conflicts with recess-order