mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-19 23:25:52 -04:00
add javascript and css linting
This commit is contained in:
parent
e69d98345c
commit
5787c0b02f
36
.eslintrc.json
Normal file
36
.eslintrc.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"plugins": ["compat"],
|
||||
"extends": ["plugin:compat/recommended"],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"ignorePatterns":[
|
||||
"/assets/js/sse.js",
|
||||
"/assets/js/polyfills/*.js",
|
||||
"/assets/videojs/*",
|
||||
"**/*.min.js"
|
||||
],
|
||||
"rules": {
|
||||
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
|
||||
"eol-last": ["error", "always"],
|
||||
"indent": ["error", 4, { "SwitchCase": 1 }],
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"no-multiple-empty-lines": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-mixed-spaces-and-tabs": "error",
|
||||
"operator-linebreak": ["error", "after"],
|
||||
"semi": ["error", "always"],
|
||||
"comma-dangle": ["error", "never"]
|
||||
},
|
||||
"settings": {
|
||||
"polyfills": [
|
||||
"Array.from",
|
||||
"Math.sign",
|
||||
"URL",
|
||||
"URLSearchParams",
|
||||
"Symbol.iterator",
|
||||
"location.origin"
|
||||
]
|
||||
}
|
||||
}
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
||||
/invidious
|
||||
/sentry
|
||||
/config/config.yml
|
||||
/node_modules/
|
||||
|
21
.stylelintrc.json
Normal file
21
.stylelintrc.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"plugins": [
|
||||
"@double-great/stylelint-a11y"
|
||||
],
|
||||
"ignoreFiles": [
|
||||
"assets/**/quality-selector.css",
|
||||
"assets/**/*min.css",
|
||||
"assets/videojs/**"
|
||||
],
|
||||
"rules": {
|
||||
"a11y/media-prefers-reduced-motion": true,
|
||||
"color-no-invalid-hex": true,
|
||||
"font-family-no-duplicate-names": true,
|
||||
"function-calc-no-unspaced-operator": true,
|
||||
"length-zero-no-unit": true,
|
||||
"media-query-no-invalid": true,
|
||||
"no-invalid-double-slash-comments": true,
|
||||
"no-irregular-whitespace": true,
|
||||
"string-no-newline": true
|
||||
}
|
||||
}
|
2794
package-lock.json
generated
Normal file
2794
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
package.json
Normal file
24
package.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "invidious-lint",
|
||||
"version": "1.0.0",
|
||||
"description": "Lint invidious js and css files",
|
||||
"scripts": {
|
||||
"lint-js": "eslint --ext .js ./assets/js/",
|
||||
"lint-css": "stylelint \"./assets/**/*.css\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"@double-great/stylelint-a11y": "^2.0.2",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-plugin-compat": "^4.2.0",
|
||||
"stylelint": "^15.11.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"ie >= 9",
|
||||
"chrome >= 45",
|
||||
"ChromeAndroid >= 45",
|
||||
"Firefox >= 45",
|
||||
"samsung 4",
|
||||
"safari >= 10",
|
||||
"ios >= 8"
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user