Skip to content

Instantly share code, notes, and snippets.

@profstolley
Last active January 3, 2022 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save profstolley/559aac5112928c7c24c628c6305b70b8 to your computer and use it in GitHub Desktop.
Save profstolley/559aac5112928c7c24c628c6305b70b8 to your computer and use it in GitHub Desktop.
Linter configurations for Stolley's classes (ITMD 361, ITMD 362).
{
"settings": {
"_version": "Stolley Browser Config, v. 4.0.0, 20211117",
"_eslint_version": "8.2.0",
"_rules_url": "https://eslint.org/docs/rules/",
"_repo_url": "https://gist.github.com/profstolley/559aac5112928c7c24c628c6305b70b8#file-eslintrc-json"
},
"parserOptions": {
"ecmaVersion": 5
},
"env": {
"browser": true
},
"extends": "eslint:recommended",
"rules": {
"block-scoped-var": "warn",
"brace-style": ["warn", "1tbs"],
"comma-dangle": ["warn", "never"],
"comma-spacing": ["warn", { "before": false, "after": true }],
"curly": ["warn", "all"],
"dot-location": ["warn", "property"],
"dot-notation": "warn",
"eqeqeq": ["warn", "always"],
"func-call-spacing": "warn",
"indent": ["warn", 2],
"linebreak-style": ["error", "unix"],
"multiline-comment-style": ["warn", "separate-lines"],
"newline-per-chained-call": ["warn", { "ignoreChainWithDepth": 2 }],
"no-console": "off",
"no-multi-spaces": ["warn", { "ignoreEOLComments": true, "exceptions": { "Property": true } }],
"no-sequences": "error",
"no-template-curly-in-string": "error",
"no-undefined": "error",
"require-await": "error",
"semi": ["warn", "always"],
"semi-spacing": ["warn", {"before": false, "after": true}],
"spaced-comment": ["warn", "always"],
"strict": ["error", "global"],
"vars-on-top": "warn",
"yoda": "error"
}
}
{
// 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. 3.0.0, 20211102
"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-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"
}
}
@ddelgad5
Copy link

ddelgad5 commented Jun 7, 2018

.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