Add linters

This commit is contained in:
mark
2022-04-09 05:53:53 +02:00
parent 7925ffc491
commit ee726ca2ea
6 changed files with 88 additions and 2 deletions

3
.eslintignore Normal file
View File

@@ -0,0 +1,3 @@
assets/js/index.js
assets/js/vendor
node_modules

12
.eslintrc.yml Normal file
View File

@@ -0,0 +1,12 @@
env:
browser: true
es6: true
extends:
- standard
globals:
Atomics: readonly
SharedArrayBuffer: readonly
parserOptions:
ecmaVersion: 2018
sourceType: module
rules: {}

11
.markdownlint-cli2.jsonc Normal file
View File

@@ -0,0 +1,11 @@
{
"config": {
"default": true,
"MD013": false,
"MD024": false,
"MD026": false,
"MD033": false,
"MD034": false
},
"ignores": ["node_modules", "CHANGELOG.md", "README.md"]
}

3
.stylelintignore Normal file
View File

@@ -0,0 +1,3 @@
assets/scss/components/_syntax.scss
assets/scss/vendor
node_modules

49
.stylelintrc.json Normal file
View File

@@ -0,0 +1,49 @@
{
"extends": "stylelint-config-standard-scss",
"rules": {
"no-empty-source": null,
"indentation": 4,
"string-quotes": "double",
"scss/comment-no-empty": null,
"max-line-length": null,
"scss/at-extend-no-missing-placeholder": null,
"scss/dollar-variable-colon-space-after": null,
"scss/dollar-variable-empty-line-before": null,
"color-function-notation": null,
"alpha-value-notation": null,
"selector-id-pattern": null,
"selector-class-pattern": null,
"scss/no-global-function-names": null,
"number-max-precision": null,
"hue-degree-notation": null,
"value-no-vendor-prefix": null,
"property-no-vendor-prefix": null,
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"extend",
"at-root",
"debug",
"warn",
"error",
"if",
"else",
"for",
"each",
"while",
"mixin",
"include",
"content",
"return",
"function",
"tailwind",
"apply",
"responsive",
"variants",
"screen"
]
}
]
}
}

View File

@@ -14,7 +14,7 @@
"clean": "shx rm -rf public resources",
"clean:install": "shx rm -rf package-lock.json node_modules ",
"lint": "npm run -s lint:scripts && npm run -s lint:styles && npm run -s lint:markdown",
"lint:scripts": "eslint assets/js config functions",
"lint:scripts": "eslint assets/js",
"lint:styles": "stylelint \"assets/scss/**/*.{css,sass,scss,sss,less}\"",
"lint:markdown": "markdownlint-cli2 \"*.md\" \"content/**/*.md\"",
"lint:markdown-fix": "markdownlint-cli2-fix \"*.md\" \"content/**/*.md\"",
@@ -42,12 +42,20 @@
"@fullhuman/postcss-purgecss": "^4.1.3",
"autoprefixer": "^10.4.2",
"bootstrap": "^5.1.3",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.2.0",
"exec-bin": "^1.0.0",
"flexsearch": "^0.7.21",
"hugo-installer": "^3.1.0",
"markdownlint-cli2": "^0.4.0",
"postcss-cli": "^9.1.0",
"purgecss-whitelister": "^2.4.0",
"shx": "^0.3.4"
"shx": "^0.3.4",
"stylelint": "^14.6.1",
"stylelint-config-standard-scss": "^3.0.0"
},
"otherDependencies": {
"hugo": "0.92.2"