Linter configurations for Stolley's classes (ITMD 361, COM 330/530).
{ | |
"settings": { | |
"_version": "Stolley Browser Config, v. 2.0.2, 20180811", | |
"_eslint_version": "4.19.1", | |
"_rules_url": "https://eslint.org/docs/rules/", | |
"_repo_url": "https://github.com/karlstolley/eslint-config" | |
}, | |
"parserOptions": { | |
"ecmaVersion": 5 | |
}, | |
"root": true, | |
"env": { | |
"browser": true | |
}, | |
"extends": "eslint:recommended", | |
"rules": { | |
"no-console": "off", | |
"no-template-curly-in-string": "error", | |
"block-scoped-var": "warn", | |
"curly": ["warn", "all"], | |
"dot-location": ["warn", "property"], | |
"dot-notation": "warn", | |
"eqeqeq": ["warn", "always"], | |
"no-multi-spaces": ["warn", { "ignoreEOLComments": true, "exceptions": { "Property": true } }], | |
"no-sequences": "error", | |
"require-await": "error", | |
"vars-on-top": "error", | |
"yoda": "error", | |
"strict": ["error", "global"], | |
"no-undefined": "error", | |
"comma-dangle": ["warn", "never"], | |
"comma-spacing": ["warn", { "before": false, "after": true }], | |
"func-call-spacing": "warn", | |
"indent": ["warn", 2], | |
"linebreak-style": ["error", "unix"], | |
"multiline-comment-style": ["warn", "separate-lines"], | |
"newline-per-chained-call": ["warn", { "ignoreChainWithDepth": 2 }], | |
"spaced-comment": ["warn", "always"], | |
"semi": ["warn", "always"], | |
"semi-spacing": ["warn", {"before": false, "after": true}] | |
} | |
} |
{ | |
// Stolley House Config, v. 2.0.0, 20200914 | |
// names of npm modules to load into htmllint | |
"plugins": [], | |
// Configuration options: | |
"attr-bans": ["align", "background", "bgcolor", "border", "frameborder", "longdesc", "marginwidth", "marginheight", "scrolling", "style", "target", "width", "height", "onload", "onclick"], // ban deprecated/obsolete attributes | |
"attr-name-style": "dash", // allow hyphens/dashes in attributes, e.g., for data- attributes | |
"attr-no-dup": true, // no duplicate attributes | |
"attr-validate": true, // well-formed attribute style | |
"class-no-dup": true, // no duplicate classes on same element | |
"doctype-first": true, // <!DOCTYPE html> must be first line | |
"fig-req-figcaption": true, // require <figcaption> | |
"head-req-title": true, // All documents must have <title> | |
"head-valid-content-model": true, // Only valid <head> children | |
"html-req-lang": true, // <html> tag must have lang attribute | |
"html-valid-content-model" : true, // one <head>, one <body> | |
"id-class-no-ad": true, // no class/id names that might trigger an ad blocker | |
"id-class-style": "dash", // require lowercase and hyphens/dashes in attribute values (e.g., week-one) | |
"id-no-dup": true, // no duplicate IDs anywhere on page | |
"img-req-alt": true, // All <img> tags must have non-empty alt attribute | |
"indent-style": "spaces", // use spaces to indent | |
"indent-width": 2, // use two spaces, to be precise | |
"input-req-label": true, // All <input> tags must have a <label> tag | |
"label-req-for": true, // All <label> tags must have a for attribute | |
"line-end-style": "lf", // Unix-style LF line-endings | |
"line-max-len": 150, // No super-long lines... | |
"line-max-len-ignore-regex": "href", // ...unless they are href values | |
"spec-char-escape": true, // XML special characters (<,>,&,etc.) must be escaped | |
"tag-bans": ["acronym", "big", "blink", "br", "button", "center", "div", "font", "frame", "frameset", "hr", "iframe", "style"], | |
"tag-close": true, // tags that open must close | |
"tag-name-lowercase": true, // only lowercase for tag names | |
"tag-name-match": true, // tag names must match, in both name and case | |
"tag-self-close": "always", // tags like <meta> must self-close: <meta /> | |
"title-no-dup": true // only one <title> element in <head> | |
} |
{ | |
# Stolley House Config, v. 2.0.0, 20201007 | |
"rules": { | |
"at-rule-name-case": "lower", | |
"at-rule-name-space-after": "always", | |
"at-rule-semicolon-newline-after": "always", | |
"block-closing-brace-newline-before": "always-multi-line", | |
"block-closing-brace-space-before": "always-single-line", | |
"block-no-empty": true, | |
"block-opening-brace-newline-after": "always-multi-line", | |
"block-opening-brace-space-after": "always-single-line", | |
"block-opening-brace-space-before": "always", | |
"color-no-invalid-hex": true, | |
"custom-property-pattern": "^[a-z]+(-[a-z]+)*$", | |
"declaration-block-no-duplicate-properties": true, | |
"declaration-block-semicolon-newline-after": "always-multi-line", | |
"declaration-block-semicolon-space-after": "always-single-line", | |
"declaration-block-single-line-max-declarations": 1, | |
"declaration-block-trailing-semicolon": "always", | |
"declaration-colon-space-after": "always", | |
"declaration-colon-space-before": "never", | |
"declaration-no-important": true, | |
"font-family-name-quotes": "always-where-recommended", | |
"font-family-no-missing-generic-family-keyword": true, | |
"function-calc-no-invalid": true, | |
"function-calc-no-unspaced-operator": true, | |
"indentation": 2, | |
"length-zero-no-unit": true, | |
"linebreaks": "unix", | |
"media-feature-colon-space-after": "always", | |
"media-feature-colon-space-before": "never", | |
"media-feature-name-disallowed-list": [/device/,/max-/,"width","height"], | |
"media-feature-name-case": "lower", | |
"no-descending-specificity": [true, {"severity": "warning"}], | |
"no-duplicate-selectors": true, | |
"no-eol-whitespace": true, | |
"no-invalid-double-slash-comments": true, | |
"no-missing-end-of-source-newline": true, | |
"number-leading-zero": "always", | |
"number-no-trailing-zeros": true, | |
"property-case": "lower", | |
"property-no-unknown": true, | |
"selector-attribute-brackets-space-inside": "never", | |
"selector-attribute-quotes": "always", | |
"selector-class-pattern": "^[a-z]+(-[a-z]+)*$", | |
"selector-combinator-space-after": "always", | |
"selector-combinator-space-before": "always", | |
"selector-id-pattern": "^[a-z]+(-[a-z]+)*$", | |
"selector-list-comma-newline-after": "always-multi-line", | |
"selector-list-comma-space-after": "always-single-line", | |
"selector-type-no-unknown": true, | |
"selector-pseudo-class-case": "lower", | |
"selector-type-case": "lower", | |
"string-no-newline": true, | |
"string-quotes": "double", | |
"unit-disallowed-list": [["px", "pt", "in", "cm", "mm"], {"ignoreProperties": {"px": ["/^border/"]}}], | |
"unit-case": "lower", | |
"unit-no-unknown": true, | |
"value-keyword-case": "lower", | |
"value-list-comma-space-after": "always" | |
} | |
} |
This comment has been minimized.
This comment has been minimized.
.htmllintrc line 14 should be changed to fig-req-figcaption. <source> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment