UNPKG

@o3r/stylelint-plugin

Version:

In-house stylelint plugin to use in your own eslint configuration

36 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ngAdd = void 0; const path = require("node:path"); const schematics_1 = require("@angular-devkit/schematics"); const schematics_2 = require("@o3r/schematics"); const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json'); /** * List of external dependencies to be added to the project as peer dependencies */ const dependenciesToInstall = []; /** * List of external dependencies to be added to the project as dev dependencies */ const devDependenciesToInstall = [ 'postcss', 'postcss-scss', 'stylelint' ]; /** * Add Otter stylelint-plugin to an Angular Project * @param options */ function ngAddFn(options) { /* ng add rules */ return (0, schematics_1.chain)([ (0, schematics_2.ngAddDependenciesRule)(options, packageJsonPath, { dependenciesToInstall, devDependenciesToInstall }) ]); } /** * Add Otter stylelint-plugin to an Angular Project * @param options */ const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options); exports.ngAdd = ngAdd; //# sourceMappingURL=index.js.map