mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 09:47:56 +08:00
- Updates stylelint to 13.8.0 - Updates ESLint to 7.14.0 - Updates @typescript-eslint to 4.9.0 DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Change-Id: I207e204607ede782710e042c17d6510c7f696905 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566806 Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
30 lines
730 B
JavaScript
30 lines
730 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Check whether a at-rule is standard
|
|
*
|
|
* @param {import('postcss').AtRule | import('postcss-less').AtRule} atRule postcss at-rule node
|
|
* @return {boolean} If `true`, the declaration is standard
|
|
*/
|
|
module.exports = function (atRule) {
|
|
// Ignore scss `@content` inside mixins
|
|
if (!atRule.nodes && atRule.params === '') {
|
|
return false;
|
|
}
|
|
|
|
// Ignore Less mixins
|
|
if ('mixin' in atRule && atRule.mixin) {
|
|
return false;
|
|
}
|
|
|
|
// Ignore Less detached ruleset `@detached-ruleset: { background: red; }; .top { @detached-ruleset(); }`
|
|
if (
|
|
('variable' in atRule && atRule.variable) ||
|
|
(!atRule.nodes && atRule.raws.afterName === '' && atRule.params[0] === '(')
|
|
) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
};
|