mirror of
https://github.com/valitydev/control-center.git
synced 2024-11-06 10:35:18 +00:00
60 lines
1.7 KiB
JavaScript
60 lines
1.7 KiB
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
/**
|
|
* @param prefix app
|
|
*/
|
|
createAngularSelectorRules({ prefix } = {}) {
|
|
return {
|
|
'@angular-eslint/directive-selector': [
|
|
'error',
|
|
{
|
|
type: 'attribute',
|
|
prefix: prefix,
|
|
style: 'camelCase',
|
|
},
|
|
],
|
|
'@angular-eslint/component-selector': [
|
|
'error',
|
|
{
|
|
type: 'element',
|
|
prefix: prefix,
|
|
style: 'kebab-case',
|
|
},
|
|
],
|
|
};
|
|
},
|
|
/**
|
|
* @param internalPathsPattern @app/**
|
|
*/
|
|
createImportOrderRule({ internalPathsPattern } = {}) {
|
|
return {
|
|
'import/order': [
|
|
'error',
|
|
{
|
|
groups: [
|
|
['builtin', 'external'],
|
|
'internal',
|
|
['parent', 'sibling', 'index'],
|
|
'object',
|
|
],
|
|
pathGroups: internalPathsPattern
|
|
? [
|
|
{
|
|
pattern: internalPathsPattern,
|
|
group: 'internal',
|
|
},
|
|
]
|
|
: [],
|
|
pathGroupsExcludedImportTypes: ['builtin'],
|
|
'newlines-between': 'always',
|
|
alphabetize: {
|
|
order: 'asc',
|
|
caseInsensitive: true,
|
|
},
|
|
},
|
|
],
|
|
};
|
|
},
|
|
};
|