Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some TODOs #7234

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/__tests__/disableRanges.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ it('Less // line-disabling comment (with description)', async () => {
});
});

// eslint-disable-next-line jest/no-disabled-tests -- TODO: investigate the reason
// eslint-disable-next-line jest/no-disabled-tests -- see #5348
it.skip('Less // disable next-line comment (with multi-line description)', async () => {
const result = await testDisableRangesLess(
`a {
Expand Down
2 changes: 0 additions & 2 deletions lib/reference/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,6 @@ const longhandSubPropertiesOfShorthandProperties = new Map([
'text-decoration-line',
'text-decoration-style',
'text-decoration-color',
// TODO: add support for text-decoration-thickness, Level 4
// https://w3c.github.io/csswg-drafts/css-text-decor-4/#text-decoration-width-property
]),
],
[
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/declaration-property-value-no-unknown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ const rule = (primary, secondaryOptions) => {
};

/**
* TODO: This function avoids false positives because CSSTree doesn't fully support
* some math functions like `clamp()` via `fork()`. In the future, it may be unnecessary.
*
* @see csstree/csstree#164 min, max, clamp
* @see csstree/csstree#245 env
* @see https://github.com/stylelint/stylelint/pull/6511#issuecomment-1412921062
* @see https://github.com/stylelint/stylelint/issues/6635#issuecomment-1425787649
*
Expand Down
11 changes: 6 additions & 5 deletions lib/rules/selector-class-pattern/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ const rule = (primary, secondaryOptions) => {

const selector = String(classNode);

// TODO: `selector` may be resolved. So, getting its raw value may be pretty hard.
// It means `endIndex` may be inaccurate (though non-standard selectors).
// `selector` may be resolved. So, getting its raw value may be pretty hard.
// It means `endIndex` may be inaccurate (though non-standard selectors).
//
// For example, given ".abc { &_x {} }".
// Then, an expected raw `selector` is "&_x",
// but, an actual `selector` is ".abc_x".
// For example, given ".abc { &_x {} }".
// Then, an expected raw `selector` is "&_x",
// but, an actual `selector` is ".abc_x".
// see #6234
const endIndex = index + selector.length;

report({
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/selector-max-class/__tests__/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ testRule({
column: 7,
endLine: 1,
endColumn: 26,
// TODO: The following case is actually correct. It's hard to get the original selector before resolved.
// see #6234
// endColumn: 23,
},
{
Expand All @@ -159,7 +159,7 @@ testRule({
column: 29,
endLine: 1,
endColumn: 43,
// TODO: The following case is actually correct. It's hard to get the original selector before resolved.
// see #6234
// endColumn: 40,
},
],
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/selector-max-combinators/__tests__/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ testRule({
column: 19,
endLine: 1,
endColumn: 26,
// TODO: The following case is actually correct. It's hard to get the original selector before resolved.
// see #6234
// endColumn: 23,
},
{
Expand All @@ -200,7 +200,7 @@ testRule({
column: 7,
endLine: 1,
endColumn: 28,
// TODO: The following case is actually correct. It's hard to get the original selector before resolved.
// see #6234
// endColumn: 25,
},
{
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/selector-max-specificity/__tests__/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ testRule({
},
{
code: ':nth-child(even of my-tag) {}',
skip: true, // TODO: We need to support `<complex-selector-list>` in `ignoreSelectors`.
skip: true, // see #6615
},
],

Expand Down
1 change: 0 additions & 1 deletion lib/rules/selector-max-specificity/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ const rule = (primary, secondaryOptions) => {
if (optionsMatches(secondaryOptions, 'ignoreSelectors', ownValue)) {
ownSpecificity = zeroSpecificity();
} else if (aNPlusBOfSNotationPseudoClasses.has(ownValue.replace(/^:/, ''))) {
// TODO: We need to support `<complex-selector-list>` in `ignoreSelectors`. E.g. `:nth-child(even of .foo)`.
return selectorSpecificity(node);
} else {
ownSpecificity = selectorSpecificity(node.clone({ nodes: [] }));
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/__tests__/isStandardSyntaxAtRule.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('isStandardSyntaxAtRule', () => {
expect(isStandardSyntaxAtRule(atRule('@media(min-width: 100px) {};'))).toBeTruthy();
});

// eslint-disable-next-line jest/no-disabled-tests -- TODO: `postcss-sass` parser does not support `@mixin`.
// eslint-disable-next-line jest/no-disabled-tests -- see AleshaOleg/postcss-sass#56
it.skip('ignore `@content` inside mixins newline', () => {
const rules = sassAtRules('@mixin mixin()\n @content');

Expand Down