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

Update the built-in ignore list #1797

Merged
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 packages/hint-compat-api/src/helpers/compat-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MDNTreeFilteredByBrowsers, TestFeatureFunction, FeatureInfo } from '../
import { CompatStatement } from '../types-mdn.temp';
import { CompatBase } from './compat-base';

export const DEFAULT_HTML_IGNORE = ['integrity'];
export const DEFAULT_HTML_IGNORE = ['integrity', 'crossorigin', 'spellcheck'];

export class CompatHTML extends CompatBase<Events, Event> {
public constructor(hintContext: HintContext<Events>, MDNData: MDNTreeFilteredByBrowsers, testFunction: TestFeatureFunction) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link crossorigin="anonymous">
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<label spellcheck="true">Example Label</label>
11 changes: 9 additions & 2 deletions packages/hint-compat-api/tests/html-next.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,18 @@ hintRunner.testHint(hintPath, mixedFeaturedCompatibility, {
hintOptions: { enable: ['integrity'] }
});

const defaultIgnoredFeaturesShould: HintTest[] = ['link-integrity', 'script-integrity'].map((filename: string) => {
const fixturesWithIgnoredFeatures = [
'link-integrity',
'script-integrity',
'link-crossorigin',
'spellcheck'
];

const defaultIgnoredFeatures: HintTest[] = fixturesWithIgnoredFeatures.map((filename: string) => {
return {
name: `Ignored features by default should pass (${filename}).`,
serverConfig: generateHTMLConfig(filename)
};
});

hintRunner.testHint(hintPath, defaultIgnoredFeaturesShould, { browserslist: ['ie 10'] });
hintRunner.testHint(hintPath, defaultIgnoredFeatures, { browserslist: ['ie 10', 'chrome 24'] });