1 | 'use strict';
|
2 |
|
3 | const _ = require('lodash');
|
4 | const getPreviousNonSharedLineCommentNode = require('./getPreviousNonSharedLineCommentNode');
|
5 | const isCustomProperty = require('./isCustomProperty');
|
6 | const isStandardSyntaxDeclaration = require('./isStandardSyntaxDeclaration');
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | module.exports = function (node) {
|
12 | const prevNode = getPreviousNonSharedLineCommentNode(node);
|
13 |
|
14 | return (
|
15 | prevNode !== undefined &&
|
16 | prevNode.type === 'decl' &&
|
17 | isStandardSyntaxDeclaration(prevNode) &&
|
18 | !isCustomProperty(_.get(prevNode, 'prop', ''))
|
19 | );
|
20 | };
|