Skip to content

Commit

Permalink
add dot linting dot files for workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
p3t3r67x0 committed Jan 31, 2024
1 parent af0b578 commit 09e453e
Show file tree
Hide file tree
Showing 11 changed files with 1,222 additions and 14 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
charset = utf-8
end_of_line = crlf
insert_final_newline = false
indent_style = space
indent_size = 2
tab_width = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
246 changes: 246 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
root: true

env:
es6: true
browser: true

extends:
- eslint:recommended

parserOptions:
ecmaVersion": latest
sourceType: module

rules:
array-bracket-newline:
- error
- consistent

array-bracket-spacing:
- error
- never

array-callback-return: error
arrow-parens:
- error
- always

arrow-spacing:
- error
- before: true
after: true

block-scoped-var: error
block-spacing: error
brace-style:
- error
- stroustrup

comma-dangle:
- error
- arrays: never
objects: never
imports: never
exports: never
functions: never

comma-spacing:
- error
- before: false
after: true

comma-style:
- error
- last

computed-property-spacing: error
curly:
- error
- all

dot-location:
- error
- property

eol-last:
- error
- never

eqeqeq: error
func-call-spacing: error
func-name-matching: error
func-style:
- error
- declaration
- allowArrowFunctions: true

indent:
- error
- 2

key-spacing:
- error
- beforeColon: false
afterColon: true

keyword-spacing:
- error
- before: true
after: true

linebreak-style:
- error
- unix

lines-between-class-members: error
max-nested-callbacks: error
max-statements-per-line: error
new-parens: error
no-array-constructor: error
no-await-in-loop: error
no-caller: error
no-constant-condition:
- error
- checkLoops: false

no-div-regex: error
no-empty: error
no-extra-bind: error
no-extra-parens:
- error
- all
- conditionalAssign: false
nestedBinaryExpressions: false
returnAssign: false

no-implicit-coercion:
- error
- allow:
- '!!'

no-invalid-this: error
no-iterator: error
no-label-var: error
no-lonely-if: error
no-loop-func: error
no-new-object: error
no-new-wrappers: error
no-octal-escape: error
no-proto: error
no-prototype-builtins: 'off'
no-restricted-properties:
- error
- object: Lang
property: copyProperties
message: Use Object.assign()
- object: Lang
property: bind
message: Use arrow notation or Function.prototype.bind()
- object: Lang
property: Class
message: Use ES6 classes

no-return-assign: error
no-return-await: error
no-self-compare: error
no-shadow: error
no-shadow-restricted-names: error
no-template-curly-in-string: error
no-throw-literal: error
no-trailing-spaces: error
no-undef-init: error
no-unneeded-ternary: error
no-unused-expressions: error
no-unused-vars: off
no-useless-call: error
no-useless-computed-key: error
no-useless-concat: error
no-useless-constructor: error
no-useless-rename: error
no-useless-return: error
no-whitespace-before-property: error
no-with: error
nonblock-statement-body-position:
- error
- below

object-curly-newline:
- error
- consistent: true

object-curly-spacing:
- error
- always

object-shorthand: error
operator-assignment: error
operator-linebreak: error
padded-blocks:
- error
- never

prefer-const: error
prefer-numeric-literals: error
prefer-promise-reject-errors: error
prefer-rest-params: error
prefer-spread: error
prefer-template: error
quotes:
- error
- single

require-await: error
rest-spread-spacing:
- error
- never

semi:
- error
- never

semi-spacing:
- error
- before: false
after: true

semi-style: error
space-before-blocks: error
space-before-function-paren:
- error
- named: never
anonymous: always
asyncArrow: always

space-in-parens: error
space-infix-ops:
- error
- int32Hint: false

space-unary-ops: error
spaced-comment: error
switch-colon-spacing: error
symbol-description: error
template-curly-spacing: error
template-tag-spacing: error
unicode-bom: error
wrap-iife:
- error
- inside

yield-star-spacing: error
yoda: error
no-duplicate-imports: error
no-use-before-define:
- error
- functions: false

no-unused-private-class-members: error
no-unmodified-loop-condition: error
no-promise-executor-return: error
require-atomic-updates: error
arrow-body-style:
- error
- as-needed

consistent-return: error
default-case-last: error
26 changes: 26 additions & 0 deletions .htmlhintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"alt-require": false,
"attr-lowercase": ["viewBox"],
"attr-no-duplication": true,
"attr-unsafe-chars": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": false,
"doctype-first": true,
"doctype-html5": true,
"empty-tag-not-self-closed": true,
"head-script-disabled": false,
"href-abs-or-rel": false,
"id-class-ad-disabled": false,
"id-class-value": false,
"id-unique": true,
"inline-script-disabled": false,
"inline-style-disabled": false,
"space-tab-mixed-disabled": "space",
"spec-char-escape": false,
"src-not-empty": true,
"style-disabled": false,
"tag-pair": true,
"tag-self-close": false,
"tagname-lowercase": true,
"title-require": true
}
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ignore external copied files
dist/

# Ignore HTML formatting as the diffs are not great
tailwind.config.js

# Ignore third party JavaScript
node_modules/
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
15 changes: 15 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "stylelint-config-standard",
"rules": {
"rule-empty-line-before": [
"always-multi-line",
{
"except": ["after-single-line-comment", "first-nested"]
}
],
"at-rule-no-unknown": null,
"block-no-empty": true,
"color-named": "never",
"color-no-hex": true
}
}
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,27 @@
"browserslist": "> 0.5%, last 2 versions, not dead",
"scripts": {
"start": "parcel",
"build": "parcel build"
"build": "parcel build",
"htmlhint": "htmlhint \"**/*.html\" --ignore \"dist/**/*.html\" --format unix",
"lint:js": "pnpm exec eslint \"src/**/*.js\" --no-error-on-unmatched-pattern",
"lint:html": "pnpm run htmlhint",
"lint:css": "pnpm exec stylelint \"src/**/*.css\"",
"lint": "pnpm run lint:js && pnpm run lint:css && pnpm run lint:html"
},
"staticFiles": {
"staticPath": "static"
},
"dependencies": {
"parcel": "^2.11.0"
},
"devDependencies": {
"@parcel/config-default": "^2.11.0",
"@parcel/transformer-raw": "^2.11.0",
"eslint": "^8.56.0",
"htmlhint": "^1.1.4",
"postcss": "^8.4.33",
"stylelint": "^16.2.0",
"stylelint-config-standard": "^36.0.0",
"tailwindcss": "^3.4.1"
}
}
Loading

0 comments on commit 09e453e

Please sign in to comment.