@html-eslint/eslint-plugin
Advanced tools
Comparing version 0.0.4 to 0.1.0
module.exports = [ | ||
'aa', // Afar | ||
'ab', // Abkhaz | ||
'ae', // Avestan | ||
'af', // Afrikaans | ||
'ak', // Akan | ||
'am', // Amharic | ||
'an', // Aragonese | ||
'ar', // Arabic | ||
'as', // Assamese | ||
'av', // Avaric | ||
'ay', // Aymara | ||
'az', // Azerbaijani | ||
'ba', // Bashkir | ||
'be', // Belarusian | ||
'bg', // Bulgarian | ||
'bh', // Bihari | ||
'bi', // Bislama | ||
'bm', // Bambara | ||
'bn', // Bengali | ||
'bo', // Tibetan Standard | ||
'br', // Breton | ||
'bs', // Bosnian | ||
'ca', // Catalan | ||
'ce', // Chechen | ||
'ch', // Chamorro | ||
'co', // Corsican | ||
'cr', // Cree | ||
'cs', // Czech | ||
'cu', // Old Church Slavonic | ||
'cv', // Chuvash | ||
'cy', // Welsh | ||
'da', // Danish | ||
'de', // German | ||
'dv', // Divehi | ||
'dz', // Dzongkha | ||
'ee', // Ewe | ||
'el', // Greek | ||
'en', // English | ||
'eo', // Esperanto | ||
'es', // Spanish | ||
'et', // Estonian | ||
'eu', // Basque | ||
'fa', // Persian | ||
'ff', // Fula | ||
'fi', // Finnish | ||
'fj', // Fijian | ||
'fo', // Faroese | ||
'fr', // French | ||
'fy', // Western Frisian | ||
'ga', // Irish | ||
'gd', // Scottish Gaelic | ||
'gl', // Galician | ||
'gn', // Guaraní | ||
'gu', // Gujarati | ||
'gv', // Manx | ||
'ha', // Hausa | ||
'he', // Hebrew | ||
'hi', // Hindi | ||
'ho', // Hiri Motu | ||
'hr', // Croatian | ||
'ht', // Haitian | ||
'hu', // Hungarian | ||
'hy', // Armenian | ||
'hz', // Herero | ||
'ia', // Interlingua | ||
'id', // Indonesian | ||
'ie', // Interlingue | ||
'ig', // Igbo | ||
'ii', // Nuosu | ||
'ik', // Inupiaq | ||
'io', // Ido | ||
'is', // Icelandic | ||
'it', // Italian | ||
'iu', // Inuktitut | ||
'ja', // Japanese | ||
'jv', // Javanese | ||
'ka', // Georgian | ||
'kg', // Kongo | ||
'ki', // Kikuyu | ||
'kj', // Kwanyama | ||
'kk', // Kazakh | ||
'kl', // Kalaallisut | ||
'km', // Khmer | ||
'kn', // Kannada | ||
'ko', // Korean | ||
'kr', // Kanuri | ||
'ks', // Kashmiri | ||
'ku', // Kurdish | ||
'kv', // Komi | ||
'kw', // Cornish | ||
'ky', // Kyrgyz | ||
'la', // Latin | ||
'lb', // Luxembourgish | ||
'lg', // Ganda | ||
'li', // Limburgish | ||
'ln', // Lingala | ||
'lo', // Lao | ||
'lt', // Lithuanian | ||
'lu', // Luba-Katanga | ||
'lv', // Latvian | ||
'mg', // Malagasy | ||
'mh', // Marshallese | ||
'mi', // Māori | ||
'mk', // Macedonian | ||
'ml', // Malayalam | ||
'mn', // Mongolian | ||
'mr', // Marathi | ||
'ms', // Malay | ||
'mt', // Maltese | ||
'my', // Burmese | ||
'na', // Nauru | ||
'nb', // Norwegian Bokmål | ||
'nd', // Northern Ndebele | ||
'ne', // Nepali | ||
'ng', // Ndonga | ||
'nl', // Dutch | ||
'nn', // Norwegian Nynorsk | ||
'no', // Norwegian | ||
'nr', // Southern Ndebele | ||
'nv', // Navajo | ||
'ny', // Chichewa | ||
'oc', // Occitan | ||
'oj', // Ojibwe | ||
'om', // Oromo | ||
'or', // Oriya | ||
'os', // Ossetian | ||
'pa', // Panjabi | ||
'pi', // Pāli | ||
'pl', // Polish | ||
'ps', // Pashto | ||
'pt', // Portuguese | ||
'qu', // Quechua | ||
'rm', // Romansh | ||
'rn', // Kirundi | ||
'ro', // Romanian | ||
'ru', // Russian | ||
'rw', // Kinyarwanda | ||
'sa', // Sanskrit | ||
'sc', // Sardinian | ||
'sd', // Sindhi | ||
'se', // Northern Sami | ||
'sg', // Sango | ||
'si', // Sinhala | ||
'sk', // Slovak | ||
'sl', // Slovene | ||
'sm', // Samoan | ||
'sn', // Shona | ||
'so', // Somali | ||
'sq', // Albanian | ||
'sr', // Serbian | ||
'ss', // Swati | ||
'st', // Southern Sotho | ||
'su', // Sundanese | ||
'sv', // Swedish | ||
'sw', // Swahili | ||
'ta', // Tamil | ||
'te', // Telugu | ||
'tg', // Tajik | ||
'th', // Thai | ||
'ti', // Tigrinya | ||
'tk', // Turkmen | ||
'tl', // Tagalog | ||
'tn', // Tswana | ||
'to', // Tonga | ||
'tr', // Turkish | ||
'ts', // Tsonga | ||
'tt', // Tatar | ||
'tw', // Twi | ||
'ty', // Tahitian | ||
'ug', // Uyghur | ||
'uk', // Ukrainian | ||
'ur', // Urdu | ||
'uz', // Uzbek | ||
've', // Venda | ||
'vi', // Vietnamese | ||
'vo', // Volapük | ||
'wa', // Walloon | ||
'wo', // Wolof | ||
'xh', // Xhosa | ||
'yi', // Yiddish | ||
'yo', // Yoruba | ||
'za', // Zhuang | ||
'zh', // Chinese | ||
'zu', // Zulu | ||
]; | ||
"aa", // Afar | ||
"ab", // Abkhaz | ||
"ae", // Avestan | ||
"af", // Afrikaans | ||
"ak", // Akan | ||
"am", // Amharic | ||
"an", // Aragonese | ||
"ar", // Arabic | ||
"as", // Assamese | ||
"av", // Avaric | ||
"ay", // Aymara | ||
"az", // Azerbaijani | ||
"ba", // Bashkir | ||
"be", // Belarusian | ||
"bg", // Bulgarian | ||
"bh", // Bihari | ||
"bi", // Bislama | ||
"bm", // Bambara | ||
"bn", // Bengali | ||
"bo", // Tibetan Standard | ||
"br", // Breton | ||
"bs", // Bosnian | ||
"ca", // Catalan | ||
"ce", // Chechen | ||
"ch", // Chamorro | ||
"co", // Corsican | ||
"cr", // Cree | ||
"cs", // Czech | ||
"cu", // Old Church Slavonic | ||
"cv", // Chuvash | ||
"cy", // Welsh | ||
"da", // Danish | ||
"de", // German | ||
"dv", // Divehi | ||
"dz", // Dzongkha | ||
"ee", // Ewe | ||
"el", // Greek | ||
"en", // English | ||
"eo", // Esperanto | ||
"es", // Spanish | ||
"et", // Estonian | ||
"eu", // Basque | ||
"fa", // Persian | ||
"ff", // Fula | ||
"fi", // Finnish | ||
"fj", // Fijian | ||
"fo", // Faroese | ||
"fr", // French | ||
"fy", // Western Frisian | ||
"ga", // Irish | ||
"gd", // Scottish Gaelic | ||
"gl", // Galician | ||
"gn", // Guaraní | ||
"gu", // Gujarati | ||
"gv", // Manx | ||
"ha", // Hausa | ||
"he", // Hebrew | ||
"hi", // Hindi | ||
"ho", // Hiri Motu | ||
"hr", // Croatian | ||
"ht", // Haitian | ||
"hu", // Hungarian | ||
"hy", // Armenian | ||
"hz", // Herero | ||
"ia", // Interlingua | ||
"id", // Indonesian | ||
"ie", // Interlingue | ||
"ig", // Igbo | ||
"ii", // Nuosu | ||
"ik", // Inupiaq | ||
"io", // Ido | ||
"is", // Icelandic | ||
"it", // Italian | ||
"iu", // Inuktitut | ||
"ja", // Japanese | ||
"jv", // Javanese | ||
"ka", // Georgian | ||
"kg", // Kongo | ||
"ki", // Kikuyu | ||
"kj", // Kwanyama | ||
"kk", // Kazakh | ||
"kl", // Kalaallisut | ||
"km", // Khmer | ||
"kn", // Kannada | ||
"ko", // Korean | ||
"kr", // Kanuri | ||
"ks", // Kashmiri | ||
"ku", // Kurdish | ||
"kv", // Komi | ||
"kw", // Cornish | ||
"ky", // Kyrgyz | ||
"la", // Latin | ||
"lb", // Luxembourgish | ||
"lg", // Ganda | ||
"li", // Limburgish | ||
"ln", // Lingala | ||
"lo", // Lao | ||
"lt", // Lithuanian | ||
"lu", // Luba-Katanga | ||
"lv", // Latvian | ||
"mg", // Malagasy | ||
"mh", // Marshallese | ||
"mi", // Māori | ||
"mk", // Macedonian | ||
"ml", // Malayalam | ||
"mn", // Mongolian | ||
"mr", // Marathi | ||
"ms", // Malay | ||
"mt", // Maltese | ||
"my", // Burmese | ||
"na", // Nauru | ||
"nb", // Norwegian Bokmål | ||
"nd", // Northern Ndebele | ||
"ne", // Nepali | ||
"ng", // Ndonga | ||
"nl", // Dutch | ||
"nn", // Norwegian Nynorsk | ||
"no", // Norwegian | ||
"nr", // Southern Ndebele | ||
"nv", // Navajo | ||
"ny", // Chichewa | ||
"oc", // Occitan | ||
"oj", // Ojibwe | ||
"om", // Oromo | ||
"or", // Oriya | ||
"os", // Ossetian | ||
"pa", // Panjabi | ||
"pi", // Pāli | ||
"pl", // Polish | ||
"ps", // Pashto | ||
"pt", // Portuguese | ||
"qu", // Quechua | ||
"rm", // Romansh | ||
"rn", // Kirundi | ||
"ro", // Romanian | ||
"ru", // Russian | ||
"rw", // Kinyarwanda | ||
"sa", // Sanskrit | ||
"sc", // Sardinian | ||
"sd", // Sindhi | ||
"se", // Northern Sami | ||
"sg", // Sango | ||
"si", // Sinhala | ||
"sk", // Slovak | ||
"sl", // Slovene | ||
"sm", // Samoan | ||
"sn", // Shona | ||
"so", // Somali | ||
"sq", // Albanian | ||
"sr", // Serbian | ||
"ss", // Swati | ||
"st", // Southern Sotho | ||
"su", // Sundanese | ||
"sv", // Swedish | ||
"sw", // Swahili | ||
"ta", // Tamil | ||
"te", // Telugu | ||
"tg", // Tajik | ||
"th", // Thai | ||
"ti", // Tigrinya | ||
"tk", // Turkmen | ||
"tl", // Tagalog | ||
"tn", // Tswana | ||
"to", // Tonga | ||
"tr", // Turkish | ||
"ts", // Tsonga | ||
"tt", // Tatar | ||
"tw", // Twi | ||
"ty", // Tahitian | ||
"ug", // Uyghur | ||
"uk", // Ukrainian | ||
"ur", // Urdu | ||
"uz", // Uzbek | ||
"ve", // Venda | ||
"vi", // Vietnamese | ||
"vo", // Volapük | ||
"wa", // Walloon | ||
"wo", // Wolof | ||
"xh", // Xhosa | ||
"yi", // Yiddish | ||
"yo", // Yoruba | ||
"za", // Zhuang | ||
"zh", // Chinese | ||
"zu", // Zulu | ||
]; |
@@ -1,3 +0,7 @@ | ||
const rules = require('./rules'); | ||
const rules = require("./rules"); | ||
const recommended = require("./configs/recommended"); | ||
module.exports.rules = rules; | ||
module.exports.configs = { | ||
recommended, | ||
}; |
const requireLang = require("./require-lang"); | ||
const requireImgAlt = require("./require-img-alt"); | ||
const requireDoctype = require("./require-doctype"); | ||
const requireTitle = require("./require-title"); | ||
const noDuplicateId = require("./no-duplicate-id"); | ||
const noInlineStyles = require("./no-inline-styles"); | ||
module.exports = { | ||
'require-lang': requireLang, | ||
"require-lang": requireLang, | ||
"require-img-alt": requireImgAlt, | ||
"require-doctype": requireDoctype, | ||
"require-title": requireTitle, | ||
"no-duplicate-id": noDuplicateId, | ||
"no-inline-styles": noInlineStyles, | ||
}; |
@@ -1,6 +0,14 @@ | ||
const IOS_639_1 = require('../constants/iso_639_1'); | ||
/** | ||
* @typedef {import("../types").RuleCategory} RuleCategory | ||
*/ | ||
/** | ||
* @type {RuleCategory} | ||
*/ | ||
const CATEGORY = require("../constants/rule-category"); | ||
const IOS_639_1 = require("../constants/iso_639_1"); | ||
const MESSAGE_IDS = { | ||
MISSING_LANG: 'missingLang', | ||
INVALID_LANG: 'invalidLang' | ||
MISSING_LANG: "missingLang", | ||
INVALID_LANG: "invalidLang", | ||
}; | ||
@@ -14,4 +22,4 @@ | ||
description: "require `lang` attribute at `<html>` tag", | ||
category: "seo", | ||
recommended: false, | ||
category: CATEGORY.SEO, | ||
recommended: true, | ||
}, | ||
@@ -22,4 +30,4 @@ | ||
messages: { | ||
[MESSAGE_IDS.MISSING_LANG]: "Missing `lang` attribute at `<html>` tag", | ||
[MESSAGE_IDS.INVALID_LANG]: "Invalid value of `lang` attribute" | ||
[MESSAGE_IDS.MISSING_LANG]: "missing `lang` attribute at `<html>` tag", | ||
[MESSAGE_IDS.INVALID_LANG]: "invalid value of `lang` attribute", | ||
}, | ||
@@ -30,3 +38,3 @@ }, | ||
return { | ||
html (node) { | ||
Html(node) { | ||
const attrs = node.attrs || []; | ||
@@ -37,3 +45,3 @@ const langAttr = attrs.find(isLangAttribute); | ||
node: node.startTag, | ||
messageId: MESSAGE_IDS.MISSING_LANG | ||
messageId: MESSAGE_IDS.MISSING_LANG, | ||
}); | ||
@@ -43,6 +51,6 @@ } else if (!IOS_639_1.includes(langAttr.value)) { | ||
node: node.startTag, | ||
messageId: MESSAGE_IDS.INVALID_LANG | ||
}); | ||
messageId: MESSAGE_IDS.INVALID_LANG, | ||
}); | ||
} | ||
} | ||
}, | ||
}; | ||
@@ -52,4 +60,4 @@ }, | ||
function isLangAttribute (attr) { | ||
function isLangAttribute(attr) { | ||
return attr.name === "lang"; | ||
} |
{ | ||
"name": "@html-eslint/eslint-plugin", | ||
"version": "0.0.4", | ||
"description": "> TODO: description", | ||
"version": "0.1.0", | ||
"description": "ESLint plugin for html", | ||
"author": "yeonjuan", | ||
"homepage": "https://github.com/yeonjuan/html5-eslint#readme", | ||
"license": "ISC", | ||
"homepage": "https://github.com/yeonjuan/html-eslint#readme", | ||
"license": "MIT", | ||
"main": "lib/index.js", | ||
@@ -21,3 +21,3 @@ "directories": { | ||
"type": "git", | ||
"url": "git+https://github.com/yeonjuan/html5-eslint.git" | ||
"url": "git+https://github.com/yeonjuan/html-eslint.git" | ||
}, | ||
@@ -28,8 +28,8 @@ "scripts": { | ||
"bugs": { | ||
"url": "https://github.com/yeonjuan/html5-eslint/issues" | ||
"url": "https://github.com/yeonjuan/html-eslint/issues" | ||
}, | ||
"devDependencies": { | ||
"@html-eslint/parser": "^0.0.4" | ||
"@html-eslint/parser": "^0.1.0" | ||
}, | ||
"gitHead": "9e2b5aca74ef2b3a347d09b2bc0f06d8d2cc4050" | ||
"gitHead": "a3fc97c0e25cffef20b3c1295998bbbab635fe5d" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12202
14
506
1