-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
53 lines (50 loc) · 1001 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import base from './base.js';
import nameConfig, { nameWith } from './name.js';
import pug from './pug.js';
const createConfig = (name = nameConfig) => {
return {
...base,
...pug,
...name,
parser: {
...base.parser,
...pug.parser,
...name.parser,
},
rules: {
...base.rules,
...pug.rules,
...name.rules,
},
nodeRules: [
//
...(base.nodeRules ?? []),
...(pug.nodeRules ?? []),
...(name.nodeRules ?? []),
],
childNodeRules: [
//
...(base.childNodeRules ?? []),
...(pug.childNodeRules ?? []),
...(name.childNodeRules ?? []),
],
overrideMode: 'merge',
overrides: {
...pug.overrides,
},
};
};
/**
* @type {import('@markuplint/ml-config').Config}
*/
export default createConfig();
/**
*
* @param {object} options
* @param {string[]?} options.classNaming
* @returns
*/
export const extendsConfig = (options) => {
const name = options?.classNaming ? nameWith(options.classNaming) : nameConfig;
return createConfig(name);
};